|
1 | 1 | module.exports = { |
2 | | - extends: ['airbnb', 'airbnb/hooks', 'prettier'], |
3 | 2 | env: { |
4 | 3 | browser: true, |
5 | 4 | jest: true, |
6 | 5 | }, |
| 6 | + extends: ['airbnb', 'airbnb/hooks', 'prettier'], |
7 | 7 | rules: { |
8 | | - 'sort-imports': [ |
9 | | - 'error', |
10 | | - { |
11 | | - ignoreDeclarationSort: true, |
12 | | - memberSyntaxSortOrder: ['single', 'multiple', 'all', 'none'], |
13 | | - }, |
14 | | - ], |
15 | | - |
16 | 8 | 'import/order': [ |
17 | 9 | 'error', |
18 | 10 | { |
| 11 | + alphabetize: { |
| 12 | + caseInsensitive: false, |
| 13 | + order: 'asc', |
| 14 | + }, |
19 | 15 | groups: [ |
20 | 16 | ['builtin', 'external'], |
21 | 17 | 'internal', |
22 | 18 | 'parent', |
23 | 19 | 'sibling', |
24 | 20 | 'index', |
25 | 21 | ], |
26 | | - alphabetize: { |
27 | | - order: 'asc', |
28 | | - caseInsensitive: false, |
29 | | - }, |
30 | 22 | 'newlines-between': 'never', |
31 | 23 | }, |
32 | 24 | ], |
33 | | - |
34 | 25 | 'padding-line-between-statements': [ |
35 | 26 | 'error', |
36 | 27 | { |
37 | 28 | blankLine: 'always', |
38 | | - prev: '*', |
39 | 29 | next: 'return', |
| 30 | + prev: '*', |
40 | 31 | }, |
41 | 32 | ], |
42 | | - |
43 | 33 | 'react/jsx-filename-extension': ['error', { extensions: ['.js'] }], |
| 34 | + 'react/jsx-no-bind': ['warn', { allowArrowFunctions: true }], |
| 35 | + 'react/jsx-no-constructed-context-values': 'warn', |
44 | 36 | 'react/jsx-no-script-url': 'error', |
45 | 37 | 'react/jsx-no-useless-fragment': 'error', |
46 | 38 | 'react/no-adjacent-inline-elements': 'error', |
47 | | - 'react/jsx-no-constructed-context-values': 'warn', |
| 39 | + 'react/sort-prop-types': [ |
| 40 | + 'warn', |
| 41 | + { ignoreCase: true, sortShapeProp: true }, |
| 42 | + ], |
| 43 | + 'sort-imports': [ |
| 44 | + 'error', |
| 45 | + { |
| 46 | + ignoreDeclarationSort: true, |
| 47 | + memberSyntaxSortOrder: ['single', 'multiple', 'all', 'none'], |
| 48 | + }, |
| 49 | + ], |
| 50 | + 'sort-keys': [ |
| 51 | + 'warn', |
| 52 | + 'asc', |
| 53 | + { caseSensitive: true, minKeys: 2, natural: false }, |
| 54 | + ], |
48 | 55 | }, |
49 | 56 | } |
0 commit comments