@perfective/eslint-config-react 0.10.0-alpha → 0.10.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.adoc +1 -1
- package/README.md +1 -1
- package/package.json +4 -4
- package/rules/jsx-a11y/index.js +2 -0
- package/rules/react/index.js +7 -1
- package/rules/react/jsx.js +1 -3
package/README.adoc
CHANGED
|
@@ -8,7 +8,7 @@ This package extends the
|
|
|
8
8
|
|
|
9
9
|
`@perfective/eslint-config-react` uses the following ESLint plugins:
|
|
10
10
|
|
|
11
|
-
* `link:https://github.com/
|
|
11
|
+
* `link:https://github.com/jsx-eslint/eslint-plugin-react[eslint-plugin-react]`;
|
|
12
12
|
* `link:https://www.npmjs.com/package/eslint-plugin-react-hooks[eslint-plugin-react-hooks]`;
|
|
13
13
|
* `link:https://github.com/correttojs/eslint-plugin-react-hooks-ssr[eslint-plugin-react-hooks-ssr]`;
|
|
14
14
|
* `link:https://github.com/cvazac/eslint-plugin-react-perf[eslint-plugin-react-perf]`;
|
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ This package extends the
|
|
|
8
8
|
|
|
9
9
|
`@perfective/eslint-config-react` uses the following ESLint plugins:
|
|
10
10
|
|
|
11
|
-
- [`eslint-plugin-react`](https://github.com/
|
|
11
|
+
- [`eslint-plugin-react`](https://github.com/jsx-eslint/eslint-plugin-react);
|
|
12
12
|
- [`eslint-plugin-react-hooks`](https://www.npmjs.com/package/eslint-plugin-react-hooks);
|
|
13
13
|
- [`eslint-plugin-react-hooks-ssr`](https://github.com/correttojs/eslint-plugin-react-hooks-ssr);
|
|
14
14
|
- [`eslint-plugin-react-perf`](https://github.com/cvazac/eslint-plugin-react-perf);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@perfective/eslint-config-react",
|
|
3
|
-
"version": "0.10.0-alpha",
|
|
3
|
+
"version": "0.10.0-alpha.2",
|
|
4
4
|
"description": "ESLint shareable rules configuration for React",
|
|
5
5
|
"keywords": ["react", "code quality", "code standard", "code style", "eslint", "eslint-config", "lint", "perfective", "typescript"],
|
|
6
6
|
"author": "Andrey Mikheychik <a.mikheychik@gmail.com>",
|
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
},
|
|
12
12
|
"license": "MIT",
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@perfective/eslint-config": "~0.20.0-alpha"
|
|
14
|
+
"@perfective/eslint-config": "~0.20.0-alpha.2"
|
|
15
15
|
},
|
|
16
16
|
"peerDependencies": {
|
|
17
|
-
"eslint-plugin-jsx-a11y": "^6.
|
|
18
|
-
"eslint-plugin-react": "^7.
|
|
17
|
+
"eslint-plugin-jsx-a11y": "^6.7.1",
|
|
18
|
+
"eslint-plugin-react": "^7.32.1",
|
|
19
19
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
20
20
|
"eslint-plugin-react-hooks-ssr": "^0.1.5",
|
|
21
21
|
"eslint-plugin-react-perf": "^3.3.1"
|
package/rules/jsx-a11y/index.js
CHANGED
|
@@ -53,6 +53,7 @@ module.exports = {
|
|
|
53
53
|
}],
|
|
54
54
|
'jsx-a11y/mouse-events-have-key-events': 'error',
|
|
55
55
|
'jsx-a11y/no-access-key': 'error',
|
|
56
|
+
'jsx-a11y/no-aria-hidden-on-focusable': 'error',
|
|
56
57
|
'jsx-a11y/no-autofocus': ['error', {
|
|
57
58
|
ignoreNonDOM: false,
|
|
58
59
|
}],
|
|
@@ -66,6 +67,7 @@ module.exports = {
|
|
|
66
67
|
nav: ['navigation'],
|
|
67
68
|
}],
|
|
68
69
|
'jsx-a11y/no-static-element-interactions': 'error',
|
|
70
|
+
'jsx-a11y/prefer-tag-over-role': 'error',
|
|
69
71
|
'jsx-a11y/role-has-required-aria-props': 'error',
|
|
70
72
|
'jsx-a11y/role-supports-aria-props': 'error',
|
|
71
73
|
'jsx-a11y/scope': 'error',
|
package/rules/react/index.js
CHANGED
|
@@ -39,7 +39,9 @@ module.exports = {
|
|
|
39
39
|
namedComponents: 'function-declaration',
|
|
40
40
|
unnamedComponents: 'function-expression',
|
|
41
41
|
}],
|
|
42
|
-
'react/hook-use-state': 'error',
|
|
42
|
+
'react/hook-use-state': ['error', {
|
|
43
|
+
allowDestructuredState: false,
|
|
44
|
+
}],
|
|
43
45
|
'react/iframe-missing-sandbox': 'error',
|
|
44
46
|
'react/no-access-state-in-setstate': 'error',
|
|
45
47
|
'react/no-adjacent-inline-elements': 'error',
|
|
@@ -61,6 +63,7 @@ module.exports = {
|
|
|
61
63
|
ignoreStateless: false,
|
|
62
64
|
}],
|
|
63
65
|
'react/no-namespace': 'error',
|
|
66
|
+
'react/no-object-type-as-default-prop': 'error',
|
|
64
67
|
'react/no-redundant-should-component-update': 'error',
|
|
65
68
|
'react/no-render-return-value': 'error',
|
|
66
69
|
'react/no-set-state': 'off',
|
|
@@ -132,6 +135,9 @@ module.exports = {
|
|
|
132
135
|
],
|
|
133
136
|
},
|
|
134
137
|
}],
|
|
138
|
+
'react/sort-default-props': ['error', {
|
|
139
|
+
ignoreCase: false,
|
|
140
|
+
}],
|
|
135
141
|
'react/sort-prop-types': ['error', {
|
|
136
142
|
ignoreCase: false,
|
|
137
143
|
callbacksLast: true,
|
package/rules/react/jsx.js
CHANGED
|
@@ -107,9 +107,7 @@ module.exports = {
|
|
|
107
107
|
explicitSpread: 'enforce',
|
|
108
108
|
exceptions: [],
|
|
109
109
|
}],
|
|
110
|
-
'react/jsx-sort-default-props':
|
|
111
|
-
ignoreCase: false,
|
|
112
|
-
}],
|
|
110
|
+
'react/jsx-sort-default-props': 'off',
|
|
113
111
|
'react/jsx-sort-props': ['warn', {
|
|
114
112
|
ignoreCase: false,
|
|
115
113
|
callbacksLast: true,
|