|
1 | 1 | module.exports = { |
2 | | - overrides: [ |
3 | | - { |
4 | | - files: '**/*.ts', |
5 | | - plugins: ['typescript'], |
6 | | - parser: 'typescript-eslint-parser', |
7 | | - settings: { |
8 | | - 'import/resolver': { |
9 | | - node: { |
10 | | - extensions: ['.js', '.ts', '.json'], |
11 | | - }, |
| 2 | + plugins: ['typescript'], |
| 3 | + parser: 'typescript-eslint-parser', |
| 4 | + settings: { |
| 5 | + 'import/resolver': { |
| 6 | + node: { |
| 7 | + extensions: ['.js', '.ts', '.json'], |
| 8 | + }, |
| 9 | + }, |
| 10 | + 'import/extensions': ['.js', '.ts'], |
| 11 | + }, |
| 12 | + rules: { |
| 13 | + 'no-undef': 'off', // conflicts with typescript |
| 14 | + 'no-unused-vars': 'off', // conflicts with typescript |
| 15 | + 'no-useless-constructor': 'off', // conflicts with typescript |
| 16 | + 'spaced-comment': [ |
| 17 | + 'error', |
| 18 | + 'always', |
| 19 | + { |
| 20 | + line: { |
| 21 | + exceptions: ['-', '+'], |
| 22 | + markers: ['=', '!', '/'], // space here to support sprockets directives |
| 23 | + }, |
| 24 | + block: { |
| 25 | + exceptions: ['-', '+'], |
| 26 | + markers: ['=', '!'], // space here to support sprockets directives |
| 27 | + balanced: true, |
12 | 28 | }, |
13 | | - 'import/extensions': ['.js', '.ts'], |
14 | 29 | }, |
15 | | - rules: { |
16 | | - 'no-undef': 'off', // conflicts with typescript |
17 | | - 'no-unused-vars': 'off', // conflicts with typescript |
18 | | - 'no-useless-constructor': 'off', // conflicts with typescript |
19 | | - 'spaced-comment': [ |
20 | | - 'error', |
21 | | - 'always', |
22 | | - { |
23 | | - line: { |
24 | | - exceptions: ['-', '+'], |
25 | | - markers: ['=', '!', '/'], // space here to support sprockets directives |
26 | | - }, |
27 | | - block: { |
28 | | - exceptions: ['-', '+'], |
29 | | - markers: ['=', '!'], // space here to support sprockets directives |
30 | | - balanced: true, |
31 | | - }, |
32 | | - }, |
33 | | - ], |
34 | | - strict: 'off', // conflicts with typescript |
35 | | - // https://github.com/benmosher/eslint-plugin-import |
36 | | - 'import/extensions': [ |
37 | | - 'error', |
38 | | - 'always', |
39 | | - { |
40 | | - js: 'never', |
41 | | - ts: 'never', |
42 | | - }, |
43 | | - ], |
44 | | - 'import/no-named-as-default-member': 'off', // conflicts with typescript |
45 | | - 'import/no-named-as-default': 'off', // conflicts with typescript |
46 | | - // https://github.com/not-an-aardvark/eslint-plugin-prettier |
47 | | - 'prettier/prettier': [ |
48 | | - 'error', |
49 | | - { |
50 | | - useTabs: false, |
51 | | - printWidth: 80, |
52 | | - tabWidth: 2, |
53 | | - singleQuote: true, |
54 | | - trailingComma: 'all', |
55 | | - bracketSpacing: false, |
56 | | - jsxBracketSameLine: false, |
57 | | - parser: 'typescript', |
58 | | - semi: true, |
59 | | - }, |
60 | | - ], |
61 | | - // https://github.com/nzakas/eslint-plugin-typescript |
62 | | - 'typescript/explicit-member-accessibility': 'error', |
63 | | - 'typescript/interface-name-prefix': 'error', |
64 | | - 'typescript/no-angle-bracket-type-assertion': 'error', |
65 | | - 'typescript/no-explicit-any': 'error', |
66 | | - 'typescript/no-namespace': ['error', {allowDefinitionFiles: true}], |
67 | | - 'typescript/no-triple-slash-reference': 'error', |
68 | | - 'typescript/no-unused-vars': 'error', |
69 | | - 'typescript/prefer-namespace-keyword': 'error', |
70 | | - 'typescript/type-annotation-spacing': 'off', |
| 30 | + ], |
| 31 | + strict: 'off', // conflicts with typescript |
| 32 | + // https://github.com/benmosher/eslint-plugin-import |
| 33 | + 'import/extensions': [ |
| 34 | + 'error', |
| 35 | + 'always', |
| 36 | + { |
| 37 | + js: 'never', |
| 38 | + ts: 'never', |
71 | 39 | }, |
72 | | - }, |
73 | | - ], |
| 40 | + ], |
| 41 | + 'import/no-named-as-default-member': 'off', // conflicts with typescript |
| 42 | + 'import/no-named-as-default': 'off', // conflicts with typescript |
| 43 | + // https://github.com/not-an-aardvark/eslint-plugin-prettier |
| 44 | + 'prettier/prettier': [ |
| 45 | + 'error', |
| 46 | + { |
| 47 | + useTabs: false, |
| 48 | + printWidth: 80, |
| 49 | + tabWidth: 2, |
| 50 | + singleQuote: true, |
| 51 | + trailingComma: 'all', |
| 52 | + bracketSpacing: false, |
| 53 | + jsxBracketSameLine: false, |
| 54 | + parser: 'typescript', |
| 55 | + semi: true, |
| 56 | + }, |
| 57 | + ], |
| 58 | + // https://github.com/nzakas/eslint-plugin-typescript |
| 59 | + 'typescript/explicit-member-accessibility': 'error', |
| 60 | + 'typescript/interface-name-prefix': 'error', |
| 61 | + 'typescript/no-angle-bracket-type-assertion': 'error', |
| 62 | + 'typescript/no-explicit-any': 'error', |
| 63 | + 'typescript/no-namespace': ['error', {allowDefinitionFiles: true}], |
| 64 | + 'typescript/no-triple-slash-reference': 'error', |
| 65 | + 'typescript/no-unused-vars': 'error', |
| 66 | + 'typescript/prefer-namespace-keyword': 'error', |
| 67 | + 'typescript/type-annotation-spacing': 'off', |
| 68 | + }, |
74 | 69 | }; |
0 commit comments