11import eslint from '@eslint/js'
22import eslintPluginUnicorn from 'eslint-plugin-unicorn'
3+ import importPlugin from 'eslint-plugin-import'
34import tseslint from 'typescript-eslint'
45
56export default tseslint . config (
@@ -18,6 +19,7 @@ export default tseslint.config(
1819 ...tseslint . configs . recommended ,
1920 ...tseslint . configs . stylisticTypeChecked ,
2021 ...tseslint . configs . strictTypeChecked ,
22+ importPlugin . flatConfigs . recommended ,
2123 eslintPluginUnicorn . configs [ 'flat/recommended' ] ,
2224 {
2325 rules : {
@@ -34,6 +36,38 @@ export default tseslint.config(
3436 '@typescript-eslint/ban-ts-comment' : 0 ,
3537 'unicorn/expiring-todo-comments' : 0 ,
3638 semi : [ 'error' , 'never' ] ,
39+
40+ 'import/no-unresolved' : 'off' ,
41+ 'import/order' : [
42+ 'error' ,
43+ {
44+ named : true ,
45+ 'newlines-between' : 'always' ,
46+ alphabetize : {
47+ order : 'asc' ,
48+ } ,
49+ groups : [
50+ 'builtin' ,
51+ [ 'external' , 'internal' ] ,
52+ [ 'parent' , 'sibling' , 'index' , 'object' ] ,
53+ 'type' ,
54+ ] ,
55+ pathGroups : [
56+ {
57+ group : 'builtin' ,
58+ pattern : 'react' ,
59+ position : 'before' ,
60+ } ,
61+ {
62+ group : 'external' ,
63+ pattern : '@mui/icons-material' ,
64+ position : 'after' ,
65+ } ,
66+ ] ,
67+
68+ pathGroupsExcludedImportTypes : [ 'react' ] ,
69+ } ,
70+ ] ,
3771 } ,
3872 } ,
3973)
0 commit comments