Skip to content

Commit b7ea65d

Browse files
committed
Migrate to ESLint 10
## Summary This PR prepares the codebase for ESLint 10 migration. ## Changes ### Package Updates - Update `eslint` from 9.39.2 to ^10.0.2 - Update `@mui/internal-code-infra` to ^0.0.3 (requires publishing the updated code-infra package first) ### pnpm Configuration - Add `packageExtensions` to override peer dependencies for ESLint plugins not yet officially supporting ESLint 10: - eslint-plugin-react - eslint-plugin-import - eslint-plugin-jsx-a11y - eslint-plugin-react-hooks ## Prerequisites This migration depends on publishing the updated `@mui/internal-code-infra` package (v0.0.3) from mui-public which contains: - ESLint 10 compatibility fixes using `@eslint/compat` - Updated peer dependencies - Disabled new ESLint 10 rules initially ## Breaking Changes in ESLint 10 - Node.js < v20.19 is no longer supported - New config lookup algorithm (starts from file directory) - JSX references are now tracked - `eslint-env` comments are reported as errors
1 parent 8ccf4ea commit b7ea65d

1 file changed

Lines changed: 26 additions & 2 deletions

File tree

package.json

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
"@mui-internal/api-docs-builder-core": "workspace:^",
9797
"@mui/internal-babel-plugin-minify-errors": "2.0.8-canary.22",
9898
"@mui/internal-bundle-size-checker": "1.0.9-canary.62",
99-
"@mui/internal-code-infra": "0.0.3-canary.95",
99+
"@mui/internal-code-infra": "^0.0.3",
100100
"@mui/internal-docs-utils": "workspace:^",
101101
"@mui/internal-netlify-cache": "0.0.3-canary.0",
102102
"@mui/internal-scripts": "workspace:^",
@@ -128,7 +128,7 @@
128128
"danger": "13.0.5",
129129
"dotenv": "17.3.1",
130130
"es-toolkit": "1.44.0",
131-
"eslint": "9.39.2",
131+
"eslint": "^10.0.2",
132132
"eslint-import-resolver-webpack": "0.13.10",
133133
"eslint-plugin-consistent-default-export-name": "0.0.15",
134134
"fast-glob": "3.3.3",
@@ -157,6 +157,30 @@
157157
"webpack-cli": "6.0.1",
158158
"yargs": "18.0.0"
159159
},
160+
"pnpm": {
161+
"packageExtensions": {
162+
"eslint-plugin-react@*": {
163+
"peerDependencies": {
164+
"eslint": "^9.0.0 || ^10.0.0"
165+
}
166+
},
167+
"eslint-plugin-import@*": {
168+
"peerDependencies": {
169+
"eslint": "^9.0.0 || ^10.0.0"
170+
}
171+
},
172+
"eslint-plugin-jsx-a11y@*": {
173+
"peerDependencies": {
174+
"eslint": "^9.0.0 || ^10.0.0"
175+
}
176+
},
177+
"eslint-plugin-react-hooks@*": {
178+
"peerDependencies": {
179+
"eslint": "^9.0.0 || ^10.0.0"
180+
}
181+
}
182+
}
183+
},
160184
"packageManager": "pnpm@10.30.1",
161185
"engines": {
162186
"pnpm": "10.30.1",

0 commit comments

Comments
 (0)