|
1 | 1 | module.exports = {
|
2 |
| - root: true, |
3 |
| - env: { |
4 |
| - node: true, |
5 |
| - browser: true, |
6 |
| - es6: true, |
7 |
| - }, |
8 |
| - extends: [ |
9 |
| - 'eslint:recommended', |
10 |
| - 'plugin:react/recommended', |
11 |
| - 'plugin:import/recommended', |
12 |
| - 'plugin:import/typescript', |
13 |
| - ], |
14 |
| - parserOptions: { |
15 |
| - ecmaVersion: 2020, |
16 |
| - sourceType: 'module', |
17 |
| - ecmaFeatures: { |
18 |
| - jsx: true, |
19 |
| - }, |
20 |
| - }, |
21 |
| - settings: { |
22 |
| - 'import/resolver': { |
23 |
| - node: { |
24 |
| - extensions: ['.js', '.jsx', '.ts', '.tsx', '.d.ts'], |
25 |
| - paths: ['node_modules/', 'node_modules/@types/'], |
26 |
| - }, |
27 |
| - typescript: { |
28 |
| - alwaysTryTypes: true, // always try to resolve types under `<root>@types` directory even it doesn't contain any source code, like `@types/unist` |
29 |
| - project: 'packages/*/tsconfig.json', |
30 |
| - }, |
31 |
| - }, |
32 |
| - 'import/parsers': { |
33 |
| - '@typescript-eslint/parser': ['.ts', '.tsx'], |
34 |
| - }, |
35 |
| - }, |
36 |
| - rules: { |
37 |
| - 'import/no-extraneous-dependencies': ['warn'], |
38 |
| - semi: ['error', 'never'], |
39 |
| - 'react/react-in-jsx-scope': 'off', |
40 |
| - 'react/prop-types': 'off', |
41 |
| - }, |
42 |
| - overrides: [ |
43 |
| - { |
44 |
| - files: ['**.ts', '**.tsx'], |
45 |
| - parser: '@typescript-eslint/parser', |
46 |
| - extends: [ |
47 |
| - 'plugin:@typescript-eslint/recommended', |
48 |
| - 'plugin:import/errors', |
49 |
| - 'plugin:import/warnings', |
50 |
| - 'plugin:import/typescript', |
51 |
| - ], |
52 |
| - parserOptions: { |
53 |
| - ecmaVersion: 2018, |
54 |
| - sourceType: 'module', |
55 |
| - ecmaFeatures: { |
56 |
| - jsx: true, |
57 |
| - }, |
58 |
| - }, |
59 |
| - plugins: ['@typescript-eslint', 'import'], |
60 |
| - rules: { |
61 |
| - 'no-dupe-class-members': 'off', |
62 |
| - 'no-undef': 'off', |
63 |
| - // TODO: remove this eventually |
64 |
| - '@typescript-eslint/ban-ts-comment': 'off', |
65 |
| - '@typescript-eslint/no-empty-function': 'off', |
66 |
| - }, |
67 |
| - }, |
68 |
| - ], |
| 2 | + root: true, |
| 3 | + env: { |
| 4 | + node: true, |
| 5 | + browser: true, |
| 6 | + es6: true, |
| 7 | + }, |
| 8 | + extends: [ |
| 9 | + 'eslint:recommended', |
| 10 | + 'plugin:react/recommended', |
| 11 | + 'plugin:import/recommended', |
| 12 | + 'plugin:import/typescript', |
| 13 | + ], |
| 14 | + parserOptions: { |
| 15 | + ecmaVersion: 2022, |
| 16 | + sourceType: 'module', |
| 17 | + ecmaFeatures: { |
| 18 | + jsx: true, |
| 19 | + }, |
| 20 | + }, |
| 21 | + settings: { |
| 22 | + 'import/resolver': { |
| 23 | + node: { |
| 24 | + extensions: ['.js', '.jsx', '.ts', '.tsx', '.d.ts'], |
| 25 | + paths: ['node_modules/', 'node_modules/@types/'], |
| 26 | + }, |
| 27 | + typescript: { |
| 28 | + alwaysTryTypes: true, // always try to resolve types under `<root>@types` directory even it doesn't contain any source code, like `@types/unist` |
| 29 | + project: 'packages/*/tsconfig.json', |
| 30 | + }, |
| 31 | + }, |
| 32 | + 'import/parsers': { |
| 33 | + '@typescript-eslint/parser': ['.ts', '.tsx'], |
| 34 | + }, |
| 35 | + }, |
| 36 | + rules: { |
| 37 | + 'import/no-extraneous-dependencies': ['warn'], |
| 38 | + semi: ['error', 'never'], |
| 39 | + 'react/react-in-jsx-scope': 'off', |
| 40 | + 'react/prop-types': 'off', |
| 41 | + }, |
| 42 | + overrides: [ |
| 43 | + { |
| 44 | + files: ['**.ts', '**.tsx'], |
| 45 | + parser: '@typescript-eslint/parser', |
| 46 | + extends: [ |
| 47 | + 'plugin:@typescript-eslint/recommended', |
| 48 | + 'plugin:import/errors', |
| 49 | + 'plugin:import/warnings', |
| 50 | + 'plugin:import/typescript', |
| 51 | + ], |
| 52 | + parserOptions: { |
| 53 | + ecmaVersion: 2018, |
| 54 | + sourceType: 'module', |
| 55 | + ecmaFeatures: { |
| 56 | + jsx: true, |
| 57 | + }, |
| 58 | + }, |
| 59 | + plugins: ['@typescript-eslint', 'import'], |
| 60 | + rules: { |
| 61 | + 'no-dupe-class-members': 'off', |
| 62 | + 'no-undef': 'off', |
| 63 | + // TODO: remove this eventually |
| 64 | + '@typescript-eslint/ban-ts-comment': 'off', |
| 65 | + '@typescript-eslint/no-empty-function': 'off', |
| 66 | + }, |
| 67 | + }, |
| 68 | + ], |
69 | 69 | }
|
0 commit comments