|
1 | 1 | module.exports = { |
2 | | - env: { |
3 | | - node: true, |
4 | | - }, |
5 | | - parser: '@typescript-eslint/parser', |
6 | | - plugins: [ |
7 | | - '@typescript-eslint', |
8 | | - 'import', |
9 | | - 'sort-imports-es6-autofix', |
10 | | - ], |
11 | | - extends: [ |
12 | | - 'eslint:recommended', |
13 | | - 'plugin:@typescript-eslint/recommended', |
14 | | - 'plugin:import/recommended', |
15 | | - 'plugin:import/typescript', |
16 | | - ], |
17 | | - rules: { |
18 | | - indent: [2, 2, { SwitchCase: 1 }], |
19 | | - quotes: [2, 'single'], |
20 | | - semi: [1, 'always'], |
21 | | - 'no-trailing-spaces': [2], |
22 | | - 'quote-props': [2, 'as-needed'], |
23 | | - 'eol-last': [2, 'always'], |
24 | | - 'object-curly-spacing': [2, 'always'], |
25 | | - 'comma-dangle': [2, { |
26 | | - arrays: 'always-multiline', |
27 | | - objects: 'always-multiline', |
28 | | - imports: 'always-multiline', |
29 | | - exports: 'always-multiline', |
30 | | - functions: 'only-multiline', |
31 | | - }], |
32 | | - |
33 | | - /* ---------- turn off ---------- */ |
34 | | - '@typescript-eslint/no-extra-semi': 0, |
35 | | - '@typescript-eslint/no-use-before-define': 0, |
36 | | - '@typescript-eslint/explicit-member-accessibility': 0, |
37 | | - '@typescript-eslint/naming-convention': 0, |
38 | | - '@typescript-eslint/no-explicit-any': 0, // any is sometimes unavoidable |
39 | | - '@typescript-eslint/consistent-type-definitions': 0, // can use Type and Interface |
40 | | - '@typescript-eslint/explicit-function-return-type': 0, // type inference on return type is useful |
41 | | - '@typescript-eslint/no-parameter-properties': 0, |
42 | | - '@typescript-eslint/typedef': 0, |
43 | | - 'no-unused-expressions': 0, // short ciucuit if |
44 | | - 'max-lines': 0, |
45 | | - '@typescript-eslint/no-empty-function': 'off', |
46 | | - '@typescript-eslint/explicit-module-boundary-types': 'off', |
47 | | - 'sort-imports-es6-autofix/sort-imports-es6': 'warn', |
48 | | - '@typescript-eslint/ban-ts-comment': 'off', |
49 | | - 'no-useless-escape': 'off', |
50 | | - '@typescript-eslint/no-non-null-asserted-optional-chain': 'off', |
51 | | - 'import/no-named-as-default-member': 'off', |
52 | | - 'import/no-named-as-default': 'off', |
53 | | - '@typescript-eslint/no-non-null-assertion': 'off', |
54 | | - '@typescript-eslint/no-unused-vars': [ |
55 | | - 'warn', |
56 | | - { |
57 | | - argsIgnorePattern: '^_', |
58 | | - varsIgnorePattern: '^_', |
59 | | - caughtErrorsIgnorePattern: '^_', |
60 | | - }, |
61 | | - ], |
62 | | - }, |
| 2 | + root: true, |
| 3 | + extends: ['../../.eslintrc.js'], |
63 | 4 | }; |
0 commit comments