1111 "ecmaVersion" : " latest" ,
1212 "sourceType" : " module"
1313 },
14- "plugins" : [" import" , " unused-imports" , " react" , " @typescript-eslint" , " tailwindcss" ],
14+ "plugins" : [" import" , " unused-imports" , " react" , " @typescript-eslint" , " tailwindcss" , " simple-import-sort " ],
1515 "rules" : {
16- // "@next/next/no-img-element": "off",
1716 "@typescript-eslint/no-explicit-any" : " warn" ,
1817 "@typescript-eslint/explicit-module-boundary-types" : " off" ,
1918 "@typescript-eslint/explicit-function-return-type" : 0 ,
2928 "@typescript-eslint/no-empty-interface" : " off" ,
3029 "@typescript-eslint/no-unused-vars" : 0 ,
3130 "@typescript-eslint/no-use-before-define" : 0 ,
31+
3232 // Basic
3333 "array-callback-return" : " warn" ,
3434 "no-console" : " warn" ,
35+ "no-multiple-empty-lines" : [" error" , { "max" :1 }],
3536 "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+ ],
3746
3847 // React
3948 "react/display-name" : 0 ,
4756 }
4857 ],
4958 "react-hooks/rules-of-hooks" : " off" ,
59+ "simple-import-sort/imports" : " error" ,
60+ "simple-import-sort/exports" : " error" ,
5061 "tailwindcss/enforces-negative-arbitrary-values" : " off" ,
5162 "unused-imports/no-unused-imports" : " error" ,
5263 "unused-imports/no-unused-vars" : [
6677 "rules" : {
6778 "react/prop-types" : " off"
6879 }
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+ }
6996 }
7097 ]
7198}
0 commit comments