|
1 | 1 | module.exports = {
|
2 |
| - extends: [ |
3 |
| - 'eslint:recommended', |
4 |
| - 'plugin:@typescript-eslint/eslint-recommended', |
5 |
| - 'plugin:@typescript-eslint/recommended', |
6 |
| - 'plugin:prettier/recommended', |
7 |
| - 'plugin:react/recommended' |
8 |
| - ], |
9 |
| - parser: '@typescript-eslint/parser', |
10 |
| - parserOptions: { |
11 |
| - project: 'tsconfig.json', |
12 |
| - sourceType: 'module' |
13 |
| - }, |
14 |
| - plugins: ['@typescript-eslint'], |
15 |
| - rules: { |
16 |
| - '@typescript-eslint/explicit-function-return-type': 'off', |
17 |
| - "@typescript-eslint/naming-convention": [ |
18 |
| - "error", |
19 |
| - { |
20 |
| - "selector": "interface", |
21 |
| - "format": ["PascalCase"], |
22 |
| - "custom": { |
23 |
| - "regex": "^I[A-Z]", |
24 |
| - "match": true |
25 |
| - } |
| 2 | + extends: [ |
| 3 | + 'eslint:recommended', |
| 4 | + 'plugin:@typescript-eslint/eslint-recommended', |
| 5 | + 'plugin:@typescript-eslint/recommended', |
| 6 | + 'plugin:react/recommended' |
| 7 | + ], |
| 8 | + parser: '@typescript-eslint/parser', |
| 9 | + parserOptions: { |
| 10 | + project: 'tsconfig.test.json', |
| 11 | + sourceType: 'module' |
| 12 | + }, |
| 13 | + plugins: ['@typescript-eslint'], |
| 14 | + rules: { |
| 15 | + '@typescript-eslint/explicit-function-return-type': 'off', |
| 16 | + '@typescript-eslint/naming-convention': [ |
| 17 | + 'error', |
| 18 | + { |
| 19 | + selector: 'interface', |
| 20 | + format: ['PascalCase'], |
| 21 | + custom: { |
| 22 | + regex: '^I[A-Z]', |
| 23 | + match: true |
26 | 24 | }
|
27 |
| - ], |
28 |
| - '@typescript-eslint/no-unused-vars': ['warn', { args: 'none' }], |
29 |
| - '@typescript-eslint/no-explicit-any': 'off', |
30 |
| - '@typescript-eslint/no-namespace': 'off', |
31 |
| - '@typescript-eslint/no-this-alias': [ |
32 |
| - 'error', |
33 |
| - { |
34 |
| - allowedNames: ['self'], // Allow `const self = this` |
35 |
| - }, |
36 |
| - ], |
37 |
| - '@typescript-eslint/no-use-before-define': 'off', |
38 |
| - '@typescript-eslint/quotes': [ |
39 |
| - 'error', |
40 |
| - 'single', |
41 |
| - { avoidEscape: true, allowTemplateLiterals: false } |
42 |
| - ], |
43 |
| - curly: ['error', 'all'], |
44 |
| - eqeqeq: 'error', |
45 |
| - 'prefer-arrow-callback': 'error' |
46 |
| - }, |
47 |
| - settings: { |
48 |
| - react: { |
49 |
| - version: 'detect' |
50 | 25 | }
|
| 26 | + ], |
| 27 | + '@typescript-eslint/no-unused-vars': ['warn', { args: 'none' }], |
| 28 | + '@typescript-eslint/no-explicit-any': 'off', |
| 29 | + '@typescript-eslint/no-namespace': 'off', |
| 30 | + '@typescript-eslint/no-this-alias': [ |
| 31 | + 'error', |
| 32 | + { |
| 33 | + allowedNames: ['self'] // Allow `const self = this` |
| 34 | + } |
| 35 | + ], |
| 36 | + '@typescript-eslint/no-use-before-define': 'off', |
| 37 | + '@typescript-eslint/quotes': [ |
| 38 | + 'error', |
| 39 | + 'single', |
| 40 | + { avoidEscape: true, allowTemplateLiterals: false } |
| 41 | + ], |
| 42 | + curly: ['error', 'all'], |
| 43 | + eqeqeq: 'error', |
| 44 | + 'prefer-arrow-callback': 'error' |
| 45 | + }, |
| 46 | + settings: { |
| 47 | + react: { |
| 48 | + version: 'detect' |
51 | 49 | }
|
52 |
| - }; |
| 50 | + } |
| 51 | +}; |
0 commit comments