eslint-config-seekingalpha-react 7.26.0 → 7.28.0
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/CHANGELOG.md +8 -0
- package/README.md +1 -1
- package/package.json +5 -5
- package/rules/eslint-plugin-jsx-a11y/index.js +34 -4
- package/rules/eslint-plugin-react/react.js +12 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 7.28.0 - 2024-04-26
|
|
4
|
+
|
|
5
|
+
- [deps] upgrade `eslint-plugin-react-hooks` to version `4.6.1`
|
|
6
|
+
|
|
7
|
+
## 7.27.0 - 2024-03-17
|
|
8
|
+
|
|
9
|
+
- [deps] upgrade `eslint-plugin-react` to version `7.34.1`
|
|
10
|
+
|
|
3
11
|
## 7.26.0 - 2024-03-04
|
|
4
12
|
|
|
5
13
|
- [deps] upgrade `eslint-plugin-react` to version `7.34.0`
|
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ This package includes the shareable ESLint config used by [SeekingAlpha](https:/
|
|
|
6
6
|
|
|
7
7
|
Install ESLint and all [Peer Dependencies](https://nodejs.org/en/blog/npm/peer-dependencies/):
|
|
8
8
|
|
|
9
|
-
npm install eslint@8.57.0 eslint-plugin-jsx-a11y@6.8.0 eslint-plugin-react@7.34.
|
|
9
|
+
npm install eslint@8.57.0 eslint-plugin-jsx-a11y@6.8.0 eslint-plugin-react@7.34.1 eslint-plugin-react-hooks@4.6.1 --save-dev
|
|
10
10
|
|
|
11
11
|
Install SeekingAlpha shareable ESLint:
|
|
12
12
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-config-seekingalpha-react",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.28.0",
|
|
4
4
|
"description": "SeekingAlpha's sharable React.js ESLint config",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -51,14 +51,14 @@
|
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"eslint": "8.57.0",
|
|
53
53
|
"eslint-plugin-jsx-a11y": "6.8.0",
|
|
54
|
-
"eslint-plugin-react": "7.34.
|
|
55
|
-
"eslint-plugin-react-hooks": "4.6.
|
|
54
|
+
"eslint-plugin-react": "7.34.1",
|
|
55
|
+
"eslint-plugin-react-hooks": "4.6.1"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"eslint": "8.57.0",
|
|
59
59
|
"eslint-find-rules": "4.1.0",
|
|
60
60
|
"eslint-plugin-jsx-a11y": "6.8.0",
|
|
61
|
-
"eslint-plugin-react": "7.34.
|
|
62
|
-
"eslint-plugin-react-hooks": "4.6.
|
|
61
|
+
"eslint-plugin-react": "7.34.1",
|
|
62
|
+
"eslint-plugin-react-hooks": "4.6.1"
|
|
63
63
|
}
|
|
64
64
|
}
|
|
@@ -166,7 +166,14 @@ module.exports = {
|
|
|
166
166
|
'jsx-a11y/no-noninteractive-element-interactions': [
|
|
167
167
|
'error',
|
|
168
168
|
{
|
|
169
|
-
handlers: [
|
|
169
|
+
handlers: [
|
|
170
|
+
'onClick',
|
|
171
|
+
'onMouseDown',
|
|
172
|
+
'onMouseUp',
|
|
173
|
+
'onKeyPress',
|
|
174
|
+
'onKeyDown',
|
|
175
|
+
'onKeyUp',
|
|
176
|
+
],
|
|
170
177
|
},
|
|
171
178
|
],
|
|
172
179
|
|
|
@@ -174,8 +181,24 @@ module.exports = {
|
|
|
174
181
|
'jsx-a11y/no-noninteractive-element-to-interactive-role': [
|
|
175
182
|
'error',
|
|
176
183
|
{
|
|
177
|
-
ul: [
|
|
178
|
-
|
|
184
|
+
ul: [
|
|
185
|
+
'listbox',
|
|
186
|
+
'menu',
|
|
187
|
+
'menubar',
|
|
188
|
+
'radiogroup',
|
|
189
|
+
'tablist',
|
|
190
|
+
'tree',
|
|
191
|
+
'treegrid',
|
|
192
|
+
],
|
|
193
|
+
ol: [
|
|
194
|
+
'listbox',
|
|
195
|
+
'menu',
|
|
196
|
+
'menubar',
|
|
197
|
+
'radiogroup',
|
|
198
|
+
'tablist',
|
|
199
|
+
'tree',
|
|
200
|
+
'treegrid',
|
|
201
|
+
],
|
|
179
202
|
li: ['menuitem', 'option', 'row', 'tab', 'treeitem'],
|
|
180
203
|
table: ['grid'],
|
|
181
204
|
td: ['gridcell'],
|
|
@@ -206,7 +229,14 @@ module.exports = {
|
|
|
206
229
|
'jsx-a11y/no-static-element-interactions': [
|
|
207
230
|
'error',
|
|
208
231
|
{
|
|
209
|
-
handlers: [
|
|
232
|
+
handlers: [
|
|
233
|
+
'onClick',
|
|
234
|
+
'onMouseDown',
|
|
235
|
+
'onMouseUp',
|
|
236
|
+
'onKeyPress',
|
|
237
|
+
'onKeyDown',
|
|
238
|
+
'onKeyUp',
|
|
239
|
+
],
|
|
210
240
|
},
|
|
211
241
|
],
|
|
212
242
|
|
|
@@ -8,7 +8,8 @@ module.exports = {
|
|
|
8
8
|
{
|
|
9
9
|
propTypeNames: ['bool', 'mutuallyExclusiveTrueProps'],
|
|
10
10
|
rule: '^(is|has|should)[A-Z]([A-Za-z0-9]?)+',
|
|
11
|
-
message:
|
|
11
|
+
message:
|
|
12
|
+
'It is better if your prop ({{ propName }}) matches this pattern: ({{ pattern }})',
|
|
12
13
|
},
|
|
13
14
|
],
|
|
14
15
|
|
|
@@ -302,7 +303,16 @@ module.exports = {
|
|
|
302
303
|
'react/sort-comp': [
|
|
303
304
|
'error',
|
|
304
305
|
{
|
|
305
|
-
order: [
|
|
306
|
+
order: [
|
|
307
|
+
'static-methods',
|
|
308
|
+
'lifecycle',
|
|
309
|
+
'/^on.+$/',
|
|
310
|
+
'getters',
|
|
311
|
+
'setters',
|
|
312
|
+
'instance-methods',
|
|
313
|
+
'everything-else',
|
|
314
|
+
'rendering',
|
|
315
|
+
],
|
|
306
316
|
groups: {
|
|
307
317
|
lifecycle: [
|
|
308
318
|
'displayName',
|