|
16 | 16 | "rules": {
|
17 | 17 | "no-debugger": 0,
|
18 | 18 | "no-alert": 0,
|
19 |
| - "no-unused-vars": [ |
20 |
| - 1, |
21 |
| - { |
22 |
| - "argsIgnorePattern": "res|next|^err" |
23 |
| - } |
24 |
| - ], |
25 |
| - "prefer-arrow-callback": [ |
26 |
| - "error", |
27 |
| - { |
28 |
| - "allowNamedFunctions": true |
29 |
| - } |
30 |
| - ], |
31 |
| - "prefer-const": [ |
32 |
| - "error", |
33 |
| - { |
34 |
| - "destructuring": "all" |
35 |
| - } |
36 |
| - ], |
| 19 | + "no-unused-vars": [1, { "argsIgnorePattern": "res|next|^err" }], |
| 20 | + "prefer-arrow-callback": ["error", { "allowNamedFunctions": true }], |
| 21 | + "prefer-const": ["error", { "destructuring": "all" }], |
37 | 22 | "arrow-body-style": [2, "as-needed"],
|
38 |
| - "no-unused-expressions": [ |
39 |
| - 2, |
40 |
| - { |
41 |
| - "allowTaggedTemplates": true |
42 |
| - } |
43 |
| - ], |
44 |
| - "no-param-reassign": [ |
45 |
| - 2, |
46 |
| - { |
47 |
| - "props": false |
48 |
| - } |
49 |
| - ], |
| 23 | + "no-unused-expressions": [2, { "allowTaggedTemplates": true }], |
| 24 | + "no-param-reassign": [2, { "props": false }], |
50 | 25 | "no-console": 0,
|
51 | 26 | "no-use-before-define": 0,
|
52 | 27 | "no-nested-ternary": 0,
|
|
63 | 38 | "consistent-return": 0,
|
64 | 39 | "react/display-name": 1,
|
65 | 40 | "react/no-array-index-key": 0,
|
66 |
| - "react/jsx-no-useless-fragment": [ |
67 |
| - "error", |
68 |
| - { |
69 |
| - "allowExpressions": true |
70 |
| - } |
71 |
| - ], |
| 41 | + "react/jsx-no-useless-fragment": ["error", { "allowExpressions": true }], |
72 | 42 | "react/react-in-jsx-scope": 0,
|
73 | 43 | "react/prefer-stateless-function": 0,
|
74 | 44 | "react/forbid-prop-types": 0,
|
75 | 45 | "react/no-unescaped-entities": 0,
|
76 | 46 | "react/prop-types": 0,
|
77 | 47 | "jsx-a11y/accessible-emoji": 0,
|
78 |
| - "react/jsx-filename-extension": [ |
79 |
| - 1, |
80 |
| - { |
81 |
| - "extensions": [".js", ".jsx"] |
82 |
| - } |
83 |
| - ], |
84 |
| - "react/no-unknown-property": [ |
85 |
| - "error", |
86 |
| - { |
87 |
| - "ignore": ["i18nIsDynamicList"] |
88 |
| - } |
89 |
| - ], |
| 48 | + "react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }], |
| 49 | + "react/no-unknown-property": ["error", { "ignore": ["i18nIsDynamicList"] }], |
90 | 50 | "radix": 0,
|
91 | 51 | "no-shadow": [
|
92 | 52 | 2,
|
93 |
| - { |
94 |
| - "hoist": "all", |
95 |
| - "allow": ["resolve", "reject", "done", "next", "err", "error"] |
96 |
| - } |
97 |
| - ], |
98 |
| - "quotes": [ |
99 |
| - 2, |
100 |
| - "single", |
101 |
| - { |
102 |
| - "avoidEscape": true, |
103 |
| - "allowTemplateLiterals": true |
104 |
| - } |
| 53 | + { "hoist": "all", "allow": ["resolve", "reject", "done", "next", "err", "error"] } |
105 | 54 | ],
|
| 55 | + "quotes": [2, "single", { "avoidEscape": true, "allowTemplateLiterals": true }], |
106 | 56 | "jsx-a11y/href-no-hash": "off",
|
107 |
| - "jsx-a11y/anchor-is-valid": [ |
108 |
| - "warn", |
109 |
| - { |
110 |
| - "aspects": ["invalidHref"] |
111 |
| - } |
112 |
| - ], |
| 57 | + "jsx-a11y/anchor-is-valid": ["warn", { "aspects": ["invalidHref"] }], |
113 | 58 | "react/jsx-props-no-spreading": 0
|
114 |
| - } |
| 59 | + }, |
| 60 | + "overrides": [ |
| 61 | + { |
| 62 | + "files": ["test/*"], |
| 63 | + "extends": ["plugin:testing-library/react", "plugin:jest-dom/recommended"], |
| 64 | + "globals": { |
| 65 | + "globalThis": false |
| 66 | + }, |
| 67 | + "rules": { |
| 68 | + "testing-library/no-node-access": ["error", { "allowContainerFirstChild": true }] |
| 69 | + } |
| 70 | + } |
| 71 | + ] |
115 | 72 | }
|
0 commit comments