Skip to content

Commit 40ca137

Browse files
authored
Merge pull request #550 from contentstack/feature/workflow
workflow eslint
2 parents dada53e + 9d7032c commit 40ca137

File tree

2 files changed

+27
-25
lines changed

2 files changed

+27
-25
lines changed

.github/workflows/repo-sync.yml

Lines changed: 27 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ jobs:
9898
git gc --prune=now # Garbage collect and prune unreachable objects
9999
100100
# echo "Installing ESLint dependencies..."
101-
# npm install --save-dev eslint @eslint/js globals
101+
npm install --save-dev eslint @eslint/js globals
102+
102103
103104
# if [ ! -f "eslint.config.cjs" ]; then
104105
# echo "Creating default ESLint config..."
@@ -143,34 +144,36 @@ jobs:
143144
rsync -av --delete ../upload-api/migration-sitecore/ ./upload-api/migration-sitecore/
144145
145146
# Ensure tsconfig.json exists, create a default one if missing
146-
if [ ! -f "tsconfig.json" ]; then
147-
echo "Creating default tsconfig.json..."
148-
cat <<EOL > tsconfig.json
149-
{
150-
"compilerOptions": {
151-
"target": "ES6",
152-
"module": "CommonJS",
153-
"strict": true,
154-
"esModuleInterop": true,
155-
"skipLibCheck": true,
156-
"forceConsistentCasingInFileNames": true
157-
},
158-
"include": ["src/**/*"],
159-
"exclude": ["node_modules", "dist"]
160-
}
161-
EOL
162-
fi
147+
# if [ ! -f "tsconfig.json" ]; then
148+
# echo "Creating default tsconfig.json..."
149+
# cat <<EOL > tsconfig.json
150+
# {
151+
# "compilerOptions": {
152+
# "target": "ES6",
153+
# "module": "CommonJS",
154+
# "strict": true,
155+
# "esModuleInterop": true,
156+
# "skipLibCheck": true,
157+
# "forceConsistentCasingInFileNames": true
158+
# },
159+
# "include": ["src/**/*"],
160+
# "exclude": ["node_modules", "dist"]
161+
# }
162+
# EOL
163+
# fi
163164
164165
# Remove unused imports
165-
npx ts-remove-unused-imports api/
166-
npx ts-remove-unused-imports ui/
167-
npx ts-remove-unused-imports upload-api/
166+
# npx ts-remove-unused-imports api/
167+
# npx ts-remove-unused-imports ui/
168+
# npx ts-remove-unused-imports upload-api/
168169
169170
# Remove missing imports
170-
npx ts-prune | grep -E '^(api/|ui/|upload-api/)/' | awk '{print $1}' | xargs -I {} sed -i '/import/d' {}
171+
# npx ts-prune | grep -E '^(api/|ui/|upload-api/)/' | awk '{print $1}' | xargs -I {} sed -i '/import/d' {}
172+
173+
# # Format code
174+
# npx prettier --write .
171175
172-
# Format code
173-
npx prettier --write .
176+
eslint api/ ui/ upload-api/ --rule 'import/no-unresolved: error' --format compact | awk -F ':' '{print $1}' | sort -u | xargs -I {} sed -i '/import/d' {}
174177
175178
git add .
176179
git commit -m "Sync changes from migration-v2 PR #${{ github.event.pull_request.number }}"

api/src/services/sitecore.service.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import { orgService } from './org.service.js';
99
import { getLogMessage } from '../utils/index.js';
1010
import customLogger from '../utils/custom-logger.utils.js';
1111

12-
1312
const append = "a";
1413
const baseDirName = MIGRATION_DATA_CONFIG.DATA
1514
const {

0 commit comments

Comments
 (0)