eslint-config-seekingalpha-react 7.49.0 → 8.0.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 +4 -0
- package/flat.js +16 -0
- package/package.json +1 -1
- package/rules/eslint-plugin-jsx-a11y/flat.js +10 -0
- package/rules/eslint-plugin-react/flat.js +14 -0
- package/rules/eslint-plugin-react/jsx.js +76 -82
- package/rules/eslint-plugin-react-hooks/flat.js +10 -0
- package/prettier.js +0 -21
package/CHANGELOG.md
CHANGED
package/flat.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import jsxA11yConfig from './rules/eslint-plugin-jsx-a11y/flat.js';
|
|
2
|
+
import reactConfig from './rules/eslint-plugin-react/flat.js';
|
|
3
|
+
import reactHooksConfig from './rules/eslint-plugin-react-hooks/flat.js';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
plugins: {
|
|
7
|
+
...jsxA11yConfig.plugins,
|
|
8
|
+
...reactConfig.plugins,
|
|
9
|
+
...reactHooksConfig.plugins,
|
|
10
|
+
},
|
|
11
|
+
rules: {
|
|
12
|
+
...jsxA11yConfig.rules,
|
|
13
|
+
...reactConfig.rules,
|
|
14
|
+
...reactHooksConfig.rules,
|
|
15
|
+
},
|
|
16
|
+
};
|
package/package.json
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import reactPlugin from 'eslint-plugin-react';
|
|
2
|
+
|
|
3
|
+
import jsxConfig from './jsx.js';
|
|
4
|
+
import reactConfig from './react.js';
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
plugins: {
|
|
8
|
+
react: reactPlugin,
|
|
9
|
+
},
|
|
10
|
+
rules: {
|
|
11
|
+
...jsxConfig.rules,
|
|
12
|
+
...reactConfig.rules,
|
|
13
|
+
},
|
|
14
|
+
};
|
|
@@ -13,35 +13,35 @@ module.exports = {
|
|
|
13
13
|
},
|
|
14
14
|
],
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
/*
|
|
17
|
+
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-child-element-spacing.md
|
|
18
|
+
* Disabled to work with prettier
|
|
19
|
+
*/
|
|
20
|
+
'react/jsx-child-element-spacing': 'off',
|
|
18
21
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
nonEmpty: 'tag-aligned',
|
|
25
|
-
},
|
|
26
|
-
],
|
|
22
|
+
/*
|
|
23
|
+
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-closing-bracket-location.md
|
|
24
|
+
* disable to work with prettier
|
|
25
|
+
*/
|
|
26
|
+
'react/jsx-closing-bracket-location': 'off',
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
/*
|
|
29
|
+
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-closing-tag-location.md
|
|
30
|
+
* disable to work with prettier
|
|
31
|
+
*/
|
|
32
|
+
'react/jsx-closing-tag-location': 'off',
|
|
30
33
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
allowMultiline: true,
|
|
37
|
-
spacing: {
|
|
38
|
-
objectLiterals: 'always',
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
],
|
|
34
|
+
/*
|
|
35
|
+
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-curly-spacing.md
|
|
36
|
+
* disable to work with prettier
|
|
37
|
+
*/
|
|
38
|
+
'react/jsx-curly-spacing': 'off',
|
|
42
39
|
|
|
43
|
-
|
|
44
|
-
|
|
40
|
+
/*
|
|
41
|
+
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-equals-spacing.md
|
|
42
|
+
* disable to work with prettier
|
|
43
|
+
*/
|
|
44
|
+
'react/jsx-equals-spacing': 'off',
|
|
45
45
|
|
|
46
46
|
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-filename-extension.md
|
|
47
47
|
'react/jsx-filename-extension': [
|
|
@@ -51,20 +51,29 @@ module.exports = {
|
|
|
51
51
|
},
|
|
52
52
|
],
|
|
53
53
|
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
/*
|
|
55
|
+
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-first-prop-new-line.md
|
|
56
|
+
* disable to work with prettier
|
|
57
|
+
*/
|
|
58
|
+
'react/jsx-first-prop-new-line': 'off',
|
|
56
59
|
|
|
57
60
|
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-fragments.md
|
|
58
61
|
'react/jsx-fragments': ['error', 'syntax'],
|
|
59
62
|
|
|
60
63
|
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-handler-names.md
|
|
61
|
-
'react/jsx-handler-names':
|
|
64
|
+
'react/jsx-handler-names': 'off',
|
|
62
65
|
|
|
63
|
-
|
|
64
|
-
|
|
66
|
+
/*
|
|
67
|
+
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-indent.md
|
|
68
|
+
* disable to work with prettier
|
|
69
|
+
*/
|
|
70
|
+
'react/jsx-indent': 'off',
|
|
65
71
|
|
|
66
|
-
|
|
67
|
-
|
|
72
|
+
/*
|
|
73
|
+
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-indent-props.md
|
|
74
|
+
* disable ti work with prettier
|
|
75
|
+
*/
|
|
76
|
+
'react/jsx-indent-props': 'off',
|
|
68
77
|
|
|
69
78
|
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-key.md
|
|
70
79
|
'react/jsx-key': [
|
|
@@ -84,17 +93,17 @@ module.exports = {
|
|
|
84
93
|
},
|
|
85
94
|
],
|
|
86
95
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
when: 'always',
|
|
93
|
-
},
|
|
94
|
-
],
|
|
96
|
+
/*
|
|
97
|
+
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-max-props-per-line.md
|
|
98
|
+
* disable to work with prettier
|
|
99
|
+
*/
|
|
100
|
+
'react/jsx-max-props-per-line': 'off',
|
|
95
101
|
|
|
96
|
-
|
|
97
|
-
|
|
102
|
+
/*
|
|
103
|
+
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-newline.md
|
|
104
|
+
* disable to work with prettier
|
|
105
|
+
*/
|
|
106
|
+
'react/jsx-newline': 'off',
|
|
98
107
|
|
|
99
108
|
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-bind.md
|
|
100
109
|
'react/jsx-no-bind': 'off',
|
|
@@ -138,13 +147,11 @@ module.exports = {
|
|
|
138
147
|
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-undef.md
|
|
139
148
|
'react/jsx-no-undef': 'error',
|
|
140
149
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
},
|
|
147
|
-
],
|
|
150
|
+
/*
|
|
151
|
+
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-one-expression-per-line.md
|
|
152
|
+
* disable to worl with prettier
|
|
153
|
+
*/
|
|
154
|
+
'react/jsx-one-expression-per-line': 'off',
|
|
148
155
|
|
|
149
156
|
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-curly-brace-presence.md
|
|
150
157
|
'react/jsx-curly-brace-presence': [
|
|
@@ -164,8 +171,11 @@ module.exports = {
|
|
|
164
171
|
},
|
|
165
172
|
],
|
|
166
173
|
|
|
167
|
-
|
|
168
|
-
|
|
174
|
+
/*
|
|
175
|
+
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-props-no-multi-spaces.md
|
|
176
|
+
* disable to work with prettier
|
|
177
|
+
*/
|
|
178
|
+
'react/jsx-props-no-multi-spaces': 'off',
|
|
169
179
|
|
|
170
180
|
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/sort-default-props.md
|
|
171
181
|
'react/sort-default-props': 'off',
|
|
@@ -183,16 +193,11 @@ module.exports = {
|
|
|
183
193
|
},
|
|
184
194
|
],
|
|
185
195
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
beforeSelfClosing: 'always',
|
|
192
|
-
afterOpening: 'never',
|
|
193
|
-
beforeClosing: 'never',
|
|
194
|
-
},
|
|
195
|
-
],
|
|
196
|
+
/*
|
|
197
|
+
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-tag-spacing.md
|
|
198
|
+
* disable to work with prettier
|
|
199
|
+
*/
|
|
200
|
+
'react/jsx-tag-spacing': 'off',
|
|
196
201
|
|
|
197
202
|
/*
|
|
198
203
|
* off after update to 16.4
|
|
@@ -203,19 +208,11 @@ module.exports = {
|
|
|
203
208
|
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-uses-vars.md
|
|
204
209
|
'react/jsx-uses-vars': 'error',
|
|
205
210
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
assignment: 'parens-new-line',
|
|
212
|
-
return: 'parens-new-line',
|
|
213
|
-
arrow: 'parens-new-line',
|
|
214
|
-
condition: 'parens-new-line',
|
|
215
|
-
logical: 'parens-new-line',
|
|
216
|
-
prop: 'parens-new-line',
|
|
217
|
-
},
|
|
218
|
-
],
|
|
211
|
+
/*
|
|
212
|
+
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-wrap-multilines.md
|
|
213
|
+
* disable to work with prettier
|
|
214
|
+
*/
|
|
215
|
+
'react/jsx-wrap-multilines': 'off',
|
|
219
216
|
|
|
220
217
|
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-danger.md
|
|
221
218
|
'react/no-danger': 'error',
|
|
@@ -226,14 +223,11 @@ module.exports = {
|
|
|
226
223
|
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prefer-read-only-props.md
|
|
227
224
|
'react/prefer-read-only-props': 'error',
|
|
228
225
|
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
singleline: 'consistent',
|
|
235
|
-
},
|
|
236
|
-
],
|
|
226
|
+
/*
|
|
227
|
+
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-curly-newline.md
|
|
228
|
+
* disable to work with prettier
|
|
229
|
+
*/
|
|
230
|
+
'react/jsx-curly-newline': 'off',
|
|
237
231
|
|
|
238
232
|
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-useless-fragment.md
|
|
239
233
|
'react/jsx-no-useless-fragment': [
|
package/prettier.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
extends: ['./index.js'],
|
|
3
|
-
|
|
4
|
-
rules: {
|
|
5
|
-
'react/jsx-child-element-spacing': 'off',
|
|
6
|
-
'react/jsx-closing-bracket-location': 'off',
|
|
7
|
-
'react/jsx-closing-tag-location': 'off',
|
|
8
|
-
'react/jsx-curly-newline': 'off',
|
|
9
|
-
'react/jsx-curly-spacing': 'off',
|
|
10
|
-
'react/jsx-equals-spacing': 'off',
|
|
11
|
-
'react/jsx-first-prop-new-line': 'off',
|
|
12
|
-
'react/jsx-indent': 'off',
|
|
13
|
-
'react/jsx-indent-props': 'off',
|
|
14
|
-
'react/jsx-max-props-per-line': 'off',
|
|
15
|
-
'react/jsx-newline': 'off',
|
|
16
|
-
'react/jsx-one-expression-per-line': 'off',
|
|
17
|
-
'react/jsx-props-no-multi-spaces': 'off',
|
|
18
|
-
'react/jsx-tag-spacing': 'off',
|
|
19
|
-
'react/jsx-wrap-multilines': 'off',
|
|
20
|
-
},
|
|
21
|
-
};
|