11
11
"ecmaVersion" : " latest" ,
12
12
"sourceType" : " module"
13
13
},
14
- "plugins" : [" import" , " unused-imports" , " react" , " @typescript-eslint" , " tailwindcss" ],
14
+ "plugins" : [" import" , " unused-imports" , " react" , " @typescript-eslint" , " tailwindcss" , " simple-import-sort " ],
15
15
"rules" : {
16
- // "@next/next/no-img-element": "off",
17
16
"@typescript-eslint/no-explicit-any" : " warn" ,
18
17
"@typescript-eslint/explicit-module-boundary-types" : " off" ,
19
18
"@typescript-eslint/explicit-function-return-type" : 0 ,
29
28
"@typescript-eslint/no-empty-interface" : " off" ,
30
29
"@typescript-eslint/no-unused-vars" : 0 ,
31
30
"@typescript-eslint/no-use-before-define" : 0 ,
31
+
32
32
// Basic
33
33
"array-callback-return" : " warn" ,
34
34
"no-console" : " warn" ,
35
+ "no-multiple-empty-lines" : [" error" , { "max" :1 }],
35
36
"no-prototype-builtins" : 0 ,
36
- // "no-expected-multiline": "warn", // can't find rule definition
37
+ // "no-expected-multiline": "warn", // can"t find rule definition
38
+
39
+ "padding-line-between-statements" : [
40
+ " warn" ,
41
+ { "blankLine" : " always" , "prev" : " *" , "next" : " block" },
42
+ { "blankLine" : " always" , "prev" : " block" , "next" : " *" },
43
+ { "blankLine" : " always" , "prev" : " *" , "next" : " block-like" },
44
+ { "blankLine" : " always" , "prev" : " block-like" , "next" : " *" }
45
+ ],
37
46
38
47
// React
39
48
"react/display-name" : 0 ,
47
56
}
48
57
],
49
58
"react-hooks/rules-of-hooks" : " off" ,
59
+ "simple-import-sort/imports" : " error" ,
60
+ "simple-import-sort/exports" : " error" ,
50
61
"tailwindcss/enforces-negative-arbitrary-values" : " off" ,
51
62
"unused-imports/no-unused-imports" : " error" ,
52
63
"unused-imports/no-unused-vars" : [
66
77
"rules" : {
67
78
"react/prop-types" : " off"
68
79
}
80
+ },
81
+ {
82
+ "files" : [" *.js" , " *.ts" , " *.tsx" ],
83
+ "rules" : {
84
+ "simple-import-sort/imports" : [
85
+ " error" ,
86
+ {
87
+ "groups" : [
88
+ [" ^(?:os|path|http|fs|crypto|util|events|stream|url|zlib|querystring|tls|dgram|net|dns|child_process|cluster|readline|vm|assert|buffer|process|timers)(\/ .*)?$" ],
89
+ [" ^(?!(@\/ |\\ .\\ .\/ |\\ .\/ ))" ],
90
+ [" ^@\/ " ],
91
+ [" ^(?:\\ .\/ |\\ .\\ .\/ |\\ .)" ]
92
+ ]
93
+ }
94
+ ]
95
+ }
69
96
}
70
97
]
71
98
}
0 commit comments