@@ -80,15 +80,15 @@ const criticalAirbnbRules = {
80
80
'no-promise-executor-return' : 'error' ,
81
81
82
82
// Import rules (critical ones not in recommended)
83
- 'import/order' : [ 'error' , { groups : [ [ 'builtin' , 'external' , 'internal' ] ] } ] ,
84
- 'import/first' : 'error' ,
85
- 'import/no-mutable-exports' : 'error' ,
86
- 'import/newline-after-import' : 'error' ,
87
- // https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/namespace.md
88
- 'import/namespace' : 'off' ,
83
+ 'import-x /order' : [ 'error' , { groups : [ [ 'builtin' , 'external' , 'internal' ] ] } ] ,
84
+ 'import-x /first' : 'error' ,
85
+ 'import-x /no-mutable-exports' : 'error' ,
86
+ 'import-x /newline-after-import' : 'error' ,
87
+ // https://github.com/import-js/eslint-plugin-import-x /blob/master/docs/rules/namespace.md
88
+ 'import-x /namespace' : 'off' ,
89
89
// Forbid require() calls with expressions
90
- // https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/no-dynamic-require.md
91
- 'import/no-dynamic-require' : 'error' ,
90
+ // https://github.com/import-js/eslint-plugin-import-x /blob/master/docs/rules/no-dynamic-require.md
91
+ 'import-x /no-dynamic-require' : 'error' ,
92
92
93
93
// Additional best practices
94
94
'default-case' : [ 'error' , { commentPattern : '^no default$' } ] ,
@@ -177,9 +177,9 @@ const criticalAirbnbRules = {
177
177
const typescriptOverrides = {
178
178
// The following rules are enabled in Airbnb config, but are recommended to be disabled within TypeScript projects
179
179
// See: https://github.com/typescript-eslint/typescript-eslint/blob/13583e65f5973da2a7ae8384493c5e00014db51b/docs/linting/TROUBLESHOOTING.md#eslint-plugin-import
180
- 'import/named' : 'off' ,
181
- 'import/no-named-as-default-member' : 'off' ,
182
- 'import/no-unresolved' : 'off' ,
180
+ 'import-x /named' : 'off' ,
181
+ 'import-x /no-named-as-default-member' : 'off' ,
182
+ 'import-x /no-unresolved' : 'off' ,
183
183
184
184
// TypeScript equivalents of ESLint rules
185
185
'default-param-last' : 'off' ,
@@ -238,7 +238,7 @@ const typescriptOverrides = {
238
238
'@typescript-eslint/no-this-alias' : 'off' ,
239
239
240
240
// TypeScript extensions handling
241
- 'import/extensions' : [
241
+ 'import-x /extensions' : [
242
242
'error' ,
243
243
'ignorePackages' ,
244
244
{
@@ -310,23 +310,23 @@ export function createCoreConfig(options = {}) {
310
310
{
311
311
name : 'material-ui-base' ,
312
312
settings : {
313
- 'import/resolver' : {
313
+ 'import-x /resolver' : {
314
314
node : {
315
315
extensions : [ '.mjs' , '.js' , '.json' ] ,
316
316
} ,
317
317
typescript : {
318
318
project : [ 'tsconfig.node.json' , 'apps/*/tsconfig.json' , 'packages/*/tsconfig.json' ] ,
319
319
} ,
320
320
} ,
321
- 'import/extensions' : [ '.js' , '.mjs' , '.jsx' , '.ts' , '.tsx' , '.d.ts' ] ,
322
- 'import/core-modules' : [ ] ,
323
- 'import/ignore' : [ 'node_modules' , '\\.(css|svg|json)$' ] ,
321
+ 'import-x /extensions' : [ '.js' , '.mjs' , '.jsx' , '.mts ', '.ts' , '.tsx' , '.d.ts' ] ,
322
+ 'import-x /core-modules' : [ ] ,
323
+ 'import-x /ignore' : [ 'node_modules' , '\\.(css|svg|json)$' ] ,
324
324
// Override with TypeScript-specific settings
325
- 'import/parsers' : {
325
+ 'import-x /parsers' : {
326
326
'@typescript-eslint/parser' : [ '.ts' , '.tsx' ] ,
327
327
} ,
328
328
// Extend Airbnb extensions with TypeScript
329
- 'import/external-module-folders' : [ 'node_modules' , 'node_modules/@types' ] ,
329
+ 'import-x /external-module-folders' : [ 'node_modules' , 'node_modules/@types' ] ,
330
330
} ,
331
331
rules : {
332
332
...criticalAirbnbRules ,
@@ -383,15 +383,15 @@ export function createCoreConfig(options = {}) {
383
383
] ,
384
384
385
385
// Not needed in general, can be turned on for specific files
386
- 'import/prefer-default-export' : 'off' ,
386
+ 'import-x /prefer-default-export' : 'off' ,
387
387
// Not sure why it doesn't work
388
- 'import/named' : 'off' ,
389
- 'import/no-cycle' : 'off' ,
388
+ 'import-x /named' : 'off' ,
389
+ 'import-x /no-cycle' : 'off' ,
390
390
// Missing yarn workspace support
391
- 'import/no-extraneous-dependencies' : 'off' ,
391
+ 'import-x /no-extraneous-dependencies' : 'off' ,
392
392
// The code is already coupled to webpack. Prefer explicit coupling.
393
- 'import/no-webpack-loader-syntax' : 'off' ,
394
- 'import/no-relative-packages' : 'error' ,
393
+ 'import-x /no-webpack-loader-syntax' : 'off' ,
394
+ 'import-x /no-relative-packages' : 'error' ,
395
395
396
396
// doesn't work?
397
397
'jsx-a11y/label-has-associated-control' : [
0 commit comments