eslint-config-seekingalpha-react 5.1.0 → 5.5.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 CHANGED
@@ -1,5 +1,21 @@
1
1
  # Change Log
2
2
 
3
+ ## 5.5.0 - 2021-01-16
4
+ - [breaking] separate `eslint-plugin-jest` plugin to `eslint-config-seekingalpha-tests` sharable config
5
+
6
+ ## 5.4.0 - 2021-01-16
7
+ - [deps] upgrade `eslint` to version `8.6.0`
8
+ - [deps] upgrade `eslint-plugin-jest` to version `25.3.4`
9
+ - [breaking] enable `jest/prefer-comparison-matcher` rule
10
+ - [breaking] enable `jest/prefer-equality-matcher` rule
11
+
12
+ ## 5.3.0 - 2021-01-06
13
+ - [deps] update `eslint-find-rules` to version `4.1.0`
14
+
15
+ ## 5.2.0 - 2021-01-01
16
+ - [deps] upgrade `eslint` to version `8.6.0`
17
+ - [deps] upgrade `eslint-plugin-jest` to version `25.3.4`
18
+
3
19
  ## 5.1.0 - 2021-12-23
4
20
  - [deps] upgrade `eslint-plugin-react` to version `7.28.0`
5
21
 
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.5.0 eslint-plugin-flowtype@8.0.3 eslint-plugin-jest@25.3.0 eslint-plugin-jsx-a11y@6.5.1 eslint-plugin-react@7.28.0 eslint-plugin-react-hooks@4.3.0 --save-dev
9
+ npm install eslint@8.7.0 eslint-plugin-flowtype@8.0.3 eslint-plugin-jsx-a11y@6.5.1 eslint-plugin-react@7.28.0 eslint-plugin-react-hooks@4.3.0 --save-dev
10
10
 
11
11
  Install SeekingAlpha shareable ESLint:
12
12
 
@@ -19,7 +19,6 @@ This shareable config includes all ESLint rules including ECMAScript 6 features,
19
19
  * [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react)
20
20
  * [eslint-plugin-jsx-a11y](https://github.com/evcohen/eslint-plugin-jsx-a11y)
21
21
  * [eslint-plugin-flowtype](https://github.com/gajus/eslint-plugin-flowtype)
22
- * [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest)
23
22
  * [eslint-plugin-react-hooks](https://www.npmjs.com/package/eslint-plugin-react-hooks)
24
23
 
25
24
  If you don't need configuration extended with `React` rules, check out our [base config](https://www.npmjs.com/package/eslint-config-seekingalpha-base).
package/index.js CHANGED
@@ -14,9 +14,6 @@ module.exports = {
14
14
  // https://github.com/gajus/eslint-plugin-flowtype
15
15
  './rules/eslint-plugin-flowtype/index.js',
16
16
 
17
- // https://github.com/jest-community/eslint-plugin-jest
18
- './rules/eslint-plugin-jest/index.js',
19
-
20
17
  // https://reactjs.org/docs/hooks-rules.html
21
18
  './rules/eslint-plugin-react-hooks/index.js',
22
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-seekingalpha-react",
3
- "version": "5.1.0",
3
+ "version": "5.5.0",
4
4
  "description": "SeekingAlpha's sharable React.js ESLint config",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -49,18 +49,16 @@
49
49
  "node": ">= 14"
50
50
  },
51
51
  "peerDependencies": {
52
- "eslint": "8.5.0",
52
+ "eslint": "8.7.0",
53
53
  "eslint-plugin-flowtype": "8.0.3",
54
- "eslint-plugin-jest": "25.3.0",
55
54
  "eslint-plugin-jsx-a11y": "6.5.1",
56
55
  "eslint-plugin-react": "7.28.0",
57
56
  "eslint-plugin-react-hooks": "4.3.0"
58
57
  },
59
58
  "devDependencies": {
60
- "eslint": "8.5.0",
61
- "eslint-find-rules": "4.0.0",
59
+ "eslint": "8.7.0",
60
+ "eslint-find-rules": "4.1.0",
62
61
  "eslint-plugin-flowtype": "8.0.3",
63
- "eslint-plugin-jest": "25.3.0",
64
62
  "eslint-plugin-jsx-a11y": "6.5.1",
65
63
  "eslint-plugin-react": "7.28.0",
66
64
  "eslint-plugin-react-hooks": "4.3.0"
@@ -46,6 +46,12 @@ module.exports = {
46
46
  'never',
47
47
  ],
48
48
 
49
+ // https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype-rules-interface-id-match
50
+ 'flowtype/interface-id-match': [
51
+ 'error',
52
+ '^I([A-Z][a-z0-9]*)+',
53
+ ],
54
+
49
55
  // https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype-rules-newline-after-flow-annotation
50
56
  'flowtype/newline-after-flow-annotation': [
51
57
  'error',
@@ -55,6 +61,9 @@ module.exports = {
55
61
  // https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype-rules-no-dupe-keys
56
62
  'flowtype/no-dupe-keys': 'error',
57
63
 
64
+ // https://github.com/gajus/eslint-plugin-flowtype#no-duplicate-type-union-intersection-members
65
+ 'flowtype/no-duplicate-type-union-intersection-members': 'error',
66
+
58
67
  /*
59
68
  * https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype-rules-no-existential-type
60
69
  * should be disabled to support recompose flow types
@@ -160,6 +169,9 @@ module.exports = {
160
169
  // https://github.com/gajus/eslint-plugin-flowtype#sort-keys
161
170
  'flowtype/sort-keys': 'off',
162
171
 
172
+ // https://github.com/gajus/eslint-plugin-flowtype#sort-type-union-intersection-members
173
+ 'flowtype/sort-type-union-intersection-members': 'off',
174
+
163
175
  // https://github.com/gajus/eslint-plugin-flowtype#eslint-plugin-flowtype-rules-space-after-type-colon
164
176
  'flowtype/space-after-type-colon': [
165
177
  'error',
@@ -165,6 +165,9 @@ module.exports = {
165
165
  // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-array-index-key.md
166
166
  'react/no-array-index-key': 'error',
167
167
 
168
+ // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-arrow-function-lifecycle.md
169
+ 'react/no-arrow-function-lifecycle': 'error',
170
+
168
171
  // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-children-prop.md
169
172
  'react/no-children-prop': 'error',
170
173
 
@@ -186,6 +189,9 @@ module.exports = {
186
189
  // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-find-dom-node.md
187
190
  'react/no-find-dom-node': 'error',
188
191
 
192
+ // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-invalid-html-attribute.md
193
+ 'react/no-invalid-html-attribute': 'error',
194
+
189
195
  /*
190
196
  * https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-is-mounted.md
191
197
  * https://reactjs.org/blog/2015/12/16/ismounted-antipattern.html
@@ -234,6 +240,12 @@ module.exports = {
234
240
  // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unsafe.md
235
241
  'react/no-unsafe': 'error',
236
242
 
243
+ // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unstable-nested-components.md
244
+ 'react/no-unstable-nested-components': 'error',
245
+
246
+ // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unused-class-component-methods.md
247
+ 'react/no-unused-class-component-methods': 'error',
248
+
237
249
  /*
238
250
  * no prop types usage
239
251
  * https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unused-prop-types.md
@@ -1,154 +0,0 @@
1
- module.exports = {
2
-
3
- plugins: ['jest'],
4
-
5
- rules: {
6
- // Jest Plugin https://github.com/jest-community/eslint-plugin-jest
7
-
8
- // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/consistent-test-it.md
9
- 'jest/consistent-test-it': 'error',
10
-
11
- // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/expect-expect.md
12
- 'jest/expect-expect': 'error',
13
-
14
- // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/prefer-lowercase-title.md
15
- 'jest/prefer-lowercase-title': 'off',
16
-
17
- // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/max-nested-describe.md
18
- 'jest/max-nested-describe': [
19
- 'error',
20
- {
21
- max: 2,
22
- },
23
- ],
24
-
25
- // https://github.com/jest-community/eslint-plugin-jest/blob/HEAD/docs/rules/no-alias-methods.md
26
- 'jest/no-alias-methods': 'error',
27
-
28
- // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/no-commented-out-tests.md
29
- 'jest/no-commented-out-tests': 'error',
30
-
31
- // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/no-conditional-expect.md
32
- 'jest/no-conditional-expect': 'error',
33
-
34
- // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/no-deprecated-functions.md
35
- 'jest/no-deprecated-functions': 'error',
36
-
37
- // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/no-disabled-tests.md
38
- 'jest/no-disabled-tests': 'error',
39
-
40
- // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/no-duplicate-hooks.md
41
- 'jest/no-duplicate-hooks': 'error',
42
-
43
- // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/no-export.md
44
- 'jest/no-export': 'error',
45
-
46
- // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/no-focused-tests.md
47
- 'jest/no-focused-tests': 'error',
48
-
49
- // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/no-hooks.md
50
- 'jest/no-hooks': 'off',
51
-
52
- // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/no-identical-title.md
53
- 'jest/no-identical-title': 'error',
54
-
55
- // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/no-if.md
56
- 'jest/no-if': 'error',
57
-
58
- // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/no-interpolation-in-snapshots.md
59
- 'jest/no-interpolation-in-snapshots': 'error',
60
-
61
- // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/no-jasmine-globals.md
62
- 'jest/no-jasmine-globals': 'error',
63
-
64
- // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/no-jest-import.md
65
- 'jest/no-jest-import': 'error',
66
-
67
- // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/no-large-snapshots.md
68
- 'jest/no-large-snapshots': [
69
- 'error',
70
- {
71
- maxSize: 50,
72
- },
73
- ],
74
-
75
- // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/no-mocks-import.md
76
- 'jest/no-mocks-import': 'error',
77
-
78
- // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/no-restricted-matchers.md
79
- 'jest/no-restricted-matchers': [
80
- 'error',
81
- {
82
- toBeFalsy: 'Use `toBe(false)` instead.',
83
- toBeTruthy: 'Use `toBe(true)` instead.',
84
- },
85
- ],
86
-
87
- // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/no-standalone-expect.md
88
- 'jest/no-standalone-expect': 'error',
89
-
90
- // https://github.com/jest-community/eslint-plugin-jest/blob/HEAD/docs/rules/no-test-callback.md
91
- 'jest/no-done-callback': 'error',
92
-
93
- // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/no-test-prefixes.md
94
- 'jest/no-test-prefixes': 'error',
95
-
96
- // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/no-test-return-statement.md
97
- 'jest/no-test-return-statement': 'off',
98
-
99
- // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/prefer-called-with.md
100
- 'jest/prefer-called-with': 'error',
101
-
102
- // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/prefer-expect-assertions.md
103
- 'jest/prefer-expect-assertions': 'off',
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
-
108
- // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/prefer-hooks-on-top.md
109
- 'jest/prefer-hooks-on-top': 'error',
110
-
111
- // https://github.com/jest-community/eslint-plugin-jest/blob/HEAD/docs/rules/prefer-spy-on.md
112
- 'jest/prefer-spy-on': 'error',
113
-
114
- // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/prefer-strict-equal.md
115
- 'jest/prefer-strict-equal': 'error',
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
-
120
- // https://github.com/jest-community/eslint-plugin-jest/blob/HEAD/docs/rules/prefer-to-contain.md
121
- 'jest/prefer-to-contain': 'error',
122
-
123
- // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/prefer-to-have-length.md
124
- 'jest/prefer-to-have-length': 'error',
125
-
126
- // https://github.com/jest-community/eslint-plugin-jest/blob/HEAD/docs/rules/prefer-todo.md
127
- 'jest/prefer-todo': 'error',
128
-
129
- // https://github.com/jest-community/eslint-plugin-jest/blob/HEAD/docs/rules/require-tothrow-message.md
130
- 'jest/require-to-throw-message': 'error',
131
-
132
- // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/require-top-level-describe.md
133
- 'jest/require-top-level-describe': 'error',
134
-
135
- // https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/valid-describe-callback.md
136
- 'jest/valid-describe-callback': 'error',
137
-
138
- // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/valid-expect.md
139
- 'jest/valid-expect': 'error',
140
-
141
- // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/valid-expect-in-promise.md
142
- 'jest/valid-expect-in-promise': 'error',
143
-
144
- // https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/valid-title.md
145
- 'jest/valid-title': 'error',
146
-
147
- /*
148
- * only relevant for TypeScript
149
- * https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/unbound-method.md
150
- */
151
- 'jest/unbound-method': 'off',
152
- },
153
-
154
- };