|
1 | 1 | module.exports = { |
2 | | - parserOptions: { |
3 | | - project: './tsconfig.json', |
4 | | - }, |
5 | | - extends: [ |
6 | | - 'airbnb', |
7 | | - 'airbnb-typescript', |
8 | | - 'airbnb/hooks', |
9 | | - 'plugin:jest/recommended', |
10 | | - 'plugin:jest-dom/recommended', |
11 | | - 'plugin:testing-library/react', |
12 | | - 'plugin:@typescript-eslint/recommended', |
13 | | - 'plugin:@typescript-eslint/recommended-requiring-type-checking', |
14 | | - 'prettier', |
| 2 | + parserOptions: { |
| 3 | + project: './tsconfig.json', |
| 4 | + }, |
| 5 | + extends: [ |
| 6 | + 'airbnb', |
| 7 | + 'airbnb-typescript', |
| 8 | + 'airbnb/hooks', |
| 9 | + 'plugin:jest/recommended', |
| 10 | + 'plugin:jest-dom/recommended', |
| 11 | + 'plugin:testing-library/react', |
| 12 | + 'plugin:@typescript-eslint/recommended', |
| 13 | + 'plugin:@typescript-eslint/recommended-requiring-type-checking', |
| 14 | + 'prettier', |
| 15 | + ], |
| 16 | + plugins: ['@typescript-eslint', 'jest', 'jest-dom', 'testing-library'], |
| 17 | + ignorePatterns: ['*.js', '*.cjs', 'dist/'], |
| 18 | + settings: { |
| 19 | + 'testing-library/custom-renders': 'off', |
| 20 | + }, |
| 21 | + rules: { |
| 22 | + 'no-plusplus': 'off', |
| 23 | + 'no-restricted-syntax': [ |
| 24 | + 'error', |
| 25 | + // Options from https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/style.js |
| 26 | + // with for-of removed |
| 27 | + { |
| 28 | + selector: 'ForInStatement', |
| 29 | + message: |
| 30 | + 'for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array.', |
| 31 | + }, |
| 32 | + { |
| 33 | + selector: 'LabeledStatement', |
| 34 | + message: |
| 35 | + 'Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand.', |
| 36 | + }, |
| 37 | + { |
| 38 | + selector: 'WithStatement', |
| 39 | + message: |
| 40 | + '`with` is disallowed in strict mode because it makes code impossible to predict and optimize.', |
| 41 | + }, |
15 | 42 | ], |
16 | | - plugins: ['@typescript-eslint', 'jest', 'jest-dom', 'testing-library'], |
17 | | - ignorePatterns: ['*.js', '*.cjs', 'dist/'], |
18 | | - settings: { |
19 | | - 'testing-library/custom-renders': 'off', |
20 | | - }, |
21 | | - rules: { |
22 | | - 'no-plusplus': 'off', |
23 | | - 'no-restricted-syntax': [ |
24 | | - 'error', |
25 | | - // Options from https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/style.js |
26 | | - // with for-of removed |
27 | | - { |
28 | | - selector: 'ForInStatement', |
29 | | - message: |
30 | | - 'for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array.', |
31 | | - }, |
32 | | - { |
33 | | - selector: 'LabeledStatement', |
34 | | - message: |
35 | | - 'Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand.', |
36 | | - }, |
37 | | - { |
38 | | - selector: 'WithStatement', |
39 | | - message: |
40 | | - '`with` is disallowed in strict mode because it makes code impossible to predict and optimize.', |
41 | | - }, |
42 | | - ], |
43 | 43 |
|
44 | | - 'import/no-extraneous-dependencies': [ |
45 | | - 'error', |
46 | | - { |
47 | | - devDependencies: ['src/__stories__/**/*', 'src/__tests__/**/*'], |
48 | | - }, |
49 | | - ], |
50 | | - 'import/prefer-default-export': 'off', |
| 44 | + 'import/no-extraneous-dependencies': [ |
| 45 | + 'error', |
| 46 | + { |
| 47 | + devDependencies: ['src/__stories__/**/*', 'src/__tests__/**/*'], |
| 48 | + }, |
| 49 | + ], |
| 50 | + 'import/prefer-default-export': 'off', |
51 | 51 |
|
52 | | - 'react/require-default-props': 'off', |
53 | | - 'react/function-component-definition': 'off', |
| 52 | + 'react/require-default-props': 'off', |
| 53 | + 'react/function-component-definition': 'off', |
54 | 54 |
|
55 | | - 'testing-library/no-node-access': 'off', |
56 | | - }, |
57 | | -} |
| 55 | + 'testing-library/no-node-access': 'off', |
| 56 | + }, |
| 57 | +}; |
0 commit comments