@@ -97,36 +97,36 @@ jobs:
9797 git clean -fdX # Remove untracked files and directories
9898 git gc --prune=now # Garbage collect and prune unreachable objects
9999
100- echo "Installing ESLint dependencies..."
101- npm install --save-dev eslint @eslint/js globals
102-
103- if [ ! -f "eslint.config.cjs" ]; then
104- echo "Creating default ESLint config..."
105- cat <<EOL > eslint.config.cjs
106- const js = require("@eslint/js");
107- const globals = require("globals");
108-
109- module.exports = [
110- js.configs.recommended,
111- {
112- languageOptions: {
113- ecmaVersion: "latest",
114- sourceType: "module",
115- globals: globals.node,
116- },
117- rules: {
118- "no-unused-vars": "warn",
119- "no-console": "off"
120- }
121- }
122- ];
123- EOL
124- fi
125-
126- # Remove unused imports and missing file references
127- echo "Running ESLint to remove unused imports..."
128- npm install eslint -g
129- eslint . --fix
100+ # echo "Installing ESLint dependencies..."
101+ # npm install --save-dev eslint @eslint/js globals
102+
103+ # if [ ! -f "eslint.config.cjs" ]; then
104+ # echo "Creating default ESLint config..."
105+ # cat <<EOL > eslint.config.cjs
106+ # const js = require("@eslint/js");
107+ # const globals = require("globals");
108+
109+ # module.exports = [
110+ # js.configs.recommended,
111+ # {
112+ # languageOptions: {
113+ # ecmaVersion: "latest",
114+ # sourceType: "module",
115+ # globals: globals.node,
116+ # },
117+ # rules: {
118+ # "no-unused-vars": "warn",
119+ # "no-console": "off"
120+ # }
121+ # }
122+ # ];
123+ # EOL
124+ # fi
125+
126+ # # Remove unused imports and missing file references
127+ # echo "Running ESLint to remove unused imports..."
128+ # npm install eslint -g
129+ # eslint . --fix
130130
131131 echo "Running autoflake to remove unused imports..."
132132 pip install autoflake
@@ -141,6 +141,11 @@ jobs:
141141 rsync -av --delete ../ui/ ./ui/
142142 rsync -av --delete ${{ env.RSYNC_SITECORE_UPLOAD_API_SRC_EXCLUDES }} ../upload-api/src/ ./upload-api/src/
143143 rsync -av --delete ../upload-api/migration-sitecore/ ./upload-api/migration-sitecore/
144+
145+ npx ts-remove-unused-imports --path ./api
146+ npx ts-remove-unused-imports --path ./ui
147+ npx ts-remove-unused-imports --path ./upload-api
148+
144149 git add .
145150 git commit -m "Sync changes from migration-v2 PR #${{ github.event.pull_request.number }}"
146151 git push origin sync-from-migration-v2-${{ github.event.pull_request.number }}
@@ -284,7 +289,7 @@ jobs:
284289
285290 echo "Installing ESLint dependencies..."
286291 npm install --save-dev eslint @eslint/js globals
287-
292+
288293 if [ ! -f "eslint.config.cjs" ]; then
289294 echo "Creating default ESLint config..."
290295 cat <<EOL > eslint.config.cjs
0 commit comments