11import js from '@eslint/js' ;
22import stylisticPlugin from '@stylistic/eslint-plugin' ;
33import { defineConfig } from 'eslint/config' ;
4- import importPlugin from 'eslint-plugin-import' ;
4+ import importPlugin , { flatConfigs as importPluginConfig } from 'eslint-plugin-import-x ' ;
55import preferArrowFunctionsPlugin from 'eslint-plugin-prefer-arrow-functions' ;
66import unicornPlugin from 'eslint-plugin-unicorn' ;
77import globals from 'globals' ;
@@ -162,19 +162,19 @@ const rules: Config['rules'] = {
162162 ] ,
163163 'eqeqeq' : 'error' ,
164164 'guard-for-in' : 'off' ,
165- 'import/export' : 'error' ,
166- 'import/no-duplicates' : 'error' ,
167- 'import/no-mutable-exports' : 'error' ,
168- 'import/no-named-as-default' : 'error' ,
169- 'import/no-named-as-default-member' : 'error' ,
170- 'import/no-unresolved' : [
165+ 'import-x /export' : 'error' ,
166+ 'import-x /no-duplicates' : 'error' ,
167+ 'import-x /no-mutable-exports' : 'error' ,
168+ 'import-x /no-named-as-default' : 'error' ,
169+ 'import-x /no-named-as-default-member' : 'error' ,
170+ 'import-x /no-unresolved' : [
171171 'error' ,
172172 {
173173 'caseSensitive' : true ,
174174 } ,
175175 ] ,
176- 'import/no-useless-path-segments' : 'error' ,
177- 'import/no-webpack-loader-syntax' : 'error' ,
176+ 'import-x /no-useless-path-segments' : 'error' ,
177+ 'import-x /no-webpack-loader-syntax' : 'error' ,
178178 // Handled by dprint.
179179 'indent' : 'off' ,
180180 'linebreak-style' : [
@@ -306,7 +306,7 @@ export default defineConfig(
306306 // Google configs for eslint, deprecated
307307 fixedGoogleConfig ,
308308 // import plugin default
309- importPlugin . flatConfigs . recommended ,
309+ importPluginConfig . recommended ,
310310 // cactbot default
311311 {
312312 'ignores' : cactbotGlobalIgnores ,
@@ -331,7 +331,7 @@ export default defineConfig(
331331 'cactbot' : cactbotLintPlugin ,
332332 } ,
333333 'settings' : {
334- 'import/resolver' : {
334+ 'import-x /resolver' : {
335335 'node' : {
336336 'extensions' : [ '.d.ts' , '.ts' , '.js' ] ,
337337 } ,
@@ -406,7 +406,7 @@ export default defineConfig(
406406 'allowNullableNumber' : true ,
407407 } ] ,
408408 'func-style' : [ 'error' , 'expression' , { 'allowArrowFunctions' : true } ] ,
409- 'import/order' : [
409+ 'import-x /order' : [
410410 'error' ,
411411 {
412412 'alphabetize' : { 'caseInsensitive' : true , 'order' : 'asc' } ,
0 commit comments