eslint-config-seekingalpha-react 8.0.0 → 9.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/README.md +15 -10
- package/index.js +13 -19
- package/package.json +2 -1
- package/rules/config.js +1 -1
- package/rules/eslint-plugin-jsx-a11y/index.js +5 -4
- package/rules/eslint-plugin-react/index.js +12 -3
- package/rules/eslint-plugin-react/jsx.js +239 -242
- package/rules/eslint-plugin-react/react.js +356 -358
- package/rules/eslint-plugin-react-hooks/index.js +5 -2
- package/flat.js +0 -16
- package/rules/eslint-plugin-jsx-a11y/flat.js +0 -10
- package/rules/eslint-plugin-react/flat.js +0 -14
- package/rules/eslint-plugin-react-hooks/flat.js +0 -10
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -10,26 +10,31 @@ Install ESLint and all [Peer Dependencies](https://nodejs.org/en/blog/npm/peer-d
|
|
|
10
10
|
|
|
11
11
|
Install SeekingAlpha shareable ESLint:
|
|
12
12
|
|
|
13
|
-
npm install eslint-config-seekingalpha-react --save-dev
|
|
13
|
+
npm install eslint-config-seekingalpha-react@latest --save-dev
|
|
14
14
|
|
|
15
15
|
## Usage
|
|
16
16
|
|
|
17
|
-
This shareable config includes all
|
|
17
|
+
This shareable config includes all rules from following plugins:
|
|
18
18
|
|
|
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-react-hooks](https://www.npmjs.com/package/eslint-plugin-react-hooks)
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
Simply [extend](https://eslint.org/docs/user-guide/configuring#extending-configuration-files) the relevant .eslintrc.js configuration in your project with `seekingalpha-react` rules:
|
|
23
|
+
Simply [use](https://eslint.org/docs/latest/extend/shareable-configs) the eslint.config.js in your project with the configuration:
|
|
26
24
|
|
|
27
25
|
```javascript
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
26
|
+
import reactConfig from 'eslint-config-seekingalpha-react';
|
|
27
|
+
|
|
28
|
+
export default [
|
|
29
|
+
{
|
|
30
|
+
plugins: {
|
|
31
|
+
...reactConfig.plugins,
|
|
32
|
+
},
|
|
33
|
+
rules: {
|
|
34
|
+
...reactConfig.rules,
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
];
|
|
33
38
|
```
|
|
34
39
|
|
|
35
40
|
## License
|
package/index.js
CHANGED
|
@@ -1,22 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
'./rules/eslint-plugin-react/index.js',
|
|
1
|
+
import jsxA11yConfig from './rules/eslint-plugin-jsx-a11y/index.js';
|
|
2
|
+
import reactConfig from './rules/eslint-plugin-react/index.js';
|
|
3
|
+
import reactHooksConfig from './rules/eslint-plugin-react-hooks/index.js';
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
ecmaFeatures: {
|
|
17
|
-
impliedStrict: true,
|
|
18
|
-
globalReturn: false,
|
|
19
|
-
jsx: true,
|
|
20
|
-
},
|
|
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,
|
|
21
15
|
},
|
|
22
16
|
};
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-config-seekingalpha-react",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.0",
|
|
4
4
|
"description": "SeekingAlpha's sharable React.js ESLint config",
|
|
5
5
|
"main": "index.js",
|
|
6
|
+
"type": "module",
|
|
6
7
|
"scripts": {
|
|
7
8
|
"eslint-find-rules": "eslint-find-rules -u ./index.js",
|
|
8
9
|
"test": "echo \"Error: no test specified\" && exit 1"
|
package/rules/config.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
module.exports = {
|
|
4
|
-
plugins: ['jsx-a11y'],
|
|
1
|
+
import jsxA11y from 'eslint-plugin-jsx-a11y';
|
|
5
2
|
|
|
3
|
+
export default {
|
|
4
|
+
plugins: {
|
|
5
|
+
'jsx-a11y': jsxA11y,
|
|
6
|
+
},
|
|
6
7
|
rules: {
|
|
7
8
|
// https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/alt-text.md
|
|
8
9
|
'jsx-a11y/alt-text': [
|
|
@@ -1,5 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
plugins: ['react'],
|
|
1
|
+
import reactPlugin from 'eslint-plugin-react';
|
|
3
2
|
|
|
4
|
-
|
|
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
|
+
},
|
|
5
14
|
};
|
|
@@ -1,245 +1,242 @@
|
|
|
1
|
-
|
|
1
|
+
import config from '../config';
|
|
2
2
|
|
|
3
3
|
// https://github.com/yannickcr/eslint-plugin-react#jsx-specific-rules
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
'
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
'
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
'
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
'
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
'react/no-object-type-as-default-prop': 'error',
|
|
244
|
-
},
|
|
4
|
+
export default {
|
|
5
|
+
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-boolean-value.md
|
|
6
|
+
'react/jsx-boolean-value': [
|
|
7
|
+
'error',
|
|
8
|
+
'never',
|
|
9
|
+
{
|
|
10
|
+
always: [],
|
|
11
|
+
},
|
|
12
|
+
],
|
|
13
|
+
|
|
14
|
+
/*
|
|
15
|
+
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-child-element-spacing.md
|
|
16
|
+
* Disabled to work with prettier
|
|
17
|
+
*/
|
|
18
|
+
'react/jsx-child-element-spacing': 'off',
|
|
19
|
+
|
|
20
|
+
/*
|
|
21
|
+
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-closing-bracket-location.md
|
|
22
|
+
* disable to work with prettier
|
|
23
|
+
*/
|
|
24
|
+
'react/jsx-closing-bracket-location': 'off',
|
|
25
|
+
|
|
26
|
+
/*
|
|
27
|
+
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-closing-tag-location.md
|
|
28
|
+
* disable to work with prettier
|
|
29
|
+
*/
|
|
30
|
+
'react/jsx-closing-tag-location': 'off',
|
|
31
|
+
|
|
32
|
+
/*
|
|
33
|
+
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-curly-spacing.md
|
|
34
|
+
* disable to work with prettier
|
|
35
|
+
*/
|
|
36
|
+
'react/jsx-curly-spacing': 'off',
|
|
37
|
+
|
|
38
|
+
/*
|
|
39
|
+
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-equals-spacing.md
|
|
40
|
+
* disable to work with prettier
|
|
41
|
+
*/
|
|
42
|
+
'react/jsx-equals-spacing': 'off',
|
|
43
|
+
|
|
44
|
+
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-filename-extension.md
|
|
45
|
+
'react/jsx-filename-extension': [
|
|
46
|
+
'error',
|
|
47
|
+
{
|
|
48
|
+
extensions: ['.tsx'],
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
|
|
52
|
+
/*
|
|
53
|
+
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-first-prop-new-line.md
|
|
54
|
+
* disable to work with prettier
|
|
55
|
+
*/
|
|
56
|
+
'react/jsx-first-prop-new-line': 'off',
|
|
57
|
+
|
|
58
|
+
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-fragments.md
|
|
59
|
+
'react/jsx-fragments': ['error', 'syntax'],
|
|
60
|
+
|
|
61
|
+
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-handler-names.md
|
|
62
|
+
'react/jsx-handler-names': 'off',
|
|
63
|
+
|
|
64
|
+
/*
|
|
65
|
+
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-indent.md
|
|
66
|
+
* disable to work with prettier
|
|
67
|
+
*/
|
|
68
|
+
'react/jsx-indent': 'off',
|
|
69
|
+
|
|
70
|
+
/*
|
|
71
|
+
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-indent-props.md
|
|
72
|
+
* disable ti work with prettier
|
|
73
|
+
*/
|
|
74
|
+
'react/jsx-indent-props': 'off',
|
|
75
|
+
|
|
76
|
+
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-key.md
|
|
77
|
+
'react/jsx-key': [
|
|
78
|
+
'error',
|
|
79
|
+
{
|
|
80
|
+
checkFragmentShorthand: true,
|
|
81
|
+
checkKeyMustBeforeSpread: true,
|
|
82
|
+
warnOnDuplicates: true,
|
|
83
|
+
},
|
|
84
|
+
],
|
|
85
|
+
|
|
86
|
+
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-max-depth.md
|
|
87
|
+
'react/jsx-max-depth': [
|
|
88
|
+
'error',
|
|
89
|
+
{
|
|
90
|
+
max: config.jsxMaxDepth,
|
|
91
|
+
},
|
|
92
|
+
],
|
|
93
|
+
|
|
94
|
+
/*
|
|
95
|
+
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-max-props-per-line.md
|
|
96
|
+
* disable to work with prettier
|
|
97
|
+
*/
|
|
98
|
+
'react/jsx-max-props-per-line': 'off',
|
|
99
|
+
|
|
100
|
+
/*
|
|
101
|
+
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-newline.md
|
|
102
|
+
* disable to work with prettier
|
|
103
|
+
*/
|
|
104
|
+
'react/jsx-newline': 'off',
|
|
105
|
+
|
|
106
|
+
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-bind.md
|
|
107
|
+
'react/jsx-no-bind': 'off',
|
|
108
|
+
|
|
109
|
+
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-comment-textnodes.md
|
|
110
|
+
'react/jsx-no-comment-textnodes': 'error',
|
|
111
|
+
|
|
112
|
+
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-constructed-context-values.md
|
|
113
|
+
'react/jsx-no-constructed-context-values': 'error',
|
|
114
|
+
|
|
115
|
+
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-duplicate-props.md
|
|
116
|
+
'react/jsx-no-duplicate-props': [
|
|
117
|
+
'error',
|
|
118
|
+
{
|
|
119
|
+
ignoreCase: true,
|
|
120
|
+
},
|
|
121
|
+
],
|
|
122
|
+
|
|
123
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-leaked-render.md
|
|
124
|
+
'react/jsx-no-leaked-render': 'error',
|
|
125
|
+
|
|
126
|
+
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-literals.md
|
|
127
|
+
'react/jsx-no-literals': [
|
|
128
|
+
'off',
|
|
129
|
+
{
|
|
130
|
+
noStrings: true,
|
|
131
|
+
},
|
|
132
|
+
],
|
|
133
|
+
|
|
134
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-props-no-spread-multi.md
|
|
135
|
+
'react/jsx-props-no-spread-multi': 'error',
|
|
136
|
+
|
|
137
|
+
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-target-blank.md
|
|
138
|
+
'react/jsx-no-target-blank': [
|
|
139
|
+
'error',
|
|
140
|
+
{
|
|
141
|
+
enforceDynamicLinks: 'always',
|
|
142
|
+
},
|
|
143
|
+
],
|
|
144
|
+
|
|
145
|
+
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-undef.md
|
|
146
|
+
'react/jsx-no-undef': 'error',
|
|
147
|
+
|
|
148
|
+
/*
|
|
149
|
+
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-one-expression-per-line.md
|
|
150
|
+
* disable to worl with prettier
|
|
151
|
+
*/
|
|
152
|
+
'react/jsx-one-expression-per-line': 'off',
|
|
153
|
+
|
|
154
|
+
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-curly-brace-presence.md
|
|
155
|
+
'react/jsx-curly-brace-presence': [
|
|
156
|
+
'error',
|
|
157
|
+
{
|
|
158
|
+
props: 'never',
|
|
159
|
+
children: 'never',
|
|
160
|
+
},
|
|
161
|
+
],
|
|
162
|
+
|
|
163
|
+
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-pascal-case.md
|
|
164
|
+
'react/jsx-pascal-case': [
|
|
165
|
+
'error',
|
|
166
|
+
{
|
|
167
|
+
allowAllCaps: false,
|
|
168
|
+
ignore: [],
|
|
169
|
+
},
|
|
170
|
+
],
|
|
171
|
+
|
|
172
|
+
/*
|
|
173
|
+
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-props-no-multi-spaces.md
|
|
174
|
+
* disable to work with prettier
|
|
175
|
+
*/
|
|
176
|
+
'react/jsx-props-no-multi-spaces': 'off',
|
|
177
|
+
|
|
178
|
+
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/sort-default-props.md
|
|
179
|
+
'react/sort-default-props': 'off',
|
|
180
|
+
|
|
181
|
+
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-sort-props.md
|
|
182
|
+
'react/jsx-sort-props': [
|
|
183
|
+
'error',
|
|
184
|
+
{
|
|
185
|
+
ignoreCase: true,
|
|
186
|
+
callbacksLast: true,
|
|
187
|
+
shorthandFirst: true,
|
|
188
|
+
shorthandLast: false,
|
|
189
|
+
noSortAlphabetically: false,
|
|
190
|
+
reservedFirst: false,
|
|
191
|
+
},
|
|
192
|
+
],
|
|
193
|
+
|
|
194
|
+
/*
|
|
195
|
+
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-tag-spacing.md
|
|
196
|
+
* disable to work with prettier
|
|
197
|
+
*/
|
|
198
|
+
'react/jsx-tag-spacing': 'off',
|
|
199
|
+
|
|
200
|
+
/*
|
|
201
|
+
* off after update to 16.4
|
|
202
|
+
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-uses-react.md
|
|
203
|
+
*/
|
|
204
|
+
'react/jsx-uses-react': 'error',
|
|
205
|
+
|
|
206
|
+
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-uses-vars.md
|
|
207
|
+
'react/jsx-uses-vars': 'error',
|
|
208
|
+
|
|
209
|
+
/*
|
|
210
|
+
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-wrap-multilines.md
|
|
211
|
+
* disable to work with prettier
|
|
212
|
+
*/
|
|
213
|
+
'react/jsx-wrap-multilines': 'off',
|
|
214
|
+
|
|
215
|
+
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-danger.md
|
|
216
|
+
'react/no-danger': 'error',
|
|
217
|
+
|
|
218
|
+
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-props-no-spreading.md
|
|
219
|
+
'react/jsx-props-no-spreading': 'off',
|
|
220
|
+
|
|
221
|
+
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prefer-read-only-props.md
|
|
222
|
+
'react/prefer-read-only-props': 'error',
|
|
223
|
+
|
|
224
|
+
/*
|
|
225
|
+
* https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-curly-newline.md
|
|
226
|
+
* disable to work with prettier
|
|
227
|
+
*/
|
|
228
|
+
'react/jsx-curly-newline': 'off',
|
|
229
|
+
|
|
230
|
+
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-useless-fragment.md
|
|
231
|
+
'react/jsx-no-useless-fragment': [
|
|
232
|
+
'error',
|
|
233
|
+
{
|
|
234
|
+
allowExpressions: true,
|
|
235
|
+
},
|
|
236
|
+
],
|
|
237
|
+
|
|
238
|
+
// https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-script-url.md
|
|
239
|
+
'react/jsx-no-script-url': 'error',
|
|
240
|
+
|
|
241
|
+
'react/no-object-type-as-default-prop': 'error',
|
|
245
242
|
};
|