eslint-config-seekingalpha-react 8.0.0 → 9.0.1

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,13 @@
1
1
  # Change Log
2
2
 
3
+ ## 9.0.1 - 2025-03-09
4
+
5
+ - [breaking] migrate to ESM and make flat config default
6
+
7
+ ## 9.0.0 - 2025-03-09
8
+
9
+ - [breaking] migrate to ESM and make flat config default
10
+
3
11
  ## 8.0.0 - 2025-03-07
4
12
 
5
13
  - [new] expose flat config
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 ESLint rules including ECMAScript 6 features, set of [legacy rules](https://eslint.org/docs/rules/#deprecated) and additional rules for `React` We also extend our configuration with following plugins:
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
- If you don't need configuration extended with `React` rules, check out our [base config](https://www.npmjs.com/package/eslint-config-seekingalpha-base).
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
- extends: [
30
- 'seekingalpha-react'
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
- module.exports = {
2
- extends: [
3
- // https://github.com/yannickcr/eslint-plugin-react
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
- // https://github.com/evcohen/eslint-plugin-jsx-a11y
7
- './rules/eslint-plugin-jsx-a11y/index.js',
8
-
9
- // https://reactjs.org/docs/hooks-rules.html
10
- './rules/eslint-plugin-react-hooks/index.js',
11
- ],
12
-
13
- parserOptions: {
14
- ecmaVersion: 12,
15
- sourceType: 'module',
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": "8.0.0",
3
+ "version": "9.0.1",
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,4 +1,4 @@
1
- module.exports = {
1
+ export default {
2
2
  jsxIndent: 2,
3
3
  jsxIndentProps: 2,
4
4
  jsxMaxDepth: 10,
@@ -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
- module.exports = {
2
- plugins: ['react'],
1
+ import reactPlugin from 'eslint-plugin-react';
3
2
 
4
- extends: ['./react.js', './jsx.js'],
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
- const config = require('../config');
1
+ import config from '../config.js';
2
2
 
3
3
  // https://github.com/yannickcr/eslint-plugin-react#jsx-specific-rules
4
-
5
- module.exports = {
6
- rules: {
7
- // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-boolean-value.md
8
- 'react/jsx-boolean-value': [
9
- 'error',
10
- 'never',
11
- {
12
- always: [],
13
- },
14
- ],
15
-
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',
21
-
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
-
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',
33
-
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',
39
-
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
-
46
- // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-filename-extension.md
47
- 'react/jsx-filename-extension': [
48
- 'error',
49
- {
50
- extensions: ['.tsx'],
51
- },
52
- ],
53
-
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',
59
-
60
- // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-fragments.md
61
- 'react/jsx-fragments': ['error', 'syntax'],
62
-
63
- // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-handler-names.md
64
- 'react/jsx-handler-names': 'off',
65
-
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',
71
-
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',
77
-
78
- // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-key.md
79
- 'react/jsx-key': [
80
- 'error',
81
- {
82
- checkFragmentShorthand: true,
83
- checkKeyMustBeforeSpread: true,
84
- warnOnDuplicates: true,
85
- },
86
- ],
87
-
88
- // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-max-depth.md
89
- 'react/jsx-max-depth': [
90
- 'error',
91
- {
92
- max: config.jsxMaxDepth,
93
- },
94
- ],
95
-
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',
101
-
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',
107
-
108
- // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-bind.md
109
- 'react/jsx-no-bind': 'off',
110
-
111
- // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-comment-textnodes.md
112
- 'react/jsx-no-comment-textnodes': 'error',
113
-
114
- // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-constructed-context-values.md
115
- 'react/jsx-no-constructed-context-values': 'error',
116
-
117
- // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-duplicate-props.md
118
- 'react/jsx-no-duplicate-props': [
119
- 'error',
120
- {
121
- ignoreCase: true,
122
- },
123
- ],
124
-
125
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-leaked-render.md
126
- 'react/jsx-no-leaked-render': 'error',
127
-
128
- // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-literals.md
129
- 'react/jsx-no-literals': [
130
- 'off',
131
- {
132
- noStrings: true,
133
- },
134
- ],
135
-
136
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-props-no-spread-multi.md
137
- 'react/jsx-props-no-spread-multi': 'error',
138
-
139
- // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-target-blank.md
140
- 'react/jsx-no-target-blank': [
141
- 'error',
142
- {
143
- enforceDynamicLinks: 'always',
144
- },
145
- ],
146
-
147
- // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-undef.md
148
- 'react/jsx-no-undef': 'error',
149
-
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',
155
-
156
- // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-curly-brace-presence.md
157
- 'react/jsx-curly-brace-presence': [
158
- 'error',
159
- {
160
- props: 'never',
161
- children: 'never',
162
- },
163
- ],
164
-
165
- // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-pascal-case.md
166
- 'react/jsx-pascal-case': [
167
- 'error',
168
- {
169
- allowAllCaps: false,
170
- ignore: [],
171
- },
172
- ],
173
-
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',
179
-
180
- // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/sort-default-props.md
181
- 'react/sort-default-props': 'off',
182
-
183
- // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-sort-props.md
184
- 'react/jsx-sort-props': [
185
- 'error',
186
- {
187
- ignoreCase: true,
188
- callbacksLast: true,
189
- shorthandFirst: true,
190
- shorthandLast: false,
191
- noSortAlphabetically: false,
192
- reservedFirst: false,
193
- },
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',
201
-
202
- /*
203
- * off after update to 16.4
204
- * https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-uses-react.md
205
- */
206
- 'react/jsx-uses-react': 'error',
207
-
208
- // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-uses-vars.md
209
- 'react/jsx-uses-vars': 'error',
210
-
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',
216
-
217
- // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-danger.md
218
- 'react/no-danger': 'error',
219
-
220
- // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-props-no-spreading.md
221
- 'react/jsx-props-no-spreading': 'off',
222
-
223
- // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prefer-read-only-props.md
224
- 'react/prefer-read-only-props': 'error',
225
-
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',
231
-
232
- // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-useless-fragment.md
233
- 'react/jsx-no-useless-fragment': [
234
- 'error',
235
- {
236
- allowExpressions: true,
237
- },
238
- ],
239
-
240
- // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-script-url.md
241
- 'react/jsx-no-script-url': 'error',
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
  };