|
1 | 1 | module.exports = {
|
2 |
| - extends: [ |
3 |
| - 'eslint:recommended', |
4 |
| - 'plugin:prettier/recommended', |
5 |
| - 'plugin:@typescript-eslint/recommended', |
6 |
| - 'plugin:@typescript-eslint/recommended-requiring-type-checking', |
7 |
| - 'prettier/@typescript-eslint', |
8 |
| - ], |
| 2 | + extends: ['eslint:recommended', 'plugin:prettier/recommended'], |
9 | 3 | env: {
|
10 |
| - browser: true, |
11 |
| - amd: true, |
| 4 | + es6: true, |
12 | 5 | node: true,
|
13 |
| - mocha: true, |
14 | 6 | },
|
15 |
| - parser: '@typescript-eslint/parser', |
16 | 7 | parserOptions: {
|
17 |
| - ecmaVersion: 6, |
18 | 8 | sourceType: 'module',
|
19 |
| - project: './tsconfig.lint.json', |
20 |
| - warnOnUnsupportedTypeScriptVersion: false, |
21 | 9 | },
|
22 |
| - plugins: ['@typescript-eslint'], |
23 |
| - rules: { |
24 |
| - 'arrow-body-style': ['error'], |
25 |
| - 'no-template-curly-in-string': 'error', |
26 |
| - 'no-useless-concat': 'error', |
27 |
| - 'no-useless-escape': 'off', |
28 |
| - 'no-var': 'error', |
29 |
| - 'one-var': ['error', 'never'], |
30 |
| - 'prefer-arrow-callback': ['error', { allowNamedFunctions: true }], |
31 |
| - 'prefer-const': 'error', |
32 |
| - 'prefer-template': 'error', |
33 |
| - quotes: ['error', 'single', { avoidEscape: true }], |
34 |
| - 'template-curly-spacing': 'error', |
35 |
| - 'template-tag-spacing': 'error', |
| 10 | + overrides: [ |
| 11 | + { |
| 12 | + files: ['**/*.ts'], |
| 13 | + extends: [ |
| 14 | + 'eslint:recommended', |
| 15 | + 'plugin:@typescript-eslint/recommended', |
| 16 | + 'plugin:@typescript-eslint/recommended-requiring-type-checking', |
| 17 | + 'plugin:prettier/recommended', |
| 18 | + ], |
| 19 | + parser: '@typescript-eslint/parser', |
| 20 | + parserOptions: { |
| 21 | + ecmaVersion: 6, |
| 22 | + sourceType: 'module', |
| 23 | + project: './tsconfig.lint.json', |
| 24 | + warnOnUnsupportedTypeScriptVersion: false, |
| 25 | + }, |
| 26 | + plugins: ['@typescript-eslint'], |
| 27 | + rules: { |
| 28 | + 'arrow-body-style': ['error'], |
| 29 | + 'no-template-curly-in-string': 'error', |
| 30 | + 'no-useless-concat': 'error', |
| 31 | + 'no-useless-escape': 'off', |
| 32 | + 'no-var': 'error', |
| 33 | + 'one-var': ['error', 'never'], |
| 34 | + 'prefer-arrow-callback': ['error', { allowNamedFunctions: true }], |
| 35 | + 'prefer-const': 'error', |
| 36 | + 'prefer-template': 'error', |
| 37 | + 'template-curly-spacing': 'error', |
| 38 | + 'template-tag-spacing': 'error', |
| 39 | + quotes: ['error', 'single', { avoidEscape: true }], |
36 | 40 |
|
37 |
| - '@typescript-eslint/adjacent-overload-signatures': 'off', |
38 |
| - '@typescript-eslint/ban-ts-comment': 'off', |
39 |
| - '@typescript-eslint/no-unsafe-assignment': 'off', |
40 |
| - '@typescript-eslint/no-unsafe-call': 'off', |
41 |
| - '@typescript-eslint/no-unsafe-member-access': 'off', |
42 |
| - '@typescript-eslint/no-unused-vars': 'off', |
43 |
| - '@typescript-eslint/no-var-requires': 'off', |
44 |
| - '@typescript-eslint/restrict-template-expressions': 'off', |
45 |
| - }, |
| 41 | + '@typescript-eslint/adjacent-overload-signatures': 'off', |
| 42 | + '@typescript-eslint/ban-ts-comment': 'off', |
| 43 | + '@typescript-eslint/no-unsafe-assignment': 'off', |
| 44 | + '@typescript-eslint/no-unsafe-call': 'off', |
| 45 | + '@typescript-eslint/no-unsafe-member-access': 'off', |
| 46 | + '@typescript-eslint/no-unused-vars': 'off', |
| 47 | + '@typescript-eslint/no-var-requires': 'off', |
| 48 | + '@typescript-eslint/restrict-template-expressions': 'off', |
| 49 | + }, |
| 50 | + }, |
| 51 | + { |
| 52 | + files: ['**/*.spec.js'], |
| 53 | + env: { |
| 54 | + mocha: true, |
| 55 | + }, |
| 56 | + }, |
| 57 | + ], |
46 | 58 | }
|
0 commit comments