|
5 | 5 | "extends": [ |
6 | 6 | "eslint:recommended", |
7 | 7 | "plugin:@typescript-eslint/strict-type-checked", |
8 | | - "plugin:import/recommended", |
9 | | - "plugin:import/typescript" |
| 8 | + "plugin:import-x/recommended", |
| 9 | + "plugin:import-x/typescript" |
10 | 10 | ], |
11 | 11 | "parser": "@typescript-eslint/parser", |
12 | 12 | "parserOptions": { |
|
17 | 17 | }, |
18 | 18 | "project": true |
19 | 19 | }, |
20 | | - "plugins": ["anti-trojan-source", "import", "@typescript-eslint"], |
| 20 | + "plugins": ["anti-trojan-source", "import-x", "@typescript-eslint"], |
21 | 21 | "reportUnusedDisableDirectives": true, |
22 | 22 | "root": true, |
23 | 23 | "rules": { |
|
149 | 149 | } |
150 | 150 | ], |
151 | 151 | "yoda": "error", |
152 | | - "import/consistent-type-specifier-style": ["error", "prefer-top-level"], |
153 | | - "import/default": "off", |
154 | | - "import/extensions": "off", |
155 | | - "import/named": "off", |
156 | | - "import/namespace": "off", |
157 | | - "import/newline-after-import": "warn", |
158 | | - "import/no-absolute-path": "error", |
159 | | - "import/no-cycle": "off", |
160 | | - "import/no-deprecated": "off", |
161 | | - "import/no-default-export": "error", |
162 | | - "import/no-duplicates": ["error", { "prefer-inline": false }], |
163 | | - "import/no-dynamic-require": "error", |
164 | | - "import/no-named-as-default": "off", |
165 | | - "import/no-named-as-default-member": "off", |
166 | | - "import/no-self-import": "error", |
167 | | - "import/no-unused-modules": "off", |
168 | | - "import/no-unresolved": "off", |
169 | | - "import/no-useless-path-segments": "error", |
170 | | - "import/order": [ |
| 152 | + "import-x/consistent-type-specifier-style": ["error", "prefer-top-level"], |
| 153 | + "import-x/default": "off", |
| 154 | + "import-x/extensions": "off", |
| 155 | + "import-x/named": "off", |
| 156 | + "import-x/namespace": "off", |
| 157 | + "import-x/newline-after-import": "warn", |
| 158 | + "import-x/no-absolute-path": "error", |
| 159 | + "import-x/no-cycle": "off", |
| 160 | + "import-x/no-deprecated": "off", |
| 161 | + "import-x/no-default-export": "error", |
| 162 | + "import-x/no-duplicates": ["error", { "prefer-inline": false }], |
| 163 | + "import-x/no-dynamic-require": "error", |
| 164 | + "import-x/no-named-as-default": "off", |
| 165 | + "import-x/no-named-as-default-member": "off", |
| 166 | + "import-x/no-self-import": "error", |
| 167 | + "import-x/no-unused-modules": "off", |
| 168 | + "import-x/no-unresolved": "off", |
| 169 | + "import-x/no-useless-path-segments": "error", |
| 170 | + "import-x/order": [ |
171 | 171 | "warn", |
172 | 172 | { |
173 | 173 | "alphabetize": { |
|
281 | 281 | "@typescript-eslint/unified-signatures": ["error", { "ignoreDifferentlyNamedParameters": true }] |
282 | 282 | }, |
283 | 283 | "settings": { |
284 | | - "import/parsers": { |
| 284 | + "import-x/extensions": [".ts", ".tsx"], |
| 285 | + "import-x/parsers": { |
285 | 286 | "@typescript-eslint/parser": [".ts", ".tsx"] |
286 | 287 | }, |
287 | | - "import/resolver": { |
| 288 | + "import-x/resolver": { |
288 | 289 | "typescript": { |
289 | 290 | "alwaysTryTypes": true // always try to resolve types under `<root>@types` directory even it doesn't contain any source code, like `@types/unist` |
290 | 291 | } |
|
0 commit comments