eslint-config-seekingalpha-react 4.77.0 → 4.81.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 +25 -0
- package/README.md +1 -1
- package/package.json +7 -7
- package/rules/eslint/best-practices.js +0 -3
- package/rules/eslint/index.js +1 -4
- package/rules/eslint-plugin-jest/index.js +6 -1
- package/rules/eslint-plugin-react/react.js +33 -54
- package/rules/eslint/nodejs-and-commonjs.js +0 -59
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 4.81.0 - 2021-10-03
|
|
4
|
+
- [deps] upgrade `eslint-plugin-jest` to version `24.5.2`
|
|
5
|
+
|
|
6
|
+
## 4.80.0 - 2021-10-03
|
|
7
|
+
- [patch] fixed `jest/no-restricted-matchers` rule according to `jest/prefer-expect-resolves`
|
|
8
|
+
|
|
9
|
+
## 4.79.0 - 2021-10-03
|
|
10
|
+
- [deps] upgrade `eslint-plugin-react` to version `7.26.1`
|
|
11
|
+
- [deps] upgrade `eslint-plugin-flowtype` to version `6.1.0`
|
|
12
|
+
- [deps] upgrade `eslint-plugin-jest` to version `24.5.0`
|
|
13
|
+
- [breaking] enable `react/no-namespace` rule
|
|
14
|
+
- [breaking] enable `jest/prefer-expect-resolves` rule
|
|
15
|
+
- [breaking] enable `jest/prefer-to-be` rule
|
|
16
|
+
- [breaking] disable `react/default-props-match-prop-types` rule
|
|
17
|
+
- [breaking] disable `react/forbid-foreign-prop-types` rule
|
|
18
|
+
- [breaking] disable `react/forbid-prop-types` rule
|
|
19
|
+
- [breaking] disable `react/no-unused-prop-types` rule
|
|
20
|
+
- [breaking] disable `react/prop-types` rule
|
|
21
|
+
- [breaking] update `class-methods-use-this` rule
|
|
22
|
+
|
|
23
|
+
## 4.78.0 - 2021-09-19
|
|
24
|
+
- [deps] upgrade `eslint-plugin-react` to version `7.25.2`
|
|
25
|
+
- [deps] upgrade `eslint-plugin-flowtype` to version `6.0.1`
|
|
26
|
+
- [deps] upgrade `eslint-plugin-jest` to version `24.4.2`
|
|
27
|
+
|
|
3
28
|
## 4.77.0 - 2021-09-14
|
|
4
29
|
- [deps] upgrade `eslint-plugin-react` to version `7.25.2`
|
|
5
30
|
|
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@7.32.0 eslint-plugin-flowtype@
|
|
9
|
+
npm install eslint@7.32.0 eslint-plugin-flowtype@6.1.0 eslint-plugin-jest@24.5.2 eslint-plugin-jsx-a11y@6.4.1 eslint-plugin-react@7.26.1 eslint-plugin-react-hooks@4.2.0 --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": "4.
|
|
3
|
+
"version": "4.81.0",
|
|
4
4
|
"description": "SeekingAlpha's sharable React.js ESLint config",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -50,19 +50,19 @@
|
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"eslint": "7.32.0",
|
|
53
|
-
"eslint-plugin-flowtype": "
|
|
54
|
-
"eslint-plugin-jest": "24.
|
|
53
|
+
"eslint-plugin-flowtype": "6.1.0",
|
|
54
|
+
"eslint-plugin-jest": "24.5.2",
|
|
55
55
|
"eslint-plugin-jsx-a11y": "6.4.1",
|
|
56
|
-
"eslint-plugin-react": "7.
|
|
56
|
+
"eslint-plugin-react": "7.26.1",
|
|
57
57
|
"eslint-plugin-react-hooks": "4.2.0"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"eslint": "7.32.0",
|
|
61
61
|
"eslint-find-rules": "3.6.1",
|
|
62
|
-
"eslint-plugin-flowtype": "
|
|
63
|
-
"eslint-plugin-jest": "24.
|
|
62
|
+
"eslint-plugin-flowtype": "6.1.0",
|
|
63
|
+
"eslint-plugin-jest": "24.5.2",
|
|
64
64
|
"eslint-plugin-jsx-a11y": "6.4.1",
|
|
65
|
-
"eslint-plugin-react": "7.
|
|
65
|
+
"eslint-plugin-react": "7.26.1",
|
|
66
66
|
"eslint-plugin-react-hooks": "4.2.0"
|
|
67
67
|
}
|
|
68
68
|
}
|
package/rules/eslint/index.js
CHANGED
|
@@ -81,7 +81,6 @@ module.exports = {
|
|
|
81
81
|
{
|
|
82
82
|
toBeFalsy: 'Use `toBe(false)` instead.',
|
|
83
83
|
toBeTruthy: 'Use `toBe(true)` instead.',
|
|
84
|
-
resolves: 'Use `expect(await promise)` instead.',
|
|
85
84
|
},
|
|
86
85
|
],
|
|
87
86
|
|
|
@@ -103,6 +102,9 @@ module.exports = {
|
|
|
103
102
|
// https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/prefer-expect-assertions.md
|
|
104
103
|
'jest/prefer-expect-assertions': 'off',
|
|
105
104
|
|
|
105
|
+
// https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/prefer-expect-resolves.md
|
|
106
|
+
'jest/prefer-expect-resolves': 'error',
|
|
107
|
+
|
|
106
108
|
// https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/prefer-hooks-on-top.md
|
|
107
109
|
'jest/prefer-hooks-on-top': 'error',
|
|
108
110
|
|
|
@@ -112,6 +114,9 @@ module.exports = {
|
|
|
112
114
|
// https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/prefer-strict-equal.md
|
|
113
115
|
'jest/prefer-strict-equal': 'error',
|
|
114
116
|
|
|
117
|
+
// https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/prefer-to-be.md
|
|
118
|
+
'jest/prefer-to-be': 'error',
|
|
119
|
+
|
|
115
120
|
// https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/prefer-to-be-null.md
|
|
116
121
|
'jest/prefer-to-be-null': 'error',
|
|
117
122
|
|
|
@@ -27,13 +27,11 @@ module.exports = {
|
|
|
27
27
|
},
|
|
28
28
|
],
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
},
|
|
36
|
-
],
|
|
30
|
+
/*
|
|
31
|
+
* no prop types usage
|
|
32
|
+
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/default-props-match-prop-types.md
|
|
33
|
+
*/
|
|
34
|
+
'react/default-props-match-prop-types': 'off',
|
|
37
35
|
|
|
38
36
|
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/destructuring-assignment.md
|
|
39
37
|
'react/destructuring-assignment': [
|
|
@@ -138,27 +136,17 @@ module.exports = {
|
|
|
138
136
|
},
|
|
139
137
|
],
|
|
140
138
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
},
|
|
147
|
-
],
|
|
139
|
+
/*
|
|
140
|
+
* no prop types usage
|
|
141
|
+
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/forbid-foreign-prop-types.md
|
|
142
|
+
*/
|
|
143
|
+
'react/forbid-foreign-prop-types': 'off',
|
|
148
144
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
'any',
|
|
155
|
-
'array',
|
|
156
|
-
'object',
|
|
157
|
-
],
|
|
158
|
-
checkContextTypes: true,
|
|
159
|
-
checkChildContextTypes: true,
|
|
160
|
-
},
|
|
161
|
-
],
|
|
145
|
+
/*
|
|
146
|
+
* no prop types usage
|
|
147
|
+
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/forbid-prop-types.md
|
|
148
|
+
*/
|
|
149
|
+
'react/forbid-prop-types': 'off',
|
|
162
150
|
|
|
163
151
|
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/function-component-definition.md
|
|
164
152
|
'react/function-component-definition': [
|
|
@@ -213,6 +201,9 @@ module.exports = {
|
|
|
213
201
|
},
|
|
214
202
|
],
|
|
215
203
|
|
|
204
|
+
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-namespace.md
|
|
205
|
+
'react/no-namespace': 'error',
|
|
206
|
+
|
|
216
207
|
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-redundant-should-component-update.md
|
|
217
208
|
'react/no-redundant-should-component-update': 'error',
|
|
218
209
|
|
|
@@ -244,14 +235,11 @@ module.exports = {
|
|
|
244
235
|
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unsafe.md
|
|
245
236
|
'react/no-unsafe': 'error',
|
|
246
237
|
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
skipShapeProps: true,
|
|
253
|
-
},
|
|
254
|
-
],
|
|
238
|
+
/*
|
|
239
|
+
* no prop types usage
|
|
240
|
+
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unused-prop-types.md
|
|
241
|
+
*/
|
|
242
|
+
'react/no-unused-prop-types': 'off',
|
|
255
243
|
|
|
256
244
|
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unused-state.md
|
|
257
245
|
'react/no-unused-state': 'error',
|
|
@@ -276,15 +264,11 @@ module.exports = {
|
|
|
276
264
|
},
|
|
277
265
|
],
|
|
278
266
|
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
customValidators: [],
|
|
285
|
-
skipUndeclared: true,
|
|
286
|
-
},
|
|
287
|
-
],
|
|
267
|
+
/*
|
|
268
|
+
* no prop types usage
|
|
269
|
+
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prop-types.md
|
|
270
|
+
*/
|
|
271
|
+
'react/prop-types': 'off',
|
|
288
272
|
|
|
289
273
|
/*
|
|
290
274
|
* off after update to 16.4
|
|
@@ -359,16 +343,11 @@ module.exports = {
|
|
|
359
343
|
},
|
|
360
344
|
],
|
|
361
345
|
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
callbacksLast: true,
|
|
368
|
-
requiredFirst: true,
|
|
369
|
-
sortShapeProp: true,
|
|
370
|
-
},
|
|
371
|
-
],
|
|
346
|
+
/*
|
|
347
|
+
* no prop types usage
|
|
348
|
+
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/sort-prop-types.md
|
|
349
|
+
*/
|
|
350
|
+
'react/sort-prop-types': 'off',
|
|
372
351
|
|
|
373
352
|
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/style-prop-object.md
|
|
374
353
|
'react/style-prop-object': 'error',
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
// https://eslint.org/docs/rules/#nodejs-and-commonjs
|
|
2
|
-
|
|
3
|
-
module.exports = {
|
|
4
|
-
|
|
5
|
-
rules: {
|
|
6
|
-
|
|
7
|
-
// https://eslint.org/docs/rules/callback-return
|
|
8
|
-
'callback-return': 'error',
|
|
9
|
-
|
|
10
|
-
// https://eslint.org/docs/rules/global-require
|
|
11
|
-
'global-require': 'error',
|
|
12
|
-
|
|
13
|
-
// https://eslint.org/docs/rules/handle-callback-err
|
|
14
|
-
'handle-callback-err': 'error',
|
|
15
|
-
|
|
16
|
-
/*
|
|
17
|
-
* https://eslint.org/docs/rules/no-buffer-constructor
|
|
18
|
-
* https://github.com/nodejs/node/issues/4660
|
|
19
|
-
*/
|
|
20
|
-
'no-buffer-constructor': 'error',
|
|
21
|
-
|
|
22
|
-
// https://eslint.org/docs/rules/no-mixed-requires
|
|
23
|
-
'no-mixed-requires': [
|
|
24
|
-
'error',
|
|
25
|
-
{
|
|
26
|
-
allowCall: false,
|
|
27
|
-
grouping: false,
|
|
28
|
-
},
|
|
29
|
-
],
|
|
30
|
-
|
|
31
|
-
// https://eslint.org/docs/rules/no-new-require
|
|
32
|
-
'no-new-require': 'error',
|
|
33
|
-
|
|
34
|
-
// https://eslint.org/docs/rules/no-path-concat
|
|
35
|
-
'no-path-concat': 'error',
|
|
36
|
-
|
|
37
|
-
/*
|
|
38
|
-
* https://eslint.org/docs/rules/no-process-env
|
|
39
|
-
* https://stackoverflow.com/questions/5869216/how-to-store-node-js-deployment-settings-configuration-files
|
|
40
|
-
*/
|
|
41
|
-
'no-process-env': 'error',
|
|
42
|
-
|
|
43
|
-
// https://eslint.org/docs/rules/no-process-exit
|
|
44
|
-
'no-process-exit': 'error',
|
|
45
|
-
|
|
46
|
-
// https://eslint.org/docs/rules/no-restricted-modules
|
|
47
|
-
'no-restricted-modules': [
|
|
48
|
-
'error',
|
|
49
|
-
{
|
|
50
|
-
paths: [],
|
|
51
|
-
},
|
|
52
|
-
],
|
|
53
|
-
|
|
54
|
-
// https://eslint.org/docs/rules/no-sync
|
|
55
|
-
'no-sync': 'error',
|
|
56
|
-
|
|
57
|
-
},
|
|
58
|
-
|
|
59
|
-
};
|