eslint-config-setup 0.2.7 → 0.3.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/dist/configs/0b23ff88.js +2 -7
- package/dist/configs/196d687e.js +39 -60
- package/dist/configs/2f6f3a82.js +37 -55
- package/dist/configs/4eb62e57.js +2 -7
- package/dist/configs/52762a42.js +2 -7
- package/dist/configs/532f50a4.js +37 -55
- package/dist/configs/5a302873.js +37 -55
- package/dist/configs/6bc0d588.js +39 -60
- package/dist/configs/91e82988.js +37 -55
- package/dist/configs/c2fecd3d.js +2 -7
- package/dist/configs/d537b683.js +39 -60
- package/dist/configs/db69ebb6.js +39 -60
- package/dist/index.d.ts +2 -2
- package/dist/modules.d.ts +10 -11
- package/dist/modules.js +97 -114
- package/dist/modules.js.map +1 -1
- package/dist/oxlint-configs/78b40daa.json +4 -38
- package/dist/oxlint-configs/7ff0d87e.json +5 -4
- package/dist/oxlint-configs/85912bf0.json +5 -4
- package/dist/oxlint-configs/9dc42dc3.json +4 -38
- package/dist/oxlint-configs/d46cb9b7.json +5 -40
- package/dist/oxlint-configs/ef643c60.json +5 -40
- package/dist/{types-3d-g2_B9.d.ts → types-D227zLeg.d.ts} +1 -1
- package/package.json +4 -3
package/dist/configs/532f50a4.js
CHANGED
|
@@ -4,6 +4,7 @@ import * as mdxPlugin from "eslint-plugin-mdx"
|
|
|
4
4
|
import compatPlugin from "eslint-plugin-compat"
|
|
5
5
|
import cspellPlugin from "@cspell/eslint-plugin"
|
|
6
6
|
import deMorganPlugin from "eslint-plugin-de-morgan"
|
|
7
|
+
import eslintReactPlugin from "@eslint-react/eslint-plugin"
|
|
7
8
|
import globals from "globals"
|
|
8
9
|
import importXPlugin from "eslint-plugin-import-x"
|
|
9
10
|
import jsdocPlugin from "eslint-plugin-jsdoc"
|
|
@@ -14,12 +15,12 @@ import perfectionistPlugin from "eslint-plugin-perfectionist"
|
|
|
14
15
|
import playwrightPlugin from "eslint-plugin-playwright"
|
|
15
16
|
import reactEffectPlugin from "eslint-plugin-react-you-might-not-need-an-effect"
|
|
16
17
|
import reactHooksPlugin from "eslint-plugin-react-hooks"
|
|
17
|
-
import reactPlugin from "eslint-plugin-react"
|
|
18
18
|
import reactRefreshPlugin from "eslint-plugin-react-refresh"
|
|
19
19
|
import regexpPlugin from "eslint-plugin-regexp"
|
|
20
20
|
import securityPlugin from "eslint-plugin-security"
|
|
21
21
|
import sonarjsPlugin from "eslint-plugin-sonarjs"
|
|
22
22
|
import storybookPlugin from "eslint-plugin-storybook"
|
|
23
|
+
import stylisticPlugin from "@stylistic/eslint-plugin"
|
|
23
24
|
import testingLibraryPlugin from "eslint-plugin-testing-library"
|
|
24
25
|
import tseslint from "typescript-eslint"
|
|
25
26
|
import unicornPlugin from "eslint-plugin-unicorn"
|
|
@@ -35,6 +36,7 @@ export default [
|
|
|
35
36
|
name: "eslint-config-setup/base",
|
|
36
37
|
plugins: {
|
|
37
38
|
"@cspell": cspellPlugin,
|
|
39
|
+
"@stylistic": stylisticPlugin,
|
|
38
40
|
"@typescript-eslint": tseslint.plugin,
|
|
39
41
|
"compat": compatPlugin,
|
|
40
42
|
"de-morgan": deMorganPlugin,
|
|
@@ -42,9 +44,11 @@ export default [
|
|
|
42
44
|
"jsdoc": jsdocPlugin,
|
|
43
45
|
"jsx-a11y": jsxA11yPlugin,
|
|
44
46
|
"perfectionist": perfectionistPlugin,
|
|
45
|
-
"react":
|
|
47
|
+
"react": eslintReactPlugin,
|
|
48
|
+
"react-dom": eslintReactPlugin.configs.dom.plugins["@eslint-react/dom"],
|
|
46
49
|
"react-hooks": reactHooksPlugin,
|
|
47
50
|
"react-refresh": reactRefreshPlugin,
|
|
51
|
+
"react-web-api": eslintReactPlugin.configs["web-api"].plugins["@eslint-react/web-api"],
|
|
48
52
|
"react-you-might-not-need-an-effect": reactEffectPlugin,
|
|
49
53
|
"regexp": regexpPlugin,
|
|
50
54
|
"security": securityPlugin,
|
|
@@ -62,9 +66,6 @@ export default [
|
|
|
62
66
|
...globals.browser,
|
|
63
67
|
},
|
|
64
68
|
},
|
|
65
|
-
settings: {
|
|
66
|
-
react: { version: "detect" },
|
|
67
|
-
},
|
|
68
69
|
rules: {
|
|
69
70
|
"@cspell/spellchecker": [
|
|
70
71
|
"warn",
|
|
@@ -75,6 +76,14 @@ export default [
|
|
|
75
76
|
"autoFix": false
|
|
76
77
|
}
|
|
77
78
|
],
|
|
79
|
+
"@stylistic/jsx-curly-brace-presence": [
|
|
80
|
+
"error",
|
|
81
|
+
{
|
|
82
|
+
"props": "never",
|
|
83
|
+
"children": "never"
|
|
84
|
+
}
|
|
85
|
+
],
|
|
86
|
+
"@stylistic/jsx-self-closing-comp": "error",
|
|
78
87
|
"@typescript-eslint/adjacent-overload-signatures": "error",
|
|
79
88
|
"@typescript-eslint/array-type": [
|
|
80
89
|
"error",
|
|
@@ -468,8 +477,15 @@ export default [
|
|
|
468
477
|
"prefer-template": "error",
|
|
469
478
|
"preserve-caught-error": "error",
|
|
470
479
|
"radix": "error",
|
|
480
|
+
"react-dom/no-dangerously-set-innerhtml": "warn",
|
|
481
|
+
"react-dom/no-dangerously-set-innerhtml-with-children": "error",
|
|
482
|
+
"react-dom/no-missing-button-type": "error",
|
|
483
|
+
"react-dom/no-missing-iframe-sandbox": "error",
|
|
484
|
+
"react-dom/no-string-style-prop": "error",
|
|
485
|
+
"react-dom/no-unknown-property": "error",
|
|
486
|
+
"react-dom/no-unsafe-target-blank": "error",
|
|
487
|
+
"react-dom/no-void-elements-with-children": "error",
|
|
471
488
|
"react-hooks/exhaustive-deps": "error",
|
|
472
|
-
"react-hooks/react-compiler": "error",
|
|
473
489
|
"react-hooks/rules-of-hooks": "error",
|
|
474
490
|
"react-refresh/only-export-components": [
|
|
475
491
|
"warn",
|
|
@@ -477,6 +493,10 @@ export default [
|
|
|
477
493
|
"allowConstantExport": true
|
|
478
494
|
}
|
|
479
495
|
],
|
|
496
|
+
"react-web-api/no-leaked-event-listener": "error",
|
|
497
|
+
"react-web-api/no-leaked-interval": "error",
|
|
498
|
+
"react-web-api/no-leaked-resize-observer": "error",
|
|
499
|
+
"react-web-api/no-leaked-timeout": "error",
|
|
480
500
|
"react-you-might-not-need-an-effect/no-adjust-state-on-prop-change": "warn",
|
|
481
501
|
"react-you-might-not-need-an-effect/no-chain-state-updates": "error",
|
|
482
502
|
"react-you-might-not-need-an-effect/no-derived-state": "error",
|
|
@@ -486,61 +506,23 @@ export default [
|
|
|
486
506
|
"react-you-might-not-need-an-effect/no-pass-data-to-parent": "error",
|
|
487
507
|
"react-you-might-not-need-an-effect/no-pass-live-state-to-parent": "error",
|
|
488
508
|
"react-you-might-not-need-an-effect/no-reset-all-state-on-prop-change": "error",
|
|
489
|
-
"react/button-has-type": "error",
|
|
490
|
-
"react/function-component-definition": [
|
|
491
|
-
"error",
|
|
492
|
-
{
|
|
493
|
-
"namedComponents": "function-declaration",
|
|
494
|
-
"unnamedComponents": "arrow-function"
|
|
495
|
-
}
|
|
496
|
-
],
|
|
497
|
-
"react/hook-use-state": "error",
|
|
498
|
-
"react/iframe-missing-sandbox": "error",
|
|
499
|
-
"react/jsx-boolean-value": [
|
|
500
|
-
"error",
|
|
501
|
-
"never"
|
|
502
|
-
],
|
|
503
|
-
"react/jsx-curly-brace-presence": [
|
|
504
|
-
"error",
|
|
505
|
-
{
|
|
506
|
-
"props": "never",
|
|
507
|
-
"children": "never"
|
|
508
|
-
}
|
|
509
|
-
],
|
|
510
|
-
"react/jsx-key": [
|
|
511
|
-
"error",
|
|
512
|
-
{
|
|
513
|
-
"checkFragmentShorthand": true
|
|
514
|
-
}
|
|
515
|
-
],
|
|
516
509
|
"react/jsx-no-comment-textnodes": "error",
|
|
517
|
-
"react/jsx-
|
|
518
|
-
"react/jsx-no-duplicate-props": "error",
|
|
519
|
-
"react/jsx-no-leaked-render": "error",
|
|
520
|
-
"react/jsx-no-target-blank": "error",
|
|
521
|
-
"react/jsx-no-undef": "error",
|
|
522
|
-
"react/jsx-no-useless-fragment": [
|
|
523
|
-
"error",
|
|
524
|
-
{
|
|
525
|
-
"allowExpressions": true
|
|
526
|
-
}
|
|
527
|
-
],
|
|
528
|
-
"react/jsx-pascal-case": "error",
|
|
510
|
+
"react/jsx-shorthand-boolean": "error",
|
|
529
511
|
"react/no-access-state-in-setstate": "error",
|
|
530
512
|
"react/no-array-index-key": "error",
|
|
531
513
|
"react/no-children-prop": "error",
|
|
532
|
-
"react/no-
|
|
533
|
-
"react/no-danger-with-children": "error",
|
|
534
|
-
"react/no-deprecated": "error",
|
|
514
|
+
"react/no-context-provider": "error",
|
|
535
515
|
"react/no-direct-mutation-state": "error",
|
|
536
|
-
"react/no-
|
|
537
|
-
"react/no-
|
|
538
|
-
"react/no-
|
|
539
|
-
"react/no-
|
|
516
|
+
"react/no-duplicate-key": "error",
|
|
517
|
+
"react/no-forward-ref": "error",
|
|
518
|
+
"react/no-leaked-conditional-rendering": "error",
|
|
519
|
+
"react/no-missing-key": "error",
|
|
520
|
+
"react/no-nested-component-definitions": "error",
|
|
521
|
+
"react/no-unstable-context-value": "error",
|
|
522
|
+
"react/no-unstable-default-props": "error",
|
|
540
523
|
"react/no-unused-state": "error",
|
|
541
|
-
"react/
|
|
542
|
-
"react/
|
|
543
|
-
"react/void-dom-elements-no-children": "error",
|
|
524
|
+
"react/no-use-context": "error",
|
|
525
|
+
"react/no-useless-fragment": "error",
|
|
544
526
|
"regexp/confusing-quantifier": "warn",
|
|
545
527
|
"regexp/control-character-escape": "error",
|
|
546
528
|
"regexp/match-any": "error",
|
package/dist/configs/5a302873.js
CHANGED
|
@@ -4,6 +4,7 @@ import * as mdxPlugin from "eslint-plugin-mdx"
|
|
|
4
4
|
import compatPlugin from "eslint-plugin-compat"
|
|
5
5
|
import cspellPlugin from "@cspell/eslint-plugin"
|
|
6
6
|
import deMorganPlugin from "eslint-plugin-de-morgan"
|
|
7
|
+
import eslintReactPlugin from "@eslint-react/eslint-plugin"
|
|
7
8
|
import globals from "globals"
|
|
8
9
|
import importXPlugin from "eslint-plugin-import-x"
|
|
9
10
|
import jsdocPlugin from "eslint-plugin-jsdoc"
|
|
@@ -15,12 +16,12 @@ import perfectionistPlugin from "eslint-plugin-perfectionist"
|
|
|
15
16
|
import playwrightPlugin from "eslint-plugin-playwright"
|
|
16
17
|
import reactEffectPlugin from "eslint-plugin-react-you-might-not-need-an-effect"
|
|
17
18
|
import reactHooksPlugin from "eslint-plugin-react-hooks"
|
|
18
|
-
import reactPlugin from "eslint-plugin-react"
|
|
19
19
|
import reactRefreshPlugin from "eslint-plugin-react-refresh"
|
|
20
20
|
import regexpPlugin from "eslint-plugin-regexp"
|
|
21
21
|
import securityPlugin from "eslint-plugin-security"
|
|
22
22
|
import sonarjsPlugin from "eslint-plugin-sonarjs"
|
|
23
23
|
import storybookPlugin from "eslint-plugin-storybook"
|
|
24
|
+
import stylisticPlugin from "@stylistic/eslint-plugin"
|
|
24
25
|
import testingLibraryPlugin from "eslint-plugin-testing-library"
|
|
25
26
|
import tseslint from "typescript-eslint"
|
|
26
27
|
import unicornPlugin from "eslint-plugin-unicorn"
|
|
@@ -36,6 +37,7 @@ export default [
|
|
|
36
37
|
name: "eslint-config-setup/base",
|
|
37
38
|
plugins: {
|
|
38
39
|
"@cspell": cspellPlugin,
|
|
40
|
+
"@stylistic": stylisticPlugin,
|
|
39
41
|
"@typescript-eslint": tseslint.plugin,
|
|
40
42
|
"compat": compatPlugin,
|
|
41
43
|
"de-morgan": deMorganPlugin,
|
|
@@ -43,9 +45,11 @@ export default [
|
|
|
43
45
|
"jsdoc": jsdocPlugin,
|
|
44
46
|
"jsx-a11y": jsxA11yPlugin,
|
|
45
47
|
"perfectionist": perfectionistPlugin,
|
|
46
|
-
"react":
|
|
48
|
+
"react": eslintReactPlugin,
|
|
49
|
+
"react-dom": eslintReactPlugin.configs.dom.plugins["@eslint-react/dom"],
|
|
47
50
|
"react-hooks": reactHooksPlugin,
|
|
48
51
|
"react-refresh": reactRefreshPlugin,
|
|
52
|
+
"react-web-api": eslintReactPlugin.configs["web-api"].plugins["@eslint-react/web-api"],
|
|
49
53
|
"react-you-might-not-need-an-effect": reactEffectPlugin,
|
|
50
54
|
"regexp": regexpPlugin,
|
|
51
55
|
"security": securityPlugin,
|
|
@@ -63,9 +67,6 @@ export default [
|
|
|
63
67
|
...globals.browser,
|
|
64
68
|
},
|
|
65
69
|
},
|
|
66
|
-
settings: {
|
|
67
|
-
react: { version: "detect" },
|
|
68
|
-
},
|
|
69
70
|
rules: {
|
|
70
71
|
"@cspell/spellchecker": [
|
|
71
72
|
"warn",
|
|
@@ -76,6 +77,14 @@ export default [
|
|
|
76
77
|
"autoFix": false
|
|
77
78
|
}
|
|
78
79
|
],
|
|
80
|
+
"@stylistic/jsx-curly-brace-presence": [
|
|
81
|
+
"error",
|
|
82
|
+
{
|
|
83
|
+
"props": "never",
|
|
84
|
+
"children": "never"
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
"@stylistic/jsx-self-closing-comp": "error",
|
|
79
88
|
"@typescript-eslint/adjacent-overload-signatures": "error",
|
|
80
89
|
"@typescript-eslint/array-type": [
|
|
81
90
|
"error",
|
|
@@ -469,8 +478,15 @@ export default [
|
|
|
469
478
|
"prefer-template": "error",
|
|
470
479
|
"preserve-caught-error": "error",
|
|
471
480
|
"radix": "error",
|
|
481
|
+
"react-dom/no-dangerously-set-innerhtml": "warn",
|
|
482
|
+
"react-dom/no-dangerously-set-innerhtml-with-children": "error",
|
|
483
|
+
"react-dom/no-missing-button-type": "error",
|
|
484
|
+
"react-dom/no-missing-iframe-sandbox": "error",
|
|
485
|
+
"react-dom/no-string-style-prop": "error",
|
|
486
|
+
"react-dom/no-unknown-property": "error",
|
|
487
|
+
"react-dom/no-unsafe-target-blank": "error",
|
|
488
|
+
"react-dom/no-void-elements-with-children": "error",
|
|
472
489
|
"react-hooks/exhaustive-deps": "error",
|
|
473
|
-
"react-hooks/react-compiler": "error",
|
|
474
490
|
"react-hooks/rules-of-hooks": "error",
|
|
475
491
|
"react-refresh/only-export-components": [
|
|
476
492
|
"warn",
|
|
@@ -478,6 +494,10 @@ export default [
|
|
|
478
494
|
"allowConstantExport": true
|
|
479
495
|
}
|
|
480
496
|
],
|
|
497
|
+
"react-web-api/no-leaked-event-listener": "error",
|
|
498
|
+
"react-web-api/no-leaked-interval": "error",
|
|
499
|
+
"react-web-api/no-leaked-resize-observer": "error",
|
|
500
|
+
"react-web-api/no-leaked-timeout": "error",
|
|
481
501
|
"react-you-might-not-need-an-effect/no-adjust-state-on-prop-change": "warn",
|
|
482
502
|
"react-you-might-not-need-an-effect/no-chain-state-updates": "error",
|
|
483
503
|
"react-you-might-not-need-an-effect/no-derived-state": "error",
|
|
@@ -487,61 +507,23 @@ export default [
|
|
|
487
507
|
"react-you-might-not-need-an-effect/no-pass-data-to-parent": "error",
|
|
488
508
|
"react-you-might-not-need-an-effect/no-pass-live-state-to-parent": "error",
|
|
489
509
|
"react-you-might-not-need-an-effect/no-reset-all-state-on-prop-change": "error",
|
|
490
|
-
"react/button-has-type": "error",
|
|
491
|
-
"react/function-component-definition": [
|
|
492
|
-
"error",
|
|
493
|
-
{
|
|
494
|
-
"namedComponents": "function-declaration",
|
|
495
|
-
"unnamedComponents": "arrow-function"
|
|
496
|
-
}
|
|
497
|
-
],
|
|
498
|
-
"react/hook-use-state": "error",
|
|
499
|
-
"react/iframe-missing-sandbox": "error",
|
|
500
|
-
"react/jsx-boolean-value": [
|
|
501
|
-
"error",
|
|
502
|
-
"never"
|
|
503
|
-
],
|
|
504
|
-
"react/jsx-curly-brace-presence": [
|
|
505
|
-
"error",
|
|
506
|
-
{
|
|
507
|
-
"props": "never",
|
|
508
|
-
"children": "never"
|
|
509
|
-
}
|
|
510
|
-
],
|
|
511
|
-
"react/jsx-key": [
|
|
512
|
-
"error",
|
|
513
|
-
{
|
|
514
|
-
"checkFragmentShorthand": true
|
|
515
|
-
}
|
|
516
|
-
],
|
|
517
510
|
"react/jsx-no-comment-textnodes": "error",
|
|
518
|
-
"react/jsx-
|
|
519
|
-
"react/jsx-no-duplicate-props": "error",
|
|
520
|
-
"react/jsx-no-leaked-render": "error",
|
|
521
|
-
"react/jsx-no-target-blank": "error",
|
|
522
|
-
"react/jsx-no-undef": "error",
|
|
523
|
-
"react/jsx-no-useless-fragment": [
|
|
524
|
-
"error",
|
|
525
|
-
{
|
|
526
|
-
"allowExpressions": true
|
|
527
|
-
}
|
|
528
|
-
],
|
|
529
|
-
"react/jsx-pascal-case": "error",
|
|
511
|
+
"react/jsx-shorthand-boolean": "error",
|
|
530
512
|
"react/no-access-state-in-setstate": "error",
|
|
531
513
|
"react/no-array-index-key": "error",
|
|
532
514
|
"react/no-children-prop": "error",
|
|
533
|
-
"react/no-
|
|
534
|
-
"react/no-danger-with-children": "error",
|
|
535
|
-
"react/no-deprecated": "error",
|
|
515
|
+
"react/no-context-provider": "error",
|
|
536
516
|
"react/no-direct-mutation-state": "error",
|
|
537
|
-
"react/no-
|
|
538
|
-
"react/no-
|
|
539
|
-
"react/no-
|
|
540
|
-
"react/no-
|
|
517
|
+
"react/no-duplicate-key": "error",
|
|
518
|
+
"react/no-forward-ref": "error",
|
|
519
|
+
"react/no-leaked-conditional-rendering": "error",
|
|
520
|
+
"react/no-missing-key": "error",
|
|
521
|
+
"react/no-nested-component-definitions": "error",
|
|
522
|
+
"react/no-unstable-context-value": "error",
|
|
523
|
+
"react/no-unstable-default-props": "error",
|
|
541
524
|
"react/no-unused-state": "error",
|
|
542
|
-
"react/
|
|
543
|
-
"react/
|
|
544
|
-
"react/void-dom-elements-no-children": "error",
|
|
525
|
+
"react/no-use-context": "error",
|
|
526
|
+
"react/no-useless-fragment": "error",
|
|
545
527
|
"regexp/confusing-quantifier": "warn",
|
|
546
528
|
"regexp/control-character-escape": "error",
|
|
547
529
|
"regexp/match-any": "error",
|
package/dist/configs/6bc0d588.js
CHANGED
|
@@ -4,6 +4,7 @@ import * as mdxPlugin from "eslint-plugin-mdx"
|
|
|
4
4
|
import compatPlugin from "eslint-plugin-compat"
|
|
5
5
|
import cspellPlugin from "@cspell/eslint-plugin"
|
|
6
6
|
import deMorganPlugin from "eslint-plugin-de-morgan"
|
|
7
|
+
import eslintReactPlugin from "@eslint-react/eslint-plugin"
|
|
7
8
|
import globals from "globals"
|
|
8
9
|
import importXPlugin from "eslint-plugin-import-x"
|
|
9
10
|
import jsdocPlugin from "eslint-plugin-jsdoc"
|
|
@@ -15,12 +16,12 @@ import perfectionistPlugin from "eslint-plugin-perfectionist"
|
|
|
15
16
|
import playwrightPlugin from "eslint-plugin-playwright"
|
|
16
17
|
import reactEffectPlugin from "eslint-plugin-react-you-might-not-need-an-effect"
|
|
17
18
|
import reactHooksPlugin from "eslint-plugin-react-hooks"
|
|
18
|
-
import reactPlugin from "eslint-plugin-react"
|
|
19
19
|
import reactRefreshPlugin from "eslint-plugin-react-refresh"
|
|
20
20
|
import regexpPlugin from "eslint-plugin-regexp"
|
|
21
21
|
import securityPlugin from "eslint-plugin-security"
|
|
22
22
|
import sonarjsPlugin from "eslint-plugin-sonarjs"
|
|
23
23
|
import storybookPlugin from "eslint-plugin-storybook"
|
|
24
|
+
import stylisticPlugin from "@stylistic/eslint-plugin"
|
|
24
25
|
import testingLibraryPlugin from "eslint-plugin-testing-library"
|
|
25
26
|
import tseslint from "typescript-eslint"
|
|
26
27
|
import unicornPlugin from "eslint-plugin-unicorn"
|
|
@@ -36,6 +37,7 @@ export default [
|
|
|
36
37
|
name: "eslint-config-setup/base",
|
|
37
38
|
plugins: {
|
|
38
39
|
"@cspell": cspellPlugin,
|
|
40
|
+
"@stylistic": stylisticPlugin,
|
|
39
41
|
"@typescript-eslint": tseslint.plugin,
|
|
40
42
|
"compat": compatPlugin,
|
|
41
43
|
"de-morgan": deMorganPlugin,
|
|
@@ -44,9 +46,11 @@ export default [
|
|
|
44
46
|
"jsx-a11y": jsxA11yPlugin,
|
|
45
47
|
"node": nodePlugin,
|
|
46
48
|
"perfectionist": perfectionistPlugin,
|
|
47
|
-
"react":
|
|
49
|
+
"react": eslintReactPlugin,
|
|
50
|
+
"react-dom": eslintReactPlugin.configs.dom.plugins["@eslint-react/dom"],
|
|
48
51
|
"react-hooks": reactHooksPlugin,
|
|
49
52
|
"react-refresh": reactRefreshPlugin,
|
|
53
|
+
"react-web-api": eslintReactPlugin.configs["web-api"].plugins["@eslint-react/web-api"],
|
|
50
54
|
"react-you-might-not-need-an-effect": reactEffectPlugin,
|
|
51
55
|
"regexp": regexpPlugin,
|
|
52
56
|
"security": securityPlugin,
|
|
@@ -64,9 +68,6 @@ export default [
|
|
|
64
68
|
...globals.browser,
|
|
65
69
|
},
|
|
66
70
|
},
|
|
67
|
-
settings: {
|
|
68
|
-
react: { version: "detect" },
|
|
69
|
-
},
|
|
70
71
|
rules: {
|
|
71
72
|
"@cspell/spellchecker": [
|
|
72
73
|
"warn",
|
|
@@ -77,6 +78,14 @@ export default [
|
|
|
77
78
|
"autoFix": false
|
|
78
79
|
}
|
|
79
80
|
],
|
|
81
|
+
"@stylistic/jsx-curly-brace-presence": [
|
|
82
|
+
"error",
|
|
83
|
+
{
|
|
84
|
+
"props": "never",
|
|
85
|
+
"children": "never"
|
|
86
|
+
}
|
|
87
|
+
],
|
|
88
|
+
"@stylistic/jsx-self-closing-comp": "error",
|
|
80
89
|
"@typescript-eslint/adjacent-overload-signatures": "error",
|
|
81
90
|
"@typescript-eslint/array-type": [
|
|
82
91
|
"error",
|
|
@@ -119,7 +128,7 @@ export default [
|
|
|
119
128
|
"allowExpressions": true,
|
|
120
129
|
"allowTypedFunctionExpressions": true,
|
|
121
130
|
"allowHigherOrderFunctions": true,
|
|
122
|
-
"
|
|
131
|
+
"allowIIFEs": true
|
|
123
132
|
}
|
|
124
133
|
],
|
|
125
134
|
"@typescript-eslint/explicit-member-accessibility": "error",
|
|
@@ -741,8 +750,15 @@ export default [
|
|
|
741
750
|
"prefer-template": "error",
|
|
742
751
|
"preserve-caught-error": "error",
|
|
743
752
|
"radix": "error",
|
|
753
|
+
"react-dom/no-dangerously-set-innerhtml": "warn",
|
|
754
|
+
"react-dom/no-dangerously-set-innerhtml-with-children": "error",
|
|
755
|
+
"react-dom/no-missing-button-type": "error",
|
|
756
|
+
"react-dom/no-missing-iframe-sandbox": "error",
|
|
757
|
+
"react-dom/no-string-style-prop": "error",
|
|
758
|
+
"react-dom/no-unknown-property": "error",
|
|
759
|
+
"react-dom/no-unsafe-target-blank": "error",
|
|
760
|
+
"react-dom/no-void-elements-with-children": "error",
|
|
744
761
|
"react-hooks/exhaustive-deps": "error",
|
|
745
|
-
"react-hooks/react-compiler": "error",
|
|
746
762
|
"react-hooks/rules-of-hooks": "error",
|
|
747
763
|
"react-refresh/only-export-components": [
|
|
748
764
|
"warn",
|
|
@@ -750,6 +766,10 @@ export default [
|
|
|
750
766
|
"allowConstantExport": true
|
|
751
767
|
}
|
|
752
768
|
],
|
|
769
|
+
"react-web-api/no-leaked-event-listener": "error",
|
|
770
|
+
"react-web-api/no-leaked-interval": "error",
|
|
771
|
+
"react-web-api/no-leaked-resize-observer": "error",
|
|
772
|
+
"react-web-api/no-leaked-timeout": "error",
|
|
753
773
|
"react-you-might-not-need-an-effect/no-adjust-state-on-prop-change": "warn",
|
|
754
774
|
"react-you-might-not-need-an-effect/no-chain-state-updates": "error",
|
|
755
775
|
"react-you-might-not-need-an-effect/no-derived-state": "error",
|
|
@@ -759,63 +779,23 @@ export default [
|
|
|
759
779
|
"react-you-might-not-need-an-effect/no-pass-data-to-parent": "error",
|
|
760
780
|
"react-you-might-not-need-an-effect/no-pass-live-state-to-parent": "error",
|
|
761
781
|
"react-you-might-not-need-an-effect/no-reset-all-state-on-prop-change": "error",
|
|
762
|
-
"react/button-has-type": "error",
|
|
763
|
-
"react/function-component-definition": [
|
|
764
|
-
"error",
|
|
765
|
-
{
|
|
766
|
-
"namedComponents": "function-declaration",
|
|
767
|
-
"unnamedComponents": "arrow-function"
|
|
768
|
-
}
|
|
769
|
-
],
|
|
770
|
-
"react/hook-use-state": "error",
|
|
771
|
-
"react/iframe-missing-sandbox": "error",
|
|
772
|
-
"react/jsx-boolean-value": [
|
|
773
|
-
"error",
|
|
774
|
-
"never"
|
|
775
|
-
],
|
|
776
|
-
"react/jsx-curly-brace-presence": [
|
|
777
|
-
"error",
|
|
778
|
-
{
|
|
779
|
-
"props": "never",
|
|
780
|
-
"children": "never"
|
|
781
|
-
}
|
|
782
|
-
],
|
|
783
|
-
"react/jsx-key": [
|
|
784
|
-
"error",
|
|
785
|
-
{
|
|
786
|
-
"checkFragmentShorthand": true
|
|
787
|
-
}
|
|
788
|
-
],
|
|
789
|
-
"react/jsx-no-bind": "error",
|
|
790
782
|
"react/jsx-no-comment-textnodes": "error",
|
|
791
|
-
"react/jsx-
|
|
792
|
-
"react/jsx-no-duplicate-props": "error",
|
|
793
|
-
"react/jsx-no-leaked-render": "error",
|
|
794
|
-
"react/jsx-no-target-blank": "error",
|
|
795
|
-
"react/jsx-no-undef": "error",
|
|
796
|
-
"react/jsx-no-useless-fragment": [
|
|
797
|
-
"error",
|
|
798
|
-
{
|
|
799
|
-
"allowExpressions": true
|
|
800
|
-
}
|
|
801
|
-
],
|
|
802
|
-
"react/jsx-pascal-case": "error",
|
|
783
|
+
"react/jsx-shorthand-boolean": "error",
|
|
803
784
|
"react/no-access-state-in-setstate": "error",
|
|
804
785
|
"react/no-array-index-key": "error",
|
|
805
786
|
"react/no-children-prop": "error",
|
|
806
|
-
"react/no-
|
|
807
|
-
"react/no-danger-with-children": "error",
|
|
808
|
-
"react/no-deprecated": "error",
|
|
787
|
+
"react/no-context-provider": "error",
|
|
809
788
|
"react/no-direct-mutation-state": "error",
|
|
810
|
-
"react/no-
|
|
811
|
-
"react/no-
|
|
812
|
-
"react/no-
|
|
813
|
-
"react/no-
|
|
814
|
-
"react/no-
|
|
789
|
+
"react/no-duplicate-key": "error",
|
|
790
|
+
"react/no-forward-ref": "error",
|
|
791
|
+
"react/no-leaked-conditional-rendering": "error",
|
|
792
|
+
"react/no-missing-key": "error",
|
|
793
|
+
"react/no-nested-component-definitions": "error",
|
|
794
|
+
"react/no-unstable-context-value": "error",
|
|
795
|
+
"react/no-unstable-default-props": "error",
|
|
815
796
|
"react/no-unused-state": "error",
|
|
816
|
-
"react/
|
|
817
|
-
"react/
|
|
818
|
-
"react/void-dom-elements-no-children": "error",
|
|
797
|
+
"react/no-use-context": "error",
|
|
798
|
+
"react/no-useless-fragment": "error",
|
|
819
799
|
"regexp/confusing-quantifier": "warn",
|
|
820
800
|
"regexp/control-character-escape": "error",
|
|
821
801
|
"regexp/match-any": "error",
|
|
@@ -910,7 +890,7 @@ export default [
|
|
|
910
890
|
"sonarjs/max-union-size": [
|
|
911
891
|
"error",
|
|
912
892
|
{
|
|
913
|
-
"
|
|
893
|
+
"threshold": 5
|
|
914
894
|
}
|
|
915
895
|
],
|
|
916
896
|
"sonarjs/no-async-constructor": "error",
|
|
@@ -1008,7 +988,6 @@ export default [
|
|
|
1008
988
|
"unicorn/prefer-at": "error",
|
|
1009
989
|
"unicorn/prefer-date-now": "error",
|
|
1010
990
|
"unicorn/prefer-default-parameters": "error",
|
|
1011
|
-
"unicorn/prefer-early-return": "error",
|
|
1012
991
|
"unicorn/prefer-export-from": [
|
|
1013
992
|
"error",
|
|
1014
993
|
{
|