|
1 | 1 | { |
| 2 | + "env": { |
| 3 | + "es2020": true, |
| 4 | + "browser": true |
| 5 | + }, |
2 | 6 | "parser": "@typescript-eslint/parser", |
3 | 7 | "extends": [ |
4 | 8 | "react-app", |
|
19 | 23 | "typescript": {} |
20 | 24 | } |
21 | 25 | }, |
22 | | - "plugins": ["@typescript-eslint", "simple-import-sort", "import"], |
| 26 | + "plugins": ["@typescript-eslint", "import"], |
23 | 27 | "rules": { |
24 | 28 | "react/react-in-jsx-scope": "off", |
25 | 29 | "react/display-name": "off", |
|
28 | 32 | "no-console": 1, |
29 | 33 | "no-unused-vars": "off", |
30 | 34 | "@typescript-eslint/no-unused-vars": "error", |
31 | | - "simple-import-sort/imports": "error", |
32 | | - "simple-import-sort/exports": "error", |
33 | 35 | "import/newline-after-import": "error", |
34 | 36 | "import/no-duplicates": "error", |
35 | 37 | // Enforce import order |
36 | | - // "import/order": ["error"], |
| 38 | + "import/order": [ |
| 39 | + 2, |
| 40 | + { |
| 41 | + "groups": ["builtin", "external", "internal"], |
| 42 | + "pathGroups": [ |
| 43 | + { |
| 44 | + "pattern": "react", |
| 45 | + "group": "external", |
| 46 | + "position": "before" |
| 47 | + }, |
| 48 | + { |
| 49 | + "pattern": "@+(symbols)", |
| 50 | + "group": "internal" |
| 51 | + }, |
| 52 | + { |
| 53 | + "pattern": "@+(api|components|compositions|directives|enums|interfaces|layouts|modules|services|utils|views|hooks)/**", |
| 54 | + "group": "internal" |
| 55 | + }, |
| 56 | + { |
| 57 | + "pattern": "@/**", |
| 58 | + "group": "internal" |
| 59 | + }, |
| 60 | + { |
| 61 | + "pattern": "*.scss", |
| 62 | + "group": "index", |
| 63 | + "patternOptions": { "matchBase": true } |
| 64 | + } |
| 65 | + ], |
| 66 | + "pathGroupsExcludedImportTypes": ["react"], |
| 67 | + "newlines-between": "always", |
| 68 | + "alphabetize": { |
| 69 | + "order": "asc", |
| 70 | + "caseInsensitive": true |
| 71 | + } |
| 72 | + } |
| 73 | + ], |
37 | 74 | // Imports should come first |
38 | 75 | "import/first": "error", |
39 | 76 | // Other import rules |
|
0 commit comments