1
- /* eslint import/no-extraneous-dependencies: 0 */
2
-
3
- // imports to not let tools report them as unused
4
- import 'eslint-import-resolver-oxc' ;
1
+ /* eslint import-x/no-extraneous-dependencies: 0 */
5
2
6
3
import js from '@eslint/js' ;
7
4
import stylistic from '@stylistic/eslint-plugin' ;
8
5
import vitest from '@vitest/eslint-plugin' ;
6
+ import { createTypeScriptImportResolver } from 'eslint-import-resolver-typescript' ;
9
7
import customRules from 'eslint-plugin-custom-rules' ;
10
8
import i18next from 'eslint-plugin-i18next' ;
11
- import importPlugin from 'eslint-plugin-import' ;
9
+ import * as importXPlugin from 'eslint-plugin-import-x ' ;
12
10
import playwright from 'eslint-plugin-playwright' ;
13
11
import react from 'eslint-plugin-react' ;
14
12
import reactRefresh from 'eslint-plugin-react-refresh' ;
@@ -29,12 +27,12 @@ export default [
29
27
{ settings : { react : { version : 'detect' } } } ,
30
28
31
29
// rules recommended by eslint-plugin-import
32
- importPlugin . flatConfigs . recommended ,
33
- importPlugin . flatConfigs . typescript ,
30
+ importXPlugin . flatConfigs . recommended ,
31
+ importXPlugin . flatConfigs . typescript ,
34
32
{
35
33
settings : {
36
- 'import/resolver' : 'oxc' ,
37
- 'import/ignore' : [
34
+ 'import-x /resolver-next ' : [ createTypeScriptImportResolver ( ) ] ,
35
+ 'import-x /ignore' : [
38
36
'react-apexcharts' , // ignore react-apexcharts as the default export is broken
39
37
] ,
40
38
} ,
@@ -102,11 +100,11 @@ export default [
102
100
'@stylistic/object-property-newline' : [ 'error' , { allowAllPropertiesOnSameLine : false } ] ,
103
101
104
102
// eslint-plugin-import rules
105
- 'import/no-named-as-default-member' : 'off' ,
106
- 'import/prefer-default-export' : 'error' ,
107
- 'import/no-mutable-exports' : 'error' ,
108
- 'import/namespace' : 'off' , // off to reduce computing time for one file, on when doing yarn lint
109
- 'import/no-extraneous-dependencies' : [
103
+ 'import-x /no-named-as-default-member' : 'off' ,
104
+ 'import-x /prefer-default-export' : 'error' ,
105
+ 'import-x /no-mutable-exports' : 'error' ,
106
+ 'import-x /namespace' : 'off' , // off to reduce computing time for one file, on when doing yarn lint
107
+ 'import-x /no-extraneous-dependencies' : [
110
108
'error' ,
111
109
{
112
110
devDependencies : [
@@ -183,7 +181,7 @@ export default [
183
181
plugins : { vitest } ,
184
182
rules : {
185
183
...vitest . configs . recommended . rules ,
186
- 'import/no-extraneous-dependencies' : [
184
+ 'import-x /no-extraneous-dependencies' : [
187
185
'error' ,
188
186
{
189
187
devDependencies : [
@@ -202,7 +200,7 @@ export default [
202
200
...playwright . configs [ 'flat/recommended' ] ,
203
201
rules : {
204
202
...playwright . configs [ 'flat/recommended' ] . rules ,
205
- 'import/no-extraneous-dependencies' : [
203
+ 'import-x /no-extraneous-dependencies' : [
206
204
'error' ,
207
205
{
208
206
devDependencies : [
0 commit comments