|
1 | 1 | // https://eslint.org/docs/user-guide/configuring |
2 | 2 |
|
3 | 3 | module.exports = { |
4 | | - root: true, |
5 | | - env: { |
6 | | - browser: true, |
7 | | - }, |
8 | | - extends: [ |
9 | | - 'airbnb-base', |
10 | | - ], |
11 | | - // add your custom rules here |
12 | | - rules: { |
13 | | - 'class-methods-use-this': 'off', |
14 | | - 'comma-dangle': ['error', { |
15 | | - 'arrays': 'always-multiline', |
16 | | - 'objects': 'always-multiline', |
17 | | - 'imports': 'always-multiline', |
18 | | - 'exports': 'always-multiline', |
19 | | - 'functions': 'never', |
20 | | - }], |
21 | | - 'indent': ['error', 4, { |
22 | | - SwitchCase: 1, |
23 | | - }], |
24 | | - 'no-duplicate-imports': 'error', |
25 | | - // risk only exist with semi-colon auto insertion. Not our case. |
26 | | - 'no-plusplus': 'off', |
27 | | - 'no-param-reassign': 'off', |
28 | | - 'no-underscore-dangle': ['error', { |
29 | | - 'allowAfterSuper': true, |
30 | | - 'allowAfterThis': true, |
31 | | - }], |
32 | | - 'prefer-destructuring': 'off', |
33 | | - // don't require .js extension when importing |
34 | | - 'import/extensions': ['error', 'always', { js: 'never' }], |
35 | | - // allow optionalDependencies |
36 | | - 'import/no-extraneous-dependencies': ['error', { |
37 | | - optionalDependencies: ['test/unit/index.js'], |
38 | | - }], |
39 | | - 'import/prefer-default-export': 'off', |
40 | | - // allow debugger during development |
41 | | - 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', |
42 | | - }, |
| 4 | + root: true, |
| 5 | + env: { |
| 6 | + browser: true, |
| 7 | + }, |
| 8 | + extends: [ |
| 9 | + 'airbnb-base', |
| 10 | + ], |
| 11 | + // add your custom rules here |
| 12 | + rules: { |
| 13 | + 'class-methods-use-this': 'off', |
| 14 | + 'comma-dangle': ['error', { |
| 15 | + arrays: 'always-multiline', |
| 16 | + objects: 'always-multiline', |
| 17 | + imports: 'always-multiline', |
| 18 | + exports: 'always-multiline', |
| 19 | + functions: 'never', |
| 20 | + }], |
| 21 | + indent: ['error', 2, { |
| 22 | + SwitchCase: 1, |
| 23 | + }], |
| 24 | + 'no-duplicate-imports': 'error', |
| 25 | + // risk only exist with semi-colon auto insertion. Not our case. |
| 26 | + 'no-plusplus': 'off', |
| 27 | + 'no-param-reassign': 'off', |
| 28 | + 'no-underscore-dangle': ['error', { |
| 29 | + allowAfterSuper: true, |
| 30 | + allowAfterThis: true, |
| 31 | + }], |
| 32 | + 'prefer-destructuring': 'off', |
| 33 | + // don't require .js extension when importing |
| 34 | + 'import/extensions': ['error', 'always', { js: 'never' }], |
| 35 | + // allow optionalDependencies |
| 36 | + 'import/no-extraneous-dependencies': ['error', { |
| 37 | + optionalDependencies: ['test/unit/index.js'], |
| 38 | + }], |
| 39 | + 'import/prefer-default-export': 'off', |
| 40 | + // allow debugger during development |
| 41 | + 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', |
| 42 | + }, |
43 | 43 | }; |
0 commit comments