@@ -140,49 +140,11 @@ jobs:
140140 npm install eslint -g
141141 eslint . --fix --ignore-pattern "cli/**"
142142
143- # echo "Running autoflake to remove unused imports..."
144- # pip install autoflake
145- # autoflake --remove-all-unused-imports --recursive --in-place .
146-
147- # echo "Running ts-prune to remove unused file references..."
148- # npm install -g ts-prune
149- # ts-prune | awk '{print $1}' | xargs rm -f
150-
151143 rsync -av --delete ${{ env.RSYNC_SITECORE_API_SRC_SERVICES_EXCLUDES }} ../api/ ./api/
152144 rsync -av --delete ../ui/ ./ui/
153145 rsync -av --delete ${{ env.RSYNC_SITECORE_UPLOAD_API_SRC_EXCLUDES }} ../upload-api/src/ ./upload-api/src/
154146 rsync -av --delete ../upload-api/migration-sitecore/ ./upload-api/migration-sitecore/
155147
156- # Ensure tsconfig.json exists, create a default one if missing
157- # if [ ! -f "tsconfig.json" ]; then
158- # echo "Creating default tsconfig.json..."
159- # cat <<EOL > tsconfig.json
160- # {
161- # "compilerOptions": {
162- # "target": "ES6",
163- # "module": "CommonJS",
164- # "strict": true,
165- # "esModuleInterop": true,
166- # "skipLibCheck": true,
167- # "forceConsistentCasingInFileNames": true
168- # },
169- # "include": ["src/**/*"],
170- # "exclude": ["node_modules", "dist"]
171- # }
172- # EOL
173- # fi
174-
175- # Remove unused imports
176- # npx ts-remove-unused-imports api/
177- # npx ts-remove-unused-imports ui/
178- # npx ts-remove-unused-imports upload-api/
179-
180- # Remove missing imports
181- # npx ts-prune | grep -E '^(api/|ui/|upload-api/)/' | awk '{print $1}' | xargs -I {} sed -i '/import/d' {}
182-
183- # # Format code
184- # npx prettier --write .
185-
186148 # eslint api/ ui/ upload-api/ --rule 'import/no-unresolved: error' --format compact | awk -F ':' '{print $1}' | sort -u | xargs -I {} sed -i '/import/d' {}
187149 node remove-broken-imports.js
188150
0 commit comments