@krivega/eslint-config 1.1.11 → 1.1.13
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 +3 -14
- package/index.js +1 -1
- package/index.ts +1 -1
- package/package.json +11 -18
- package/react.js +122 -123
- package/react.ts +0 -513
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.1.13](https://github.com/Krivega/eslint-config/compare/v1.1.12...v1.1.13) (2026-02-13)
|
|
4
|
+
|
|
5
|
+
## [1.1.12](https://github.com/Krivega/eslint-config/compare/v1.1.11...v1.1.12) (2026-02-09)
|
|
6
|
+
|
|
3
7
|
## [1.1.11](https://github.com/Krivega/eslint-config/compare/v1.1.10...v1.1.11) (2026-02-09)
|
|
4
8
|
|
|
5
9
|
## [1.1.10](https://github.com/Krivega/eslint-config/compare/v1.1.9...v1.1.10) (2026-02-08)
|
package/README.md
CHANGED
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
## Описание
|
|
4
4
|
|
|
5
|
-
`Eslint config` содержит модули, позволяющие применят правила `krivega` `eslint` для проектов, использующих `typescript`,
|
|
5
|
+
`Eslint config` содержит модули, позволяющие применят правила `krivega` `eslint` для проектов, использующих `typescript`, `тестовые фреймворки`jest`и`cypress`
|
|
6
6
|
|
|
7
7
|
- [`@krivega/eslint-config`](#@krivega/eslint-config)
|
|
8
|
-
- [`@krivega/eslint-config/react`](#@krivega/eslint-config/react)
|
|
9
8
|
- [`@krivega/eslint-config/jest`](#@krivega/eslint-config/jest)
|
|
10
9
|
- [`@krivega/eslint-config/cypress`](#@krivega/eslint-config/cypress)
|
|
11
10
|
|
|
@@ -37,23 +36,13 @@ yarn add @krivega/eslint-config --dev
|
|
|
37
36
|
}
|
|
38
37
|
```
|
|
39
38
|
|
|
40
|
-
#### <a name="@krivega/eslint-config/react"></a> `@krivega/eslint-config/react`
|
|
41
|
-
|
|
42
|
-
Необходимо расширить правила `@krivega/eslint-config/react` в корневом файле `.eslintrc.json`
|
|
43
|
-
|
|
44
|
-
```json
|
|
45
|
-
{
|
|
46
|
-
"extends": ["@krivega/eslint-config/react"]
|
|
47
|
-
}
|
|
48
|
-
```
|
|
49
|
-
|
|
50
39
|
#### <a name="@krivega/eslint-config/jest"></a> `@krivega/eslint-config/jest`
|
|
51
40
|
|
|
52
|
-
Необходимо расширить правила `@krivega/eslint-config/jest` в корневом файле `.eslintrc.json`.
|
|
41
|
+
Необходимо расширить правила `@krivega/eslint-config/jest` в корневом файле `.eslintrc.json`.
|
|
53
42
|
|
|
54
43
|
```json
|
|
55
44
|
{
|
|
56
|
-
"extends": ["@krivega/eslint-config/jest"
|
|
45
|
+
"extends": ["@krivega/eslint-config/jest"]
|
|
57
46
|
}
|
|
58
47
|
```
|
|
59
48
|
|
package/index.js
CHANGED
|
@@ -827,7 +827,7 @@ const config = [
|
|
|
827
827
|
'@typescript-eslint/no-unsafe-function-type': 'error',
|
|
828
828
|
'@typescript-eslint/no-restricted-types': 'error',
|
|
829
829
|
'@typescript-eslint/class-literal-property-style': ['error'],
|
|
830
|
-
'@typescript-eslint/consistent-generic-constructors': ['error']
|
|
830
|
+
// '@typescript-eslint/consistent-generic-constructors': ['error'],// TODO: enable this rule after fix (not working with eslint 10.0.0)
|
|
831
831
|
'@typescript-eslint/consistent-indexed-object-style': ['error'],
|
|
832
832
|
'@typescript-eslint/consistent-return': ['error'],
|
|
833
833
|
'@typescript-eslint/consistent-type-assertions': ['error'],
|
package/index.ts
CHANGED
|
@@ -833,7 +833,7 @@ const config: Linter.Config[] = [
|
|
|
833
833
|
'@typescript-eslint/no-unsafe-function-type': 'error',
|
|
834
834
|
'@typescript-eslint/no-restricted-types': 'error',
|
|
835
835
|
'@typescript-eslint/class-literal-property-style': ['error'],
|
|
836
|
-
'@typescript-eslint/consistent-generic-constructors': ['error']
|
|
836
|
+
// '@typescript-eslint/consistent-generic-constructors': ['error'],// TODO: enable this rule after fix (not working with eslint 10.0.0)
|
|
837
837
|
'@typescript-eslint/consistent-indexed-object-style': ['error'],
|
|
838
838
|
'@typescript-eslint/consistent-return': ['error'],
|
|
839
839
|
'@typescript-eslint/consistent-type-assertions': ['error'],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@krivega/eslint-config",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.13",
|
|
4
4
|
"bugs": {
|
|
5
5
|
"url": "https://github.com/Krivega/eslint-config/issues"
|
|
6
6
|
},
|
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
"type": "module",
|
|
18
18
|
"exports": {
|
|
19
19
|
".": "./index.js",
|
|
20
|
-
"./react": "./react.js",
|
|
21
20
|
"./jest": "./jest.js",
|
|
22
21
|
"./cypress": "./cypress.js",
|
|
23
22
|
"./package.json": "./package.json"
|
|
@@ -25,31 +24,25 @@
|
|
|
25
24
|
"scripts": {
|
|
26
25
|
"build": "tsc -p tsconfig.json",
|
|
27
26
|
"lint": "yarn build && yarn lint:src && yarn lint:examples",
|
|
28
|
-
"lint:examples": "yarn --cwd ./example lint
|
|
27
|
+
"lint:examples": "yarn --cwd ./example lint ",
|
|
29
28
|
"lint:src": "yarn lint:ts",
|
|
30
29
|
"lint:ts": "tsc --noEmit --project tsconfig.json",
|
|
31
30
|
"prepublishOnly": "yarn build",
|
|
32
31
|
"release": "release-it --only-version",
|
|
33
|
-
"run:postinstall": "yarn --cwd ./example install
|
|
32
|
+
"run:postinstall": "yarn --cwd ./example install"
|
|
34
33
|
},
|
|
35
34
|
"dependencies": {
|
|
36
35
|
"@babel/preset-typescript": "^7.28.5",
|
|
37
|
-
"@stylistic/eslint-plugin": "^5.
|
|
38
|
-
"@
|
|
39
|
-
"@typescript-eslint/
|
|
40
|
-
"
|
|
41
|
-
"eslint": "^9.39.2",
|
|
36
|
+
"@stylistic/eslint-plugin": "^5.8.0",
|
|
37
|
+
"@typescript-eslint/eslint-plugin": "^8.55.0",
|
|
38
|
+
"@typescript-eslint/parser": "^8.55.0",
|
|
39
|
+
"eslint": "^10.0.0",
|
|
42
40
|
"eslint-import-resolver-typescript": "^4.4.4",
|
|
43
|
-
"eslint-plugin-cypress": "^5.
|
|
44
|
-
"eslint-plugin-flowtype": "^8.0.3",
|
|
41
|
+
"eslint-plugin-cypress": "^5.3.0",
|
|
45
42
|
"eslint-plugin-import": "^2.32.0",
|
|
46
|
-
"eslint-plugin-jest": "^29.
|
|
47
|
-
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
43
|
+
"eslint-plugin-jest": "^29.14.0",
|
|
48
44
|
"eslint-plugin-prettier": "^5.5.5",
|
|
49
|
-
"eslint-plugin-
|
|
50
|
-
"eslint-plugin-react-hooks": "^7.0.1",
|
|
51
|
-
"eslint-plugin-react-refresh": "^0.5.0",
|
|
52
|
-
"eslint-plugin-unicorn": "^62.0.0",
|
|
45
|
+
"eslint-plugin-unicorn": "^63.0.0",
|
|
53
46
|
"globals": "^17.3.0",
|
|
54
47
|
"jiti": "^2.6.1",
|
|
55
48
|
"typescript": "^5.9.3"
|
|
@@ -62,7 +55,7 @@
|
|
|
62
55
|
"release-it": "^19.2.4"
|
|
63
56
|
},
|
|
64
57
|
"peerDependencies": {
|
|
65
|
-
"eslint": "^
|
|
58
|
+
"eslint": "^10.0.0",
|
|
66
59
|
"typescript": "^5.9.3"
|
|
67
60
|
},
|
|
68
61
|
"packageManager": "yarn@1.22.22"
|
package/react.js
CHANGED
|
@@ -216,19 +216,19 @@ const reactConfig = [
|
|
|
216
216
|
},
|
|
217
217
|
],
|
|
218
218
|
'react/checked-requires-onchange-or-readonly': [2],
|
|
219
|
-
'react/default-props-match-prop-types': [
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
],
|
|
225
|
-
'react/destructuring-assignment': [2, 'always'],
|
|
226
|
-
'react/display-name': [
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
]
|
|
219
|
+
// 'react/default-props-match-prop-types': [
|
|
220
|
+
// 2,
|
|
221
|
+
// {
|
|
222
|
+
// allowRequiredDefaults: false,
|
|
223
|
+
// },
|
|
224
|
+
// ], // TODO: enable this rule after fix (not working with eslint 10.0.0)
|
|
225
|
+
// 'react/destructuring-assignment': [2, 'always'], // TODO: enable this rule after fix (not working with eslint 10.0.0)
|
|
226
|
+
// 'react/display-name': [
|
|
227
|
+
// 2,
|
|
228
|
+
// {
|
|
229
|
+
// ignoreTranspilerName: false,
|
|
230
|
+
// },
|
|
231
|
+
// ],// TODO: enable this rule after fix (not working with eslint 10.0.0)
|
|
232
232
|
'react/forbid-component-props': [
|
|
233
233
|
2,
|
|
234
234
|
{
|
|
@@ -253,8 +253,8 @@ const reactConfig = [
|
|
|
253
253
|
allowInPropTypes: true,
|
|
254
254
|
},
|
|
255
255
|
],
|
|
256
|
-
'react/forward-ref-uses-ref': [2]
|
|
257
|
-
'react/hook-use-state': [2]
|
|
256
|
+
// 'react/forward-ref-uses-ref': [2],// TODO: enable this rule after fix (not working with eslint 10.0.0)
|
|
257
|
+
// 'react/hook-use-state': [2],// TODO: enable this rule after fix (not working with eslint 10.0.0)
|
|
258
258
|
'react/iframe-missing-sandbox': [2],
|
|
259
259
|
'react/jsx-boolean-value': [
|
|
260
260
|
2,
|
|
@@ -287,14 +287,14 @@ const reactConfig = [
|
|
|
287
287
|
},
|
|
288
288
|
],
|
|
289
289
|
'react/jsx-equals-spacing': [2, 'never'],
|
|
290
|
-
'react/jsx-filename-extension': [
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
]
|
|
290
|
+
// 'react/jsx-filename-extension': [
|
|
291
|
+
// 2,
|
|
292
|
+
// {
|
|
293
|
+
// extensions: ['.jsx', '.tsx'],
|
|
294
|
+
// },
|
|
295
|
+
// ],// TODO: enable this rule after fix (not working with eslint 10.0.0)
|
|
296
296
|
'react/jsx-first-prop-new-line': [2, 'multiline-multiprop'],
|
|
297
|
-
'react/jsx-fragments': [2, 'syntax'],
|
|
297
|
+
// 'react/jsx-fragments': [2, 'syntax'], // TODO: enable this rule after fix (not working with eslint 10.0.0)
|
|
298
298
|
'react/jsx-handler-names': [
|
|
299
299
|
2,
|
|
300
300
|
{
|
|
@@ -349,110 +349,110 @@ const reactConfig = [
|
|
|
349
349
|
html: 'enforce',
|
|
350
350
|
},
|
|
351
351
|
],
|
|
352
|
-
'react/jsx-tag-spacing': [
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
],
|
|
352
|
+
// 'react/jsx-tag-spacing': [
|
|
353
|
+
// 2,
|
|
354
|
+
// {
|
|
355
|
+
// afterOpening: 'never',
|
|
356
|
+
// beforeClosing: 'never',
|
|
357
|
+
// beforeSelfClosing: 'always',
|
|
358
|
+
// closingSlash: 'never',
|
|
359
|
+
// },
|
|
360
|
+
// ], // TODO: enable this rule after fix (not working with eslint 10.0.0)
|
|
361
361
|
'react/jsx-uses-vars': [2],
|
|
362
362
|
'react/no-access-state-in-setstate': [2],
|
|
363
363
|
'react/no-adjacent-inline-elements': [2],
|
|
364
364
|
'react/no-array-index-key': [2],
|
|
365
|
-
'react/no-arrow-function-lifecycle': [2]
|
|
365
|
+
// 'react/no-arrow-function-lifecycle': [2],// TODO: enable this rule after fix (not working with eslint 10.0.0)
|
|
366
366
|
'react/no-children-prop': [2],
|
|
367
367
|
'react/no-danger': [2],
|
|
368
368
|
'react/no-danger-with-children': [2],
|
|
369
369
|
'react/no-deprecated': [2],
|
|
370
|
-
'react/no-did-mount-set-state': [2]
|
|
371
|
-
'react/no-did-update-set-state': [2]
|
|
372
|
-
'react/no-direct-mutation-state': [2]
|
|
370
|
+
// 'react/no-did-mount-set-state': [2],// TODO: enable this rule after fix (not working with eslint 10.0.0)
|
|
371
|
+
// 'react/no-did-update-set-state': [2],// TODO: enable this rule after fix (not working with eslint 10.0.0)
|
|
372
|
+
// 'react/no-direct-mutation-state': [2],// TODO: enable this rule after fix (not working with eslint 10.0.0)
|
|
373
373
|
'react/no-find-dom-node': [2],
|
|
374
374
|
'react/no-invalid-html-attribute': [2],
|
|
375
375
|
'react/no-is-mounted': [2],
|
|
376
|
-
'react/no-multi-comp': [2]
|
|
376
|
+
// 'react/no-multi-comp': [2],// TODO: enable this rule after fix (not working with eslint 10.0.0)
|
|
377
377
|
'react/no-namespace': [2],
|
|
378
|
-
'react/no-object-type-as-default-prop': [2]
|
|
378
|
+
// 'react/no-object-type-as-default-prop': [2],// TODO: enable this rule after fix (not working with eslint 10.0.0)
|
|
379
379
|
'react/no-redundant-should-component-update': [2],
|
|
380
|
-
'react/no-render-return-value': [2],
|
|
381
|
-
'react/no-string-refs': [2],
|
|
382
|
-
'react/no-this-in-sfc': [2]
|
|
383
|
-
'react/no-typos': [2]
|
|
380
|
+
// 'react/no-render-return-value': [2], // TODO: enable this rule after fix (not working with eslint 10.0.0)
|
|
381
|
+
// 'react/no-string-refs': [2], // TODO: enable this rule after fix (not working with eslint 10.0.0)
|
|
382
|
+
// 'react/no-this-in-sfc': [2],// TODO: enable this rule after fix (not working with eslint 10.0.0)
|
|
383
|
+
// 'react/no-typos': [2],// TODO: enable this rule after fix (not working with eslint 10.0.0)
|
|
384
384
|
'react/no-unescaped-entities': [2],
|
|
385
385
|
'react/no-unknown-property': [2],
|
|
386
|
-
'react/no-unsafe': [2]
|
|
386
|
+
// 'react/no-unsafe': [2],// TODO: enable this rule after fix (not working with eslint 10.0.0)
|
|
387
387
|
'react/no-unused-class-component-methods': [2],
|
|
388
|
-
'react/no-unused-prop-types': [
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
],
|
|
388
|
+
// 'react/no-unused-prop-types': [
|
|
389
|
+
// 2,
|
|
390
|
+
// {
|
|
391
|
+
// customValidators: [],
|
|
392
|
+
// skipShapeProps: true,
|
|
393
|
+
// },
|
|
394
|
+
// ], // TODO: enable this rule after fix (not working with eslint 10.0.0)
|
|
395
395
|
'react/no-unused-state': [2],
|
|
396
396
|
'react/no-will-update-set-state': [2],
|
|
397
397
|
'react/prefer-es6-class': [2, 'always'],
|
|
398
|
-
'react/prefer-exact-props': [2]
|
|
399
|
-
'react/require-optimization': [
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
],
|
|
405
|
-
'react/require-render-return': [2]
|
|
398
|
+
// 'react/prefer-exact-props': [2],// TODO: enable this rule after fix (not working with eslint 10.0.0)
|
|
399
|
+
// 'react/require-optimization': [
|
|
400
|
+
// 2,
|
|
401
|
+
// {
|
|
402
|
+
// allowDecorators: [],
|
|
403
|
+
// },
|
|
404
|
+
// ], // TODO: enable this rule after fix (not working with eslint 10.0.0)
|
|
405
|
+
// 'react/require-render-return': [2],// TODO: enable this rule after fix (not working with eslint 10.0.0)
|
|
406
406
|
'react/self-closing-comp': [2],
|
|
407
|
-
'react/sort-comp': [
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
],
|
|
407
|
+
// 'react/sort-comp': [
|
|
408
|
+
// 2,
|
|
409
|
+
// {
|
|
410
|
+
// groups: {
|
|
411
|
+
// lifecycle: [
|
|
412
|
+
// 'displayName',
|
|
413
|
+
// 'propTypes',
|
|
414
|
+
// 'contextTypes',
|
|
415
|
+
// 'childContextTypes',
|
|
416
|
+
// 'mixins',
|
|
417
|
+
// 'statics',
|
|
418
|
+
// 'defaultProps',
|
|
419
|
+
// 'constructor',
|
|
420
|
+
// 'getDefaultProps',
|
|
421
|
+
// 'getInitialState',
|
|
422
|
+
// 'state',
|
|
423
|
+
// 'getChildContext',
|
|
424
|
+
// 'getDerivedStateFromProps',
|
|
425
|
+
// 'componentWillMount',
|
|
426
|
+
// 'UNSAFE_componentWillMount',
|
|
427
|
+
// 'componentDidMount',
|
|
428
|
+
// 'componentWillReceiveProps',
|
|
429
|
+
// 'UNSAFE_componentWillReceiveProps',
|
|
430
|
+
// 'shouldComponentUpdate',
|
|
431
|
+
// 'componentWillUpdate',
|
|
432
|
+
// 'UNSAFE_componentWillUpdate',
|
|
433
|
+
// 'getSnapshotBeforeUpdate',
|
|
434
|
+
// 'componentDidUpdate',
|
|
435
|
+
// 'componentDidCatch',
|
|
436
|
+
// 'componentWillUnmount',
|
|
437
|
+
// ],
|
|
438
|
+
// rendering: ['/^render.+$/', 'render'],
|
|
439
|
+
// },
|
|
440
|
+
// order: [
|
|
441
|
+
// 'static-variables',
|
|
442
|
+
// 'static-methods',
|
|
443
|
+
// 'instance-variables',
|
|
444
|
+
// 'lifecycle',
|
|
445
|
+
// '/^handle.+$/',
|
|
446
|
+
// '/^on.+$/',
|
|
447
|
+
// 'getters',
|
|
448
|
+
// 'setters',
|
|
449
|
+
// '/^(get|set)(?!(InitialState$|DefaultProps$|ChildContext$)).+$/',
|
|
450
|
+
// 'instance-methods',
|
|
451
|
+
// 'everything-else',
|
|
452
|
+
// 'rendering',
|
|
453
|
+
// ],
|
|
454
|
+
// },
|
|
455
|
+
// ], // TODO: enable this rule after fix (not working with eslint 10.0.0)
|
|
456
456
|
'react/sort-default-props': [2],
|
|
457
457
|
'react/sort-prop-types': [
|
|
458
458
|
2,
|
|
@@ -463,16 +463,16 @@ const reactConfig = [
|
|
|
463
463
|
sortShapeProp: true,
|
|
464
464
|
},
|
|
465
465
|
],
|
|
466
|
-
'react/static-property-placement': [2, 'property assignment']
|
|
466
|
+
// 'react/static-property-placement': [2, 'property assignment'],// TODO: enable this rule after fix (not working with eslint 10.0.0)
|
|
467
467
|
'react/style-prop-object': [2],
|
|
468
468
|
'react/void-dom-elements-no-children': [2],
|
|
469
|
-
'react/boolean-prop-naming': [
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
],
|
|
475
|
-
'react/no-unstable-nested-components': 'error',
|
|
469
|
+
// 'react/boolean-prop-naming': [
|
|
470
|
+
// 'error',
|
|
471
|
+
// {
|
|
472
|
+
// validateNested: true,
|
|
473
|
+
// },
|
|
474
|
+
// ], // TODO: enable this rule after fix (not working with eslint 10.0.0)
|
|
475
|
+
// 'react/no-unstable-nested-components': 'error', // TODO: enable this rule after fix (not working with eslint 10.0.0)
|
|
476
476
|
'react/jsx-key': 'error',
|
|
477
477
|
'react/jsx-no-bind': [
|
|
478
478
|
'error',
|
|
@@ -493,16 +493,15 @@ const reactConfig = [
|
|
|
493
493
|
reservedFirst: false,
|
|
494
494
|
},
|
|
495
495
|
],
|
|
496
|
-
'react/function-component-definition': [
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
],
|
|
503
|
-
'react/jsx-no-constructed-context-values': 'error'
|
|
496
|
+
// 'react/function-component-definition': [
|
|
497
|
+
// 'error',
|
|
498
|
+
// {
|
|
499
|
+
// namedComponents: 'arrow-function',
|
|
500
|
+
// unnamedComponents: 'arrow-function',
|
|
501
|
+
// },
|
|
502
|
+
// ], // TODO: enable this rule after fix (not working with eslint 10.0.0)
|
|
503
|
+
// 'react/jsx-no-constructed-context-values': 'error',// TODO: enable this rule after fix (not working with eslint 10.0.0)
|
|
504
504
|
'react/jsx-no-script-url': 'error',
|
|
505
|
-
'arrow-body-style': ['error', 'always'],
|
|
506
505
|
},
|
|
507
506
|
},
|
|
508
507
|
];
|
package/react.ts
DELETED
|
@@ -1,513 +0,0 @@
|
|
|
1
|
-
import type { ESLint, Linter } from 'eslint';
|
|
2
|
-
import jsxA11y from 'eslint-plugin-jsx-a11y';
|
|
3
|
-
import react from 'eslint-plugin-react';
|
|
4
|
-
import reactHooks from 'eslint-plugin-react-hooks';
|
|
5
|
-
import config from './index.js';
|
|
6
|
-
|
|
7
|
-
const reactConfig: Linter.Config[] = [
|
|
8
|
-
...config,
|
|
9
|
-
{
|
|
10
|
-
settings: {
|
|
11
|
-
react: {
|
|
12
|
-
version: 'detect',
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
|
-
plugins: {
|
|
16
|
-
'react-hooks': reactHooks as unknown as ESLint.Plugin,
|
|
17
|
-
'jsx-a11y': jsxA11y as unknown as ESLint.Plugin,
|
|
18
|
-
react: react as unknown as ESLint.Plugin,
|
|
19
|
-
},
|
|
20
|
-
rules: {
|
|
21
|
-
'@stylistic/jsx-closing-bracket-location': ['error'],
|
|
22
|
-
'@stylistic/jsx-closing-tag-location': ['error'],
|
|
23
|
-
'@stylistic/jsx-curly-brace-presence': [
|
|
24
|
-
'error',
|
|
25
|
-
{
|
|
26
|
-
propElementValues: 'always',
|
|
27
|
-
},
|
|
28
|
-
],
|
|
29
|
-
'@stylistic/jsx-curly-newline': ['error'],
|
|
30
|
-
'@stylistic/jsx-curly-spacing': ['error', 'never'],
|
|
31
|
-
'@stylistic/jsx-equals-spacing': ['error'],
|
|
32
|
-
'@stylistic/jsx-first-prop-new-line': ['error'],
|
|
33
|
-
'@stylistic/jsx-function-call-newline': ['error', 'multiline'],
|
|
34
|
-
'@stylistic/jsx-indent-props': ['error', 2],
|
|
35
|
-
'@stylistic/jsx-max-props-per-line': [
|
|
36
|
-
'error',
|
|
37
|
-
{
|
|
38
|
-
maximum: 1,
|
|
39
|
-
when: 'multiline',
|
|
40
|
-
},
|
|
41
|
-
],
|
|
42
|
-
'@stylistic/jsx-quotes': ['error'],
|
|
43
|
-
'@stylistic/jsx-tag-spacing': [
|
|
44
|
-
'error',
|
|
45
|
-
{
|
|
46
|
-
afterOpening: 'never',
|
|
47
|
-
beforeClosing: 'never',
|
|
48
|
-
beforeSelfClosing: 'always',
|
|
49
|
-
closingSlash: 'never',
|
|
50
|
-
},
|
|
51
|
-
],
|
|
52
|
-
'@stylistic/jsx-wrap-multilines': [
|
|
53
|
-
'error',
|
|
54
|
-
{
|
|
55
|
-
arrow: 'parens-new-line',
|
|
56
|
-
assignment: 'parens-new-line',
|
|
57
|
-
condition: 'parens-new-line',
|
|
58
|
-
declaration: 'parens-new-line',
|
|
59
|
-
logical: 'parens-new-line',
|
|
60
|
-
// prop: 'parens-new-line',
|
|
61
|
-
propertyValue: 'parens-new-line',
|
|
62
|
-
return: 'parens-new-line',
|
|
63
|
-
},
|
|
64
|
-
],
|
|
65
|
-
'jsx-a11y/alt-text': [
|
|
66
|
-
'error',
|
|
67
|
-
{
|
|
68
|
-
area: [],
|
|
69
|
-
elements: ['img', 'object', 'area', 'input[type="image"]'],
|
|
70
|
-
img: [],
|
|
71
|
-
'input[type="image"]': [],
|
|
72
|
-
object: [],
|
|
73
|
-
},
|
|
74
|
-
],
|
|
75
|
-
'jsx-a11y/anchor-has-content': [
|
|
76
|
-
'error',
|
|
77
|
-
{
|
|
78
|
-
components: [],
|
|
79
|
-
},
|
|
80
|
-
],
|
|
81
|
-
'jsx-a11y/anchor-is-valid': [
|
|
82
|
-
'error',
|
|
83
|
-
{
|
|
84
|
-
aspects: ['noHref', 'invalidHref', 'preferButton'],
|
|
85
|
-
components: ['Link'],
|
|
86
|
-
specialLink: ['to'],
|
|
87
|
-
},
|
|
88
|
-
],
|
|
89
|
-
'jsx-a11y/aria-activedescendant-has-tabindex': ['error'],
|
|
90
|
-
'jsx-a11y/aria-props': ['error'],
|
|
91
|
-
'jsx-a11y/aria-proptypes': ['error'],
|
|
92
|
-
'jsx-a11y/aria-role': [
|
|
93
|
-
'error',
|
|
94
|
-
{
|
|
95
|
-
ignoreNonDOM: false,
|
|
96
|
-
},
|
|
97
|
-
],
|
|
98
|
-
'jsx-a11y/aria-unsupported-elements': ['error'],
|
|
99
|
-
'jsx-a11y/click-events-have-key-events': ['error'],
|
|
100
|
-
'jsx-a11y/control-has-associated-label': [
|
|
101
|
-
'error',
|
|
102
|
-
{
|
|
103
|
-
controlComponents: [],
|
|
104
|
-
depth: 5,
|
|
105
|
-
ignoreElements: ['audio', 'canvas', 'embed', 'input', 'textarea', 'tr', 'video'],
|
|
106
|
-
ignoreRoles: [
|
|
107
|
-
'grid',
|
|
108
|
-
'listbox',
|
|
109
|
-
'menu',
|
|
110
|
-
'menubar',
|
|
111
|
-
'radiogroup',
|
|
112
|
-
'row',
|
|
113
|
-
'tablist',
|
|
114
|
-
'toolbar',
|
|
115
|
-
'tree',
|
|
116
|
-
'treegrid',
|
|
117
|
-
],
|
|
118
|
-
labelAttributes: ['label'],
|
|
119
|
-
},
|
|
120
|
-
],
|
|
121
|
-
'jsx-a11y/heading-has-content': [
|
|
122
|
-
'error',
|
|
123
|
-
{
|
|
124
|
-
components: [''],
|
|
125
|
-
},
|
|
126
|
-
],
|
|
127
|
-
'jsx-a11y/html-has-lang': ['error'],
|
|
128
|
-
'jsx-a11y/iframe-has-title': ['error'],
|
|
129
|
-
'jsx-a11y/img-redundant-alt': ['error'],
|
|
130
|
-
'jsx-a11y/interactive-supports-focus': ['error'],
|
|
131
|
-
'jsx-a11y/label-has-associated-control': [
|
|
132
|
-
'error',
|
|
133
|
-
{
|
|
134
|
-
assert: 'both',
|
|
135
|
-
controlComponents: [],
|
|
136
|
-
depth: 25,
|
|
137
|
-
labelAttributes: [],
|
|
138
|
-
labelComponents: [],
|
|
139
|
-
},
|
|
140
|
-
],
|
|
141
|
-
'jsx-a11y/lang': ['error'],
|
|
142
|
-
'jsx-a11y/media-has-caption': [
|
|
143
|
-
'error',
|
|
144
|
-
{
|
|
145
|
-
audio: [],
|
|
146
|
-
track: [],
|
|
147
|
-
video: [],
|
|
148
|
-
},
|
|
149
|
-
],
|
|
150
|
-
'jsx-a11y/mouse-events-have-key-events': ['error'],
|
|
151
|
-
'jsx-a11y/no-access-key': ['error'],
|
|
152
|
-
'jsx-a11y/no-autofocus': [
|
|
153
|
-
'error',
|
|
154
|
-
{
|
|
155
|
-
ignoreNonDOM: true,
|
|
156
|
-
},
|
|
157
|
-
],
|
|
158
|
-
'jsx-a11y/no-distracting-elements': [
|
|
159
|
-
'error',
|
|
160
|
-
{
|
|
161
|
-
elements: ['marquee', 'blink'],
|
|
162
|
-
},
|
|
163
|
-
],
|
|
164
|
-
'jsx-a11y/no-interactive-element-to-noninteractive-role': [
|
|
165
|
-
'error',
|
|
166
|
-
{
|
|
167
|
-
tr: ['none', 'presentation'],
|
|
168
|
-
},
|
|
169
|
-
],
|
|
170
|
-
'jsx-a11y/no-noninteractive-element-interactions': [
|
|
171
|
-
'error',
|
|
172
|
-
{
|
|
173
|
-
handlers: ['onClick', 'onMouseDown', 'onMouseUp', 'onKeyPress', 'onKeyDown', 'onKeyUp'],
|
|
174
|
-
},
|
|
175
|
-
],
|
|
176
|
-
'jsx-a11y/no-noninteractive-element-to-interactive-role': [
|
|
177
|
-
'error',
|
|
178
|
-
{
|
|
179
|
-
li: ['menuitem', 'option', 'row', 'tab', 'treeitem'],
|
|
180
|
-
ol: ['listbox', 'menu', 'menubar', 'radiogroup', 'tablist', 'tree', 'treegrid'],
|
|
181
|
-
table: ['grid'],
|
|
182
|
-
td: ['gridcell'],
|
|
183
|
-
ul: ['listbox', 'menu', 'menubar', 'radiogroup', 'tablist', 'tree', 'treegrid'],
|
|
184
|
-
},
|
|
185
|
-
],
|
|
186
|
-
'jsx-a11y/no-noninteractive-tabindex': [
|
|
187
|
-
'error',
|
|
188
|
-
{
|
|
189
|
-
roles: ['tabpanel'],
|
|
190
|
-
tags: [],
|
|
191
|
-
},
|
|
192
|
-
],
|
|
193
|
-
'jsx-a11y/no-redundant-roles': ['error'],
|
|
194
|
-
'jsx-a11y/no-static-element-interactions': [
|
|
195
|
-
'error',
|
|
196
|
-
{
|
|
197
|
-
handlers: ['onClick', 'onMouseDown', 'onMouseUp', 'onKeyPress', 'onKeyDown', 'onKeyUp'],
|
|
198
|
-
},
|
|
199
|
-
],
|
|
200
|
-
'jsx-a11y/role-has-required-aria-props': ['error'],
|
|
201
|
-
'jsx-a11y/role-supports-aria-props': ['error'],
|
|
202
|
-
'jsx-a11y/scope': ['error'],
|
|
203
|
-
'jsx-a11y/tabindex-no-positive': ['error'],
|
|
204
|
-
'jsx-quotes': ['error', 'prefer-double'],
|
|
205
|
-
'react-hooks/exhaustive-deps': [
|
|
206
|
-
'error',
|
|
207
|
-
{
|
|
208
|
-
enableDangerousAutofixThisMayCauseInfiniteLoops: false,
|
|
209
|
-
},
|
|
210
|
-
],
|
|
211
|
-
'react-hooks/rules-of-hooks': ['error'],
|
|
212
|
-
'react/button-has-type': [
|
|
213
|
-
2,
|
|
214
|
-
{
|
|
215
|
-
button: true,
|
|
216
|
-
reset: false,
|
|
217
|
-
submit: true,
|
|
218
|
-
},
|
|
219
|
-
],
|
|
220
|
-
'react/checked-requires-onchange-or-readonly': [2],
|
|
221
|
-
'react/default-props-match-prop-types': [
|
|
222
|
-
2,
|
|
223
|
-
{
|
|
224
|
-
allowRequiredDefaults: false,
|
|
225
|
-
},
|
|
226
|
-
],
|
|
227
|
-
'react/destructuring-assignment': [2, 'always'],
|
|
228
|
-
'react/display-name': [
|
|
229
|
-
2,
|
|
230
|
-
{
|
|
231
|
-
ignoreTranspilerName: false,
|
|
232
|
-
},
|
|
233
|
-
],
|
|
234
|
-
'react/forbid-component-props': [
|
|
235
|
-
2,
|
|
236
|
-
{
|
|
237
|
-
forbid: [],
|
|
238
|
-
},
|
|
239
|
-
],
|
|
240
|
-
'react/forbid-dom-props': [
|
|
241
|
-
2,
|
|
242
|
-
{
|
|
243
|
-
forbid: [],
|
|
244
|
-
},
|
|
245
|
-
],
|
|
246
|
-
'react/forbid-elements': [
|
|
247
|
-
2,
|
|
248
|
-
{
|
|
249
|
-
forbid: [],
|
|
250
|
-
},
|
|
251
|
-
],
|
|
252
|
-
'react/forbid-foreign-prop-types': [
|
|
253
|
-
2,
|
|
254
|
-
{
|
|
255
|
-
allowInPropTypes: true,
|
|
256
|
-
},
|
|
257
|
-
],
|
|
258
|
-
'react/forward-ref-uses-ref': [2],
|
|
259
|
-
'react/hook-use-state': [2],
|
|
260
|
-
'react/iframe-missing-sandbox': [2],
|
|
261
|
-
'react/jsx-boolean-value': [
|
|
262
|
-
2,
|
|
263
|
-
'never',
|
|
264
|
-
{
|
|
265
|
-
always: [],
|
|
266
|
-
},
|
|
267
|
-
],
|
|
268
|
-
'react/jsx-closing-bracket-location': [2, 'line-aligned'],
|
|
269
|
-
'react/jsx-closing-tag-location': [2],
|
|
270
|
-
'react/jsx-curly-brace-presence': [
|
|
271
|
-
2,
|
|
272
|
-
{
|
|
273
|
-
children: 'never',
|
|
274
|
-
props: 'never',
|
|
275
|
-
},
|
|
276
|
-
],
|
|
277
|
-
'react/jsx-curly-newline': [
|
|
278
|
-
2,
|
|
279
|
-
{
|
|
280
|
-
multiline: 'consistent',
|
|
281
|
-
singleline: 'consistent',
|
|
282
|
-
},
|
|
283
|
-
],
|
|
284
|
-
'react/jsx-curly-spacing': [
|
|
285
|
-
2,
|
|
286
|
-
'never',
|
|
287
|
-
{
|
|
288
|
-
allowMultiline: true,
|
|
289
|
-
},
|
|
290
|
-
],
|
|
291
|
-
'react/jsx-equals-spacing': [2, 'never'],
|
|
292
|
-
'react/jsx-filename-extension': [
|
|
293
|
-
2,
|
|
294
|
-
{
|
|
295
|
-
extensions: ['.jsx', '.tsx'],
|
|
296
|
-
},
|
|
297
|
-
],
|
|
298
|
-
'react/jsx-first-prop-new-line': [2, 'multiline-multiprop'],
|
|
299
|
-
'react/jsx-fragments': [2, 'syntax'],
|
|
300
|
-
'react/jsx-handler-names': [
|
|
301
|
-
2,
|
|
302
|
-
{
|
|
303
|
-
eventHandlerPrefix: 'handle',
|
|
304
|
-
eventHandlerPropPrefix: 'on',
|
|
305
|
-
},
|
|
306
|
-
],
|
|
307
|
-
'react/jsx-indent': [2, 2],
|
|
308
|
-
'react/jsx-indent-props': [2, 2],
|
|
309
|
-
'react/jsx-max-depth': [2],
|
|
310
|
-
'react/jsx-max-props-per-line': [
|
|
311
|
-
2,
|
|
312
|
-
{
|
|
313
|
-
maximum: 1,
|
|
314
|
-
when: 'multiline',
|
|
315
|
-
},
|
|
316
|
-
],
|
|
317
|
-
'react/jsx-newline': [2],
|
|
318
|
-
'react/jsx-no-comment-textnodes': [2],
|
|
319
|
-
'react/jsx-no-duplicate-props': [
|
|
320
|
-
2,
|
|
321
|
-
{
|
|
322
|
-
ignoreCase: true,
|
|
323
|
-
},
|
|
324
|
-
],
|
|
325
|
-
'react/jsx-no-leaked-render': [2],
|
|
326
|
-
'react/jsx-no-target-blank': [
|
|
327
|
-
2,
|
|
328
|
-
{
|
|
329
|
-
enforceDynamicLinks: 'always',
|
|
330
|
-
forms: false,
|
|
331
|
-
links: true,
|
|
332
|
-
},
|
|
333
|
-
],
|
|
334
|
-
'react/jsx-no-undef': [2],
|
|
335
|
-
'react/jsx-no-useless-fragment': ['error'],
|
|
336
|
-
'react/jsx-pascal-case': [
|
|
337
|
-
2,
|
|
338
|
-
{
|
|
339
|
-
allowAllCaps: true,
|
|
340
|
-
ignore: [],
|
|
341
|
-
},
|
|
342
|
-
],
|
|
343
|
-
'react/jsx-props-no-multi-spaces': [2],
|
|
344
|
-
'react/jsx-props-no-spread-multi': [2],
|
|
345
|
-
'react/jsx-props-no-spreading': [
|
|
346
|
-
'error',
|
|
347
|
-
{
|
|
348
|
-
custom: 'enforce',
|
|
349
|
-
exceptions: [],
|
|
350
|
-
explicitSpread: 'ignore',
|
|
351
|
-
html: 'enforce',
|
|
352
|
-
},
|
|
353
|
-
],
|
|
354
|
-
'react/jsx-tag-spacing': [
|
|
355
|
-
2,
|
|
356
|
-
{
|
|
357
|
-
afterOpening: 'never',
|
|
358
|
-
beforeClosing: 'never',
|
|
359
|
-
beforeSelfClosing: 'always',
|
|
360
|
-
closingSlash: 'never',
|
|
361
|
-
},
|
|
362
|
-
],
|
|
363
|
-
'react/jsx-uses-vars': [2],
|
|
364
|
-
'react/no-access-state-in-setstate': [2],
|
|
365
|
-
'react/no-adjacent-inline-elements': [2],
|
|
366
|
-
'react/no-array-index-key': [2],
|
|
367
|
-
'react/no-arrow-function-lifecycle': [2],
|
|
368
|
-
'react/no-children-prop': [2],
|
|
369
|
-
'react/no-danger': [2],
|
|
370
|
-
'react/no-danger-with-children': [2],
|
|
371
|
-
'react/no-deprecated': [2],
|
|
372
|
-
'react/no-did-mount-set-state': [2],
|
|
373
|
-
'react/no-did-update-set-state': [2],
|
|
374
|
-
'react/no-direct-mutation-state': [2],
|
|
375
|
-
'react/no-find-dom-node': [2],
|
|
376
|
-
'react/no-invalid-html-attribute': [2],
|
|
377
|
-
'react/no-is-mounted': [2],
|
|
378
|
-
'react/no-multi-comp': [2],
|
|
379
|
-
'react/no-namespace': [2],
|
|
380
|
-
'react/no-object-type-as-default-prop': [2],
|
|
381
|
-
'react/no-redundant-should-component-update': [2],
|
|
382
|
-
'react/no-render-return-value': [2],
|
|
383
|
-
'react/no-string-refs': [2],
|
|
384
|
-
'react/no-this-in-sfc': [2],
|
|
385
|
-
'react/no-typos': [2],
|
|
386
|
-
'react/no-unescaped-entities': [2],
|
|
387
|
-
'react/no-unknown-property': [2],
|
|
388
|
-
'react/no-unsafe': [2],
|
|
389
|
-
'react/no-unused-class-component-methods': [2],
|
|
390
|
-
'react/no-unused-prop-types': [
|
|
391
|
-
2,
|
|
392
|
-
{
|
|
393
|
-
customValidators: [],
|
|
394
|
-
skipShapeProps: true,
|
|
395
|
-
},
|
|
396
|
-
],
|
|
397
|
-
'react/no-unused-state': [2],
|
|
398
|
-
'react/no-will-update-set-state': [2],
|
|
399
|
-
'react/prefer-es6-class': [2, 'always'],
|
|
400
|
-
'react/prefer-exact-props': [2],
|
|
401
|
-
'react/require-optimization': [
|
|
402
|
-
2,
|
|
403
|
-
{
|
|
404
|
-
allowDecorators: [],
|
|
405
|
-
},
|
|
406
|
-
],
|
|
407
|
-
'react/require-render-return': [2],
|
|
408
|
-
'react/self-closing-comp': [2],
|
|
409
|
-
'react/sort-comp': [
|
|
410
|
-
2,
|
|
411
|
-
{
|
|
412
|
-
groups: {
|
|
413
|
-
lifecycle: [
|
|
414
|
-
'displayName',
|
|
415
|
-
'propTypes',
|
|
416
|
-
'contextTypes',
|
|
417
|
-
'childContextTypes',
|
|
418
|
-
'mixins',
|
|
419
|
-
'statics',
|
|
420
|
-
'defaultProps',
|
|
421
|
-
'constructor',
|
|
422
|
-
'getDefaultProps',
|
|
423
|
-
'getInitialState',
|
|
424
|
-
'state',
|
|
425
|
-
'getChildContext',
|
|
426
|
-
'getDerivedStateFromProps',
|
|
427
|
-
'componentWillMount',
|
|
428
|
-
'UNSAFE_componentWillMount',
|
|
429
|
-
'componentDidMount',
|
|
430
|
-
'componentWillReceiveProps',
|
|
431
|
-
'UNSAFE_componentWillReceiveProps',
|
|
432
|
-
'shouldComponentUpdate',
|
|
433
|
-
'componentWillUpdate',
|
|
434
|
-
'UNSAFE_componentWillUpdate',
|
|
435
|
-
'getSnapshotBeforeUpdate',
|
|
436
|
-
'componentDidUpdate',
|
|
437
|
-
'componentDidCatch',
|
|
438
|
-
'componentWillUnmount',
|
|
439
|
-
],
|
|
440
|
-
rendering: ['/^render.+$/', 'render'],
|
|
441
|
-
},
|
|
442
|
-
order: [
|
|
443
|
-
'static-variables',
|
|
444
|
-
'static-methods',
|
|
445
|
-
'instance-variables',
|
|
446
|
-
'lifecycle',
|
|
447
|
-
'/^handle.+$/',
|
|
448
|
-
'/^on.+$/',
|
|
449
|
-
'getters',
|
|
450
|
-
'setters',
|
|
451
|
-
'/^(get|set)(?!(InitialState$|DefaultProps$|ChildContext$)).+$/',
|
|
452
|
-
'instance-methods',
|
|
453
|
-
'everything-else',
|
|
454
|
-
'rendering',
|
|
455
|
-
],
|
|
456
|
-
},
|
|
457
|
-
],
|
|
458
|
-
'react/sort-default-props': [2],
|
|
459
|
-
'react/sort-prop-types': [
|
|
460
|
-
2,
|
|
461
|
-
{
|
|
462
|
-
callbacksLast: false,
|
|
463
|
-
ignoreCase: true,
|
|
464
|
-
requiredFirst: false,
|
|
465
|
-
sortShapeProp: true,
|
|
466
|
-
},
|
|
467
|
-
],
|
|
468
|
-
'react/static-property-placement': [2, 'property assignment'],
|
|
469
|
-
'react/style-prop-object': [2],
|
|
470
|
-
'react/void-dom-elements-no-children': [2],
|
|
471
|
-
|
|
472
|
-
'react/boolean-prop-naming': [
|
|
473
|
-
'error',
|
|
474
|
-
{
|
|
475
|
-
validateNested: true,
|
|
476
|
-
},
|
|
477
|
-
],
|
|
478
|
-
'react/no-unstable-nested-components': 'error',
|
|
479
|
-
'react/jsx-key': 'error',
|
|
480
|
-
'react/jsx-no-bind': [
|
|
481
|
-
'error',
|
|
482
|
-
{
|
|
483
|
-
ignoreRefs: false,
|
|
484
|
-
allowArrowFunctions: true,
|
|
485
|
-
allowFunctions: true,
|
|
486
|
-
allowBind: false,
|
|
487
|
-
ignoreDOMComponents: false,
|
|
488
|
-
},
|
|
489
|
-
],
|
|
490
|
-
'react/jsx-sort-props': [
|
|
491
|
-
'error',
|
|
492
|
-
{
|
|
493
|
-
callbacksLast: true,
|
|
494
|
-
shorthandFirst: true,
|
|
495
|
-
noSortAlphabetically: false,
|
|
496
|
-
reservedFirst: false,
|
|
497
|
-
},
|
|
498
|
-
],
|
|
499
|
-
'react/function-component-definition': [
|
|
500
|
-
'error',
|
|
501
|
-
{
|
|
502
|
-
namedComponents: 'arrow-function',
|
|
503
|
-
unnamedComponents: 'arrow-function',
|
|
504
|
-
},
|
|
505
|
-
],
|
|
506
|
-
'react/jsx-no-constructed-context-values': 'error',
|
|
507
|
-
'react/jsx-no-script-url': 'error',
|
|
508
|
-
'arrow-body-style': ['error', 'always'],
|
|
509
|
-
},
|
|
510
|
-
},
|
|
511
|
-
];
|
|
512
|
-
|
|
513
|
-
export default reactConfig;
|