Skip to content

Commit cf30484

Browse files
Adjust the migration script to handle the createElement imports that will become unused
1 parent 28c37f6 commit cf30484

File tree

3 files changed

+305
-89
lines changed

3 files changed

+305
-89
lines changed

packages/pluggable-widgets-tools/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"@types/react": "^19.0.0",
5252
"@types/react-dom": "^19.0.0",
5353
"@types/testing-library__jest-dom": "^5.14.5",
54-
"@typescript-eslint/eslint-plugin": "^5.8.1",
54+
"@typescript-eslint/eslint-plugin": "^8.56.1",
5555
"@typescript-eslint/parser": "^5.8.1",
5656
"ansi-colors": "4.1.1",
5757
"babel-eslint": "^10.1.0",
@@ -60,9 +60,9 @@
6060
"concurrently": "^6.0.0",
6161
"core-js": "^3.6.5",
6262
"dotenv": "^8.2.0",
63-
"eslint": "^7.20.0",
63+
"eslint": "^8.20.0",
6464
"eslint-config-prettier": "^8.0.0",
65-
"eslint-plugin-jest": "^24.1.5",
65+
"eslint-plugin-jest": "^26.0.0",
6666
"eslint-plugin-prettier": "^3.3.1",
6767
"eslint-plugin-promise": "^4.3.1",
6868
"eslint-plugin-react": "~7.28.0",

packages/pluggable-widgets-tools/utils/migration.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ async function checkMigration() {
226226
execSync("shx rm -rf ./{node_modules,package-lock.json}", { cwd: process.cwd(), stdio: "inherit" });
227227
console.log("Done.");
228228
execSync(`npm install`, { cwd: process.cwd(), stdio: "inherit" });
229+
execSync(`npx eslint --no-eslintrc --rule '@typescript-eslint/no-unused-vars: ["error", { enableAutofixRemoval: { imports: true } }]' --ext ts,tsx,js,jsx --parser @typescript-eslint/parser --plugin '@typescript-eslint' --fix ./src`, { cwd: process.cwd(), stdio: "inherit" })
229230
} catch (e) {
230231
console.log(red("An error occurred while auto updating your dependencies"));
231232
console.error(e);

0 commit comments

Comments
 (0)