1
1
import { FlatCompat } from "@eslint/eslintrc" ;
2
- import eslintJs from "@eslint/js" ;
3
- import typescriptPlugin from "@typescript-eslint/eslint-plugin" ;
4
- import typescriptPluginParser from "@typescript-eslint/parser" ;
5
- import prettierConfig from "eslint-config-prettier" ;
6
2
import boundaries from "eslint-plugin-boundaries" ;
7
- import prettierPlugin from "eslint-plugin-prettier" ;
8
- import reactHooksPlugin from "eslint-plugin-react-hooks" ;
9
- import globals from "globals" ;
10
3
import { dirname } from "path" ;
4
+ import eslintConfigPrettier from "eslint-config-prettier" ;
5
+ import eslintJs from "@eslint/js" ;
11
6
import { fileURLToPath } from "url" ;
7
+ import globals from "globals" ;
8
+ import reactHooksPlugin from "eslint-plugin-react-hooks" ;
9
+ import typescriptPlugin from "@typescript-eslint/eslint-plugin" ;
10
+ import typescriptPluginParser from "@typescript-eslint/parser" ;
12
11
13
12
const __filename = fileURLToPath ( import . meta. url ) ;
14
13
const __dirname = dirname ( __filename ) ;
@@ -27,6 +26,7 @@ export default [
27
26
28
27
{
29
28
files : [ "*.config.js" ] ,
29
+ rules : { "sort-imports" : [ "error" ] } ,
30
30
languageOptions : { globals : { ...globals . node } } ,
31
31
} ,
32
32
@@ -40,6 +40,7 @@ export default [
40
40
...typescriptPlugin . configs . recommended . rules ,
41
41
...typescriptPlugin . configs . strict . rules ,
42
42
...reactHooksPlugin . configs . recommended . rules ,
43
+ "sort-imports" : [ "error" ] ,
43
44
} ,
44
45
languageOptions : {
45
46
globals : { ...globals . browser } ,
@@ -48,13 +49,7 @@ export default [
48
49
} ,
49
50
} ,
50
51
51
- {
52
- plugins : { prettier : prettierPlugin } ,
53
- rules : {
54
- ...prettierConfig . rules ,
55
- "prettier/prettier" : "error" ,
56
- } ,
57
- } ,
52
+ eslintConfigPrettier ,
58
53
59
54
{
60
55
files : [ "src/**/*" ] ,
0 commit comments