|
1 | 1 | module.exports = {
|
2 | 2 | env: {
|
3 | 3 | browser: true,
|
4 |
| - es6: true, |
| 4 | + es2021: true, |
5 | 5 | jest: true,
|
6 | 6 | node: true,
|
7 | 7 | },
|
8 | 8 | extends: [
|
9 |
| - 'plugin:@typescript-eslint/recommended', |
10 | 9 | 'plugin:react/recommended',
|
| 10 | + 'standard', |
| 11 | + 'plugin:@typescript-eslint/recommended', |
11 | 12 | 'plugin:jsx-a11y/recommended',
|
12 | 13 | ],
|
13 |
| - overrides: [], |
| 14 | + parser: '@typescript-eslint/parser', |
14 | 15 | parserOptions: {
|
15 |
| - ecmaVersion: 2020, |
| 16 | + ecmaFeatures: { |
| 17 | + jsx: true, |
| 18 | + }, |
| 19 | + ecmaVersion: 'latest', |
16 | 20 | sourceType: 'module',
|
17 | 21 | },
|
18 |
| - parser: '@typescript-eslint/parser', |
19 | 22 | plugins: [
|
20 |
| - '@typescript-eslint', |
21 | 23 | 'react',
|
22 | 24 | 'react-hooks',
|
23 |
| - 'jest', |
24 |
| - 'jsx-a11y', |
| 25 | + '@typescript-eslint', |
25 | 26 | ],
|
26 | 27 | rules: {
|
27 |
| - '@typescript-eslint/no-unused-vars': 'error', |
28 |
| - '@typescript-eslint/no-use-before-define': 'off', |
29 | 28 | 'comma-dangle': ['error', {
|
30 | 29 | arrays: 'always-multiline',
|
31 | 30 | exports: 'always-multiline',
|
32 | 31 | functions: 'ignore',
|
33 | 32 | imports: 'always-multiline',
|
34 | 33 | objects: 'always-multiline',
|
35 | 34 | }],
|
36 |
| - curly: ['error', 'all'], |
37 |
| - eqeqeq: ['error', 'always', { null: 'ignore' }], |
38 |
| - 'eol-last': 'error', |
39 |
| - indent: ['error', 2, { 'SwitchCase': 1 }], |
40 |
| - 'jsx-quotes': ['error', 'prefer-double'], |
41 |
| - 'jsx-a11y/no-onchange': 'off', // https://github.com/evcohen/eslint-plugin-jsx-a11y/issues/398 |
42 |
| - 'keyword-spacing': 'error', |
43 |
| - 'linebreak-style': ['error', 'unix'], |
44 |
| - 'max-len': [ |
45 |
| - 'error', |
46 |
| - { |
47 |
| - code: 80, |
48 |
| - ignoreComments: true, |
49 |
| - ignoreTemplateLiterals: true, |
50 |
| - ignoreStrings: true, |
51 |
| - }, |
52 |
| - ], |
53 |
| - 'no-trailing-spaces': 'error', |
54 |
| - 'no-use-before-define': ['error', { |
55 |
| - functions: false, |
56 |
| - classes: true, |
57 |
| - variables: false, |
58 |
| - }], |
59 |
| - 'object-curly-spacing': ['error', 'always'], |
60 |
| - quotes: ['error', 'single', { allowTemplateLiterals: true }], |
61 | 35 | 'react-hooks/exhaustive-deps': 'error',
|
62 | 36 | 'react-hooks/rules-of-hooks': 'error',
|
63 |
| - 'react/jsx-closing-bracket-location': ['error', 'line-aligned'], |
64 |
| - 'react/jsx-curly-spacing': ['error', { children: true }], |
65 |
| - 'react/jsx-no-undef': 'error', |
66 |
| - 'react/jsx-uses-react': 'error', |
67 |
| - 'react/jsx-uses-vars': 'error', |
68 |
| - semi: ['error', 'never'], |
69 |
| - 'space-in-parens': ['error', 'never'], |
70 |
| - 'space-infix-ops': ['error'], |
71 |
| - 'no-use-before-define': 'off', |
72 |
| - '@typescript-eslint/no-use-before-define': ['error'], |
| 37 | + 'react/prop-types': 0, |
| 38 | + 'space-before-function-paren': 'off', |
| 39 | + 'spaced-comment': 'off', |
73 | 40 | },
|
74 | 41 | settings: {
|
75 | 42 | react: {
|
76 | 43 | version: 'detect',
|
77 | 44 | },
|
78 | 45 | },
|
79 |
| - overrides: [ |
80 |
| - { |
81 |
| - files: ['*.js', '*.jsx'], |
82 |
| - rules: { |
83 |
| - '@typescript-eslint/explicit-function-return-type': 'off', |
84 |
| - '@typescript-eslint/explicit-module-boundary-types': 'off', |
85 |
| - '@typescript-eslint/no-var-requires': 'off', |
86 |
| - }, |
87 |
| - }, |
88 |
| - ], |
89 | 46 | }
|
0 commit comments