|
1 | 1 | module.exports = {
|
2 |
| - parser: '@typescript-eslint/parser', |
3 |
| - parserOptions: { |
4 |
| - ecmaFeatures: { |
5 |
| - jsx: true, |
6 |
| - }, |
7 |
| - }, |
8 |
| - extends: [ |
9 |
| - 'airbnb', |
10 |
| - 'plugin:react/recommended', |
11 |
| - 'plugin:@typescript-eslint/recommended', |
12 |
| - 'prettier/@typescript-eslint', |
13 |
| - 'prettier/react', |
14 |
| - 'plugin:prettier/recommended', |
15 |
| - 'plugin:testing-library/recommended', |
16 |
| - 'plugin:jsx-a11y/recommended', |
17 |
| - ], |
18 |
| - settings: { |
19 |
| - react: { |
20 |
| - version: 'detect', |
21 |
| - }, |
22 |
| - 'import/resolver': { |
23 |
| - typescript: {}, |
24 |
| - }, |
25 |
| - }, |
| 2 | + extends: ['airbnb', 'plugin:prettier/recommended'], |
26 | 3 | env: {
|
27 | 4 | browser: true,
|
28 | 5 | node: true,
|
29 |
| - jest: true, |
30 |
| - }, |
31 |
| - rules: { |
32 |
| - 'react/no-unused-prop-types': 'off', |
33 |
| - 'react/require-default-props': 'off', |
34 |
| - 'react/jsx-filename-extension': 'off', |
35 |
| - 'react-hooks/rules-of-hooks': 'error', |
36 |
| - 'react-hooks/exhaustive-deps': 'warn', |
37 |
| - 'import/prefer-default-export': 'off', |
38 |
| - 'import/extensions': 'off', |
39 |
| - 'consistent-return': 'off', |
40 |
| - 'react/no-danger': 'off', |
41 | 6 | },
|
42 |
| - plugins: ['@typescript-eslint', 'react-hooks'], |
43 | 7 | overrides: [
|
44 | 8 | {
|
45 |
| - files: ['**/*.js'], |
| 9 | + files: ['**/*.tsx'], |
| 10 | + plugins: ['@typescript-eslint', 'react-hooks'], |
| 11 | + parser: '@typescript-eslint/parser', |
| 12 | + parserOptions: { |
| 13 | + ecmaFeatures: { |
| 14 | + jsx: true, |
| 15 | + }, |
| 16 | + }, |
| 17 | + extends: [ |
| 18 | + 'plugin:@typescript-eslint/recommended', |
| 19 | + 'airbnb/hooks', |
| 20 | + 'plugin:react/recommended', |
| 21 | + 'plugin:jsx-a11y/recommended', |
| 22 | + 'plugin:prettier/recommended', |
| 23 | + ], |
| 24 | + settings: { |
| 25 | + react: { |
| 26 | + version: 'detect', |
| 27 | + }, |
| 28 | + 'import/resolver': { |
| 29 | + typescript: {}, |
| 30 | + }, |
| 31 | + }, |
46 | 32 | rules: {
|
47 |
| - '@typescript-eslint/no-var-requires': 'off', |
| 33 | + 'react/no-unused-prop-types': 'off', |
| 34 | + 'react/require-default-props': 'off', |
| 35 | + 'react/jsx-filename-extension': 'off', |
| 36 | + 'react-hooks/rules-of-hooks': 'error', |
| 37 | + 'react-hooks/exhaustive-deps': 'warn', |
| 38 | + 'no-use-before-define': 'off', |
| 39 | + '@typescript-eslint/no-use-before-define': 'warn', |
| 40 | + 'import/extensions': 'off', |
| 41 | + 'consistent-return': 'off', |
| 42 | + }, |
| 43 | + }, |
| 44 | + { |
| 45 | + files: ['**/*.ts'], |
| 46 | + plugins: ['@typescript-eslint', 'react-hooks'], |
| 47 | + parser: '@typescript-eslint/parser', |
| 48 | + settings: { |
| 49 | + 'import/resolver': { |
| 50 | + typescript: {}, |
| 51 | + }, |
| 52 | + }, |
| 53 | + extends: [ |
| 54 | + 'plugin:@typescript-eslint/recommended', |
| 55 | + 'plugin:prettier/recommended', |
| 56 | + ], |
| 57 | + rules: { |
| 58 | + 'no-use-before-define': 'off', |
| 59 | + '@typescript-eslint/no-use-before-define': 'warn', |
| 60 | + 'import/prefer-default-export': 'off', |
| 61 | + 'import/extensions': 'off', |
| 62 | + }, |
| 63 | + }, |
| 64 | + { |
| 65 | + files: ['test-processor.js', 'test-setup.js', 'test/**'], |
| 66 | + extends: ['plugin:testing-library/recommended'], |
| 67 | + env: { |
| 68 | + jest: true, |
48 | 69 | },
|
49 | 70 | },
|
50 | 71 | ],
|
|
0 commit comments