@prowise/eslint-config-linting-rules 2.0.4 → 2.0.6
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/README.md +4 -0
- package/package.json +1 -1
- package/rules/baseSettings.js +112 -111
- package/rules/plugin-import-rules.js +73 -67
- package/rules/plugin-jest-rules.js +3 -3
- package/rules/plugin-jsdoc-rules.js +12 -12
- package/rules/plugin-jsx-a11y-rules.js +2 -2
- package/rules/plugin-node-rules.js +6 -6
- package/rules/plugin-prefer-arrow-rules.js +10 -6
- package/rules/plugin-react-rules.js +54 -54
- package/rules/plugin-solid-rules.js +21 -21
- package/rules/plugin-stylistic-rules.js +32 -29
- package/rules/plugin-typescript-rules.js +40 -37
- package/rules/plugin-vitest-rules.js +6 -6
- package/rules/test-rules.js +11 -11
- package/rules/plugin-react-hooks-rules.js +0 -18
|
@@ -16,14 +16,14 @@ export default {
|
|
|
16
16
|
* Enforces consistent naming for boolean props
|
|
17
17
|
* https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/boolean-prop-naming.md.
|
|
18
18
|
*/
|
|
19
|
-
"react/boolean-prop-naming": [
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
],
|
|
19
|
+
// "react/boolean-prop-naming": [
|
|
20
|
+
// "off",
|
|
21
|
+
// {
|
|
22
|
+
// propTypeNames: ["bool", "mutuallyExclusiveTrueProps"],
|
|
23
|
+
// rule: "^(is|has)[A-Z]([A-Za-z0-9]?)+",
|
|
24
|
+
// message: "",
|
|
25
|
+
// },
|
|
26
|
+
// ],
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
29
|
* Disallow usage of button elements without an explicit type attribute
|
|
@@ -35,7 +35,7 @@ export default {
|
|
|
35
35
|
* nforce using onChange or readonly attribute when checked is used.
|
|
36
36
|
* https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/checked-requires-onchange-or-readonly.md.
|
|
37
37
|
*/
|
|
38
|
-
"react/checked-requires-onchange-or-readonly": "off",
|
|
38
|
+
// "react/checked-requires-onchange-or-readonly": "off",
|
|
39
39
|
|
|
40
40
|
/**
|
|
41
41
|
* Enforce all defaultProps have a corresponding non-required PropType
|
|
@@ -53,25 +53,25 @@ export default {
|
|
|
53
53
|
* Disallow missing displayName in a React component definition ✅
|
|
54
54
|
* https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/display-name.md.
|
|
55
55
|
*/
|
|
56
|
-
"react/display-name": ["off", { ignoreTranspilerName: false }],
|
|
56
|
+
// "react/display-name": ["off", { ignoreTranspilerName: false }],
|
|
57
57
|
|
|
58
58
|
/**
|
|
59
59
|
* Forbid certain props on Components
|
|
60
60
|
* https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/forbid-component-props.md.
|
|
61
61
|
*/
|
|
62
|
-
"react/forbid-component-props": ["off", { forbid: [] }],
|
|
62
|
+
// "react/forbid-component-props": ["off", { forbid: [] }],
|
|
63
63
|
|
|
64
64
|
/**
|
|
65
65
|
* Disallow certain props on DOM Nodes
|
|
66
66
|
* https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/forbid-dom-props.md.
|
|
67
67
|
*/
|
|
68
|
-
"react/forbid-dom-props": ["off", { forbid: [] }],
|
|
68
|
+
// "react/forbid-dom-props": ["off", { forbid: [] }],
|
|
69
69
|
|
|
70
70
|
/**
|
|
71
71
|
* Disallow certain elements
|
|
72
72
|
* https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/forbid-elements.md.
|
|
73
73
|
*/
|
|
74
|
-
"react/forbid-elements": ["off", { forbid: [] }],
|
|
74
|
+
// "react/forbid-elements": ["off", { forbid: [] }],
|
|
75
75
|
|
|
76
76
|
/**
|
|
77
77
|
* Disallow using another component"s propTypes
|
|
@@ -98,7 +98,7 @@ export default {
|
|
|
98
98
|
* Require all forwardRef components include a ref parameter
|
|
99
99
|
* https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/react/forward-ref-uses-ref.md.
|
|
100
100
|
*/
|
|
101
|
-
"react/forward-ref-uses-ref": "off",
|
|
101
|
+
// "react/forward-ref-uses-ref": "off",
|
|
102
102
|
|
|
103
103
|
/**
|
|
104
104
|
* Enforce a specific function type for function components 🔧
|
|
@@ -122,7 +122,7 @@ export default {
|
|
|
122
122
|
* Enforce sandbox attribute on iframe elements
|
|
123
123
|
* https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/iframe-missing-sandbox.md.
|
|
124
124
|
*/
|
|
125
|
-
"react/iframe-missing-sandbox": "off",
|
|
125
|
+
// "react/iframe-missing-sandbox": "off",
|
|
126
126
|
|
|
127
127
|
/**
|
|
128
128
|
* Disallow when this.state is accessed within setState
|
|
@@ -176,7 +176,7 @@ export default {
|
|
|
176
176
|
* Disallow usage of setState in componentDidMount
|
|
177
177
|
* https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-did-mount-set-state.md.
|
|
178
178
|
*/
|
|
179
|
-
"react/no-did-mount-set-state": "off",
|
|
179
|
+
// "react/no-did-mount-set-state": "off",
|
|
180
180
|
|
|
181
181
|
/**
|
|
182
182
|
* Disallow usage of setState in componentDidUpdate
|
|
@@ -188,7 +188,7 @@ export default {
|
|
|
188
188
|
* Disallow direct mutation of this.state ✅
|
|
189
189
|
* https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-direct-mutation-state.md.
|
|
190
190
|
*/
|
|
191
|
-
"react/no-direct-mutation-state": "off",
|
|
191
|
+
// "react/no-direct-mutation-state": "off",
|
|
192
192
|
|
|
193
193
|
/**
|
|
194
194
|
* Disallow usage of findDOMNode no-find-dom-node ✅
|
|
@@ -212,7 +212,7 @@ export default {
|
|
|
212
212
|
* Disallow multiple component definition per file
|
|
213
213
|
* https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-multi-comp.md.
|
|
214
214
|
*/
|
|
215
|
-
"react/no-multi-comp": "off",
|
|
215
|
+
// "react/no-multi-comp": "off",
|
|
216
216
|
|
|
217
217
|
/**
|
|
218
218
|
* Enforce that namespaces are not used in React elements
|
|
@@ -224,7 +224,7 @@ export default {
|
|
|
224
224
|
* Disallow usage of referential-type variables as default param in functional component
|
|
225
225
|
* https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-object-type-as-default-prop.md.
|
|
226
226
|
*/
|
|
227
|
-
"react/no-object-type-as-default-prop": "off",
|
|
227
|
+
// "react/no-object-type-as-default-prop": "off",
|
|
228
228
|
|
|
229
229
|
/**
|
|
230
230
|
* Disallow usage of shouldComponentUpdate when extending React.PureComponent
|
|
@@ -242,7 +242,7 @@ export default {
|
|
|
242
242
|
* Disallow usage of setState
|
|
243
243
|
* https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-set-state.md.
|
|
244
244
|
*/
|
|
245
|
-
"react/no-set-state": "off",
|
|
245
|
+
// "react/no-set-state": "off",
|
|
246
246
|
|
|
247
247
|
/**
|
|
248
248
|
* Disallow using string references ✅
|
|
@@ -278,7 +278,7 @@ export default {
|
|
|
278
278
|
* Disallow usage of unsafe lifecycle methods
|
|
279
279
|
* https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unsafe.md.
|
|
280
280
|
*/
|
|
281
|
-
"react/no-unsafe": "off",
|
|
281
|
+
// "react/no-unsafe": "off",
|
|
282
282
|
|
|
283
283
|
/**
|
|
284
284
|
* Disallow creating unstable components inside components
|
|
@@ -326,7 +326,7 @@ export default {
|
|
|
326
326
|
* Enforce that props are read-only 🔧
|
|
327
327
|
* https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/prefer-read-only-props.md.
|
|
328
328
|
*/
|
|
329
|
-
"react/prefer-read-only-props": "off",
|
|
329
|
+
// "react/prefer-read-only-props": "off",
|
|
330
330
|
|
|
331
331
|
/**
|
|
332
332
|
* Enforce stateless components to be written as a pure function
|
|
@@ -352,20 +352,20 @@ export default {
|
|
|
352
352
|
* Off: React is defined as a global variable and doesn't need to be in scope
|
|
353
353
|
* https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/react-in-jsx-scope.md.
|
|
354
354
|
*/
|
|
355
|
-
"react/react-in-jsx-scope": "off",
|
|
355
|
+
// "react/react-in-jsx-scope": "off",
|
|
356
356
|
|
|
357
357
|
/**
|
|
358
358
|
* Enforce a defaultProps definition for every prop that is not a required prop
|
|
359
359
|
* https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/require-default-props.md.
|
|
360
360
|
* Turned off: a bit of overkill.
|
|
361
361
|
*/
|
|
362
|
-
"react/require-default-props": ["off", { forbidDefaultForRequired: true }],
|
|
362
|
+
// "react/require-default-props": ["off", { forbidDefaultForRequired: true }],
|
|
363
363
|
|
|
364
364
|
/**
|
|
365
365
|
* Enforce React components to have a shouldComponentUpdate method
|
|
366
366
|
* https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/require-optimization.md.
|
|
367
367
|
*/
|
|
368
|
-
"react/require-optimization": ["off", { allowDecorators: [] }],
|
|
368
|
+
// "react/require-optimization": ["off", { allowDecorators: [] }],
|
|
369
369
|
|
|
370
370
|
/**
|
|
371
371
|
* Enforce ES5 or ES6 class for returning value in render function ✅
|
|
@@ -437,15 +437,15 @@ export default {
|
|
|
437
437
|
* Enforce propTypes declarations alphabetical sorting
|
|
438
438
|
* https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/sort-prop-types.md.
|
|
439
439
|
*/
|
|
440
|
-
"react/sort-prop-types": [
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
],
|
|
440
|
+
// "react/sort-prop-types": [
|
|
441
|
+
// "off",
|
|
442
|
+
// {
|
|
443
|
+
// ignoreCase: true,
|
|
444
|
+
// callbacksLast: false,
|
|
445
|
+
// requiredFirst: false,
|
|
446
|
+
// sortShapeProp: true,
|
|
447
|
+
// },
|
|
448
|
+
// ],
|
|
449
449
|
|
|
450
450
|
/**
|
|
451
451
|
* Enforce class component state initialization style
|
|
@@ -481,7 +481,7 @@ export default {
|
|
|
481
481
|
* Enforce or disallow spaces inside of curly braces in JSX attributes and expressions
|
|
482
482
|
* https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-child-element-spacing.md.
|
|
483
483
|
*/
|
|
484
|
-
"react/jsx-child-element-spacing": "off",
|
|
484
|
+
// "react/jsx-child-element-spacing": "off",
|
|
485
485
|
|
|
486
486
|
/**
|
|
487
487
|
* Enforce closing bracket location in JSX 🔧
|
|
@@ -506,7 +506,7 @@ export default {
|
|
|
506
506
|
* Enforce consistent linebreaks in curly braces in JSX attributes and expressions
|
|
507
507
|
* https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-curly-newline.md.
|
|
508
508
|
*/
|
|
509
|
-
"react/jsx-curly-newline": ["off", { multiline: "consistent", singleline: "consistent" }],
|
|
509
|
+
// "react/jsx-curly-newline": ["off", { multiline: "consistent", singleline: "consistent" }],
|
|
510
510
|
|
|
511
511
|
/**
|
|
512
512
|
* Enforce or disallow spaces inside of curly braces in JSX attributes and expressions
|
|
@@ -542,7 +542,7 @@ export default {
|
|
|
542
542
|
* Enforce event handler naming conventions in JSX
|
|
543
543
|
* https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-handler-names.md.
|
|
544
544
|
*/
|
|
545
|
-
"react/jsx-handler-names": ["off", { eventHandlerPrefix: "handle", eventHandlerPropPrefix: "on" }],
|
|
545
|
+
// "react/jsx-handler-names": ["off", { eventHandlerPrefix: "handle", eventHandlerPropPrefix: "on" }],
|
|
546
546
|
|
|
547
547
|
/**
|
|
548
548
|
* Enforce JSX indentation 🔧
|
|
@@ -560,13 +560,13 @@ export default {
|
|
|
560
560
|
* Disallow missing key props in iterators/collection literals ✅
|
|
561
561
|
* https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-key.md.
|
|
562
562
|
*/
|
|
563
|
-
"react/jsx-key": "off",
|
|
563
|
+
// "react/jsx-key": "off",
|
|
564
564
|
|
|
565
565
|
/**
|
|
566
566
|
* Enforce JSX maximum depth
|
|
567
567
|
* https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-max-depth.md.
|
|
568
568
|
*/
|
|
569
|
-
"react/jsx-max-depth": "off",
|
|
569
|
+
// "react/jsx-max-depth": "off",
|
|
570
570
|
|
|
571
571
|
/**
|
|
572
572
|
* Enforce maximum of props on a single line in JSX 🔧
|
|
@@ -578,7 +578,7 @@ export default {
|
|
|
578
578
|
* Require or prevent a new line after jsx elements and expressions. 🔧
|
|
579
579
|
* https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-newline.md.
|
|
580
580
|
*/
|
|
581
|
-
"react/jsx-newline": "off",
|
|
581
|
+
// "react/jsx-newline": "off",
|
|
582
582
|
|
|
583
583
|
/**
|
|
584
584
|
* Disallow .bind() or arrow functions in JSX props
|
|
@@ -623,7 +623,7 @@ export default {
|
|
|
623
623
|
* Disallow usage of string literals in JSX
|
|
624
624
|
* https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-literals.md.
|
|
625
625
|
*/
|
|
626
|
-
"react/jsx-no-literals": ["off", { noStrings: true }],
|
|
626
|
+
// "react/jsx-no-literals": ["off", { noStrings: true }],
|
|
627
627
|
|
|
628
628
|
/**
|
|
629
629
|
* Disallow usage of javascript: URLs 🔧
|
|
@@ -653,7 +653,7 @@ export default {
|
|
|
653
653
|
* Require one JSX element per line 🔧
|
|
654
654
|
* https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-one-expression-per-line.md.
|
|
655
655
|
*/
|
|
656
|
-
"react/jsx-one-expression-per-line": "off",
|
|
656
|
+
// "react/jsx-one-expression-per-line": "off",
|
|
657
657
|
|
|
658
658
|
/**
|
|
659
659
|
* Enforce PascalCase for user-defined JSX components
|
|
@@ -685,23 +685,23 @@ export default {
|
|
|
685
685
|
* Enforce all defaultProps have a corresponding non-required PropType
|
|
686
686
|
* https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/default-props-match-prop-types.md.
|
|
687
687
|
*/
|
|
688
|
-
"react/jsx-sort-default-props": ["off", { ignoreCase: true }],
|
|
688
|
+
// "react/jsx-sort-default-props": ["off", { ignoreCase: true }],
|
|
689
689
|
|
|
690
690
|
/**
|
|
691
691
|
* Enforce props alphabetical sorting
|
|
692
692
|
* https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-sort-props.md.
|
|
693
693
|
*/
|
|
694
|
-
"react/jsx-sort-props": [
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
],
|
|
694
|
+
// "react/jsx-sort-props": [
|
|
695
|
+
// "off",
|
|
696
|
+
// {
|
|
697
|
+
// ignoreCase: true,
|
|
698
|
+
// callbacksLast: false,
|
|
699
|
+
// shorthandFirst: false,
|
|
700
|
+
// shorthandLast: false,
|
|
701
|
+
// noSortAlphabetically: false,
|
|
702
|
+
// reservedFirst: true,
|
|
703
|
+
// },
|
|
704
|
+
// ],
|
|
705
705
|
|
|
706
706
|
/**
|
|
707
707
|
* Enforce whitespace in and around the JSX opening and closing brackets 🔧
|
|
@@ -15,114 +15,114 @@ export default {
|
|
|
15
15
|
/**
|
|
16
16
|
* Disallow early returns in components. ✅ 🔧
|
|
17
17
|
* Solid components only run once, and so conditionals should be inside JSX.
|
|
18
|
-
* https://github.com/solidjs-community/eslint-plugin-solid/blob/main/docs/components-return-once.md
|
|
18
|
+
* https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/components-return-once.md
|
|
19
19
|
*/
|
|
20
20
|
"solid/components-return-once": "warn",
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* Enforce naming DOM element event handlers consistently and prevent ✅ 🔧
|
|
24
24
|
* Solid's analysis from misunderstanding whether a prop should be an event handler.
|
|
25
|
-
* https://github.com/solidjs-community/eslint-plugin-solid/blob/main/docs/event-handlers.md
|
|
25
|
+
* https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/event-handlers.md
|
|
26
26
|
*/
|
|
27
27
|
"solid/event-handlers": "warn",
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
30
|
* Enforce consistent imports from "solid-js", "solid-js/web", and "solid-js/store". ✅ 🔧
|
|
31
|
-
* https://github.com/solidjs-community/eslint-plugin-solid/blob/main/docs/imports.md
|
|
31
|
+
* https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/imports.md
|
|
32
32
|
*/
|
|
33
33
|
"solid/imports": "warn",
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
36
|
* Disallow passing the same prop twice in JSX. ✅
|
|
37
|
-
* https://github.com/solidjs-community/eslint-plugin-solid/blob/main/docs/jsx-no-duplicate-props.md
|
|
37
|
+
* https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/jsx-no-duplicate-props.md
|
|
38
38
|
*/
|
|
39
39
|
"solid/jsx-no-duplicate-props": "error",
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
42
|
* Disallow javascript: URLs. ✅
|
|
43
|
-
* https://github.com/solidjs-community/eslint-plugin-solid/blob/main/docs/jsx-no-script-url.md
|
|
43
|
+
* https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/jsx-no-script-url.md
|
|
44
44
|
*/
|
|
45
45
|
"solid/jsx-no-script-url": "error",
|
|
46
46
|
|
|
47
47
|
/**
|
|
48
48
|
* Disallow references to undefined variables in JSX. Handles custom directives. ✅ 🔧
|
|
49
|
-
* https://github.com/solidjs-community/eslint-plugin-solid/blob/main/docs/jsx-no-undef.md
|
|
49
|
+
* https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/jsx-no-undef.md
|
|
50
50
|
*/
|
|
51
51
|
"solid/jsx-no-undef": "error",
|
|
52
52
|
|
|
53
53
|
/**
|
|
54
54
|
* Prevent variables used in JSX from being marked as unused. ✅
|
|
55
|
-
* https://github.com/solidjs-community/eslint-plugin-solid/blob/main/docs/jsx-uses-vars.md
|
|
55
|
+
* https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/jsx-uses-vars.md
|
|
56
56
|
*/
|
|
57
57
|
"solid/jsx-uses-vars": "error",
|
|
58
58
|
|
|
59
59
|
/**
|
|
60
60
|
* Disallow usage of type-unsafe event handlers.
|
|
61
|
-
* https://github.com/solidjs-community/eslint-plugin-solid/blob/main/docs/no-array-handlers.md
|
|
61
|
+
* https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/no-array-handlers.md
|
|
62
62
|
*/
|
|
63
|
-
"solid/no-array-handlers": "off",
|
|
63
|
+
// "solid/no-array-handlers": "off",
|
|
64
64
|
|
|
65
65
|
/**
|
|
66
66
|
* Disallow destructuring props. ✅ 🔧
|
|
67
67
|
* In Solid, props must be used with property accesses (props.foo) to preserve reactivity.
|
|
68
68
|
* This rule only tracks destructuring in the parameter list.
|
|
69
|
-
* https://github.com/solidjs-community/eslint-plugin-solid/blob/main/docs/no-destructure.md
|
|
69
|
+
* https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/no-destructure.md
|
|
70
70
|
*/
|
|
71
71
|
"solid/no-destructure": "error",
|
|
72
72
|
|
|
73
73
|
/**
|
|
74
74
|
* Disallow usage of the innerHTML attribute, which can often lead to security vulnerabilities. ✅ 🔧
|
|
75
|
-
* https://github.com/solidjs-community/eslint-plugin-solid/blob/main/docs/no-innerhtml.md
|
|
75
|
+
* https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/no-innerhtml.md
|
|
76
76
|
*/
|
|
77
77
|
"solid/no-innerhtml": "error",
|
|
78
78
|
|
|
79
79
|
/**
|
|
80
80
|
* Disallow usage of APIs that use ES6 Proxies, only to target environments that don't support them.
|
|
81
|
-
* https://github.com/solidjs-community/eslint-plugin-solid/blob/main/docs/no-proxy-apis.md
|
|
81
|
+
* https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/no-proxy-apis.md
|
|
82
82
|
*/
|
|
83
|
-
"solid/no-proxy-apis": "off",
|
|
83
|
+
// "solid/no-proxy-apis": "off",
|
|
84
84
|
|
|
85
85
|
/**
|
|
86
86
|
* Disallow usage of dependency arrays in createEffect and createMemo. ✅ 🔧
|
|
87
|
-
* https://github.com/solidjs-community/eslint-plugin-solid/blob/main/docs/no-react-deps.md
|
|
87
|
+
* https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/no-react-deps.md
|
|
88
88
|
*/
|
|
89
89
|
"solid/no-react-deps": "warn",
|
|
90
90
|
|
|
91
91
|
/**
|
|
92
92
|
* Disallow usage of React-specific className/htmlFor props, which were deprecated in v1.4.0. ✅ 🔧
|
|
93
|
-
* https://github.com/solidjs-community/eslint-plugin-solid/blob/main/docs/no-react-specific-props.md
|
|
93
|
+
* https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/no-react-specific-props.md
|
|
94
94
|
*/
|
|
95
95
|
"solid/no-react-specific-props": "warn",
|
|
96
96
|
|
|
97
97
|
/**
|
|
98
98
|
* Enforce using only Solid-specific namespaced attribute names (i.e. 'on:' in <div on:click={...} />). ✅
|
|
99
|
-
* https://github.com/solidjs-community/eslint-plugin-solid/blob/main/docs/no-unknown-namespaces.md
|
|
99
|
+
* https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/no-unknown-namespaces.md
|
|
100
100
|
*/
|
|
101
101
|
"solid/no-unknown-namespaces": "error",
|
|
102
102
|
|
|
103
103
|
/**
|
|
104
104
|
* Enforce using Solid's <For /> component for mapping an array to JSX elements. ✅ 🔧
|
|
105
|
-
* https://github.com/solidjs-community/eslint-plugin-solid/blob/main/docs/prefer-for.md
|
|
105
|
+
* https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/prefer-for.md
|
|
106
106
|
*/
|
|
107
107
|
"solid/prefer-for": "error",
|
|
108
108
|
|
|
109
109
|
/**
|
|
110
110
|
* Enforce using Solid's <Show /> component for conditionally showing content. 🔧
|
|
111
111
|
* Solid's compiler covers this case, so it's a stylistic rule only.
|
|
112
|
-
* https://github.com/solidjs-community/eslint-plugin-solid/blob/main/docs/prefer-show.md
|
|
112
|
+
* https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/prefer-show.md
|
|
113
113
|
*/
|
|
114
|
-
"solid/prefer-show": "off",
|
|
114
|
+
// "solid/prefer-show": "off",
|
|
115
115
|
|
|
116
116
|
/**
|
|
117
117
|
* Enforce that reactivity (props, signals, memos, etc.) is properly used, ✅
|
|
118
118
|
* so changes in those values will be tracked and update the view as expected.
|
|
119
|
-
* https://github.com/solidjs-community/eslint-plugin-solid/blob/main/docs/reactivity.md
|
|
119
|
+
* https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/reactivity.md
|
|
120
120
|
*/
|
|
121
121
|
"solid/reactivity": "warn",
|
|
122
122
|
|
|
123
123
|
/**
|
|
124
124
|
* Disallow extra closing tags for components without children. ✅ 🔧
|
|
125
|
-
* https://github.com/solidjs-community/eslint-plugin-solid/blob/main/docs/self-closing-comp.md
|
|
125
|
+
* https://github.com/solidjs-community/eslint-plugin-solid/blob/main/packages/eslint-plugin-solid/docs/self-closing-comp.md
|
|
126
126
|
*/
|
|
127
127
|
"solid/self-closing-comp": "warn",
|
|
128
128
|
|
|
@@ -10,7 +10,7 @@ export default {
|
|
|
10
10
|
* Enforce line breaks after opening and before closing array brackets 🔧
|
|
11
11
|
* https://eslint.org/docs/latest/rules/array-bracket-newline.
|
|
12
12
|
*/
|
|
13
|
-
"style/array-bracket-newline": ["off", "consistent"], // object option alternative: { multiline: true, minItems: 3 }
|
|
13
|
+
// "style/array-bracket-newline": ["off", "consistent"], // object option alternative: { multiline: true, minItems: 3 }
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* Enforce spacing inside array brackets 🔧
|
|
@@ -22,7 +22,7 @@ export default {
|
|
|
22
22
|
* Enforce line breaks between array elements 🔧
|
|
23
23
|
* https://eslint.org/docs/latest/rules/array-element-newline.
|
|
24
24
|
*/
|
|
25
|
-
"style/array-element-newline": ["off", { multiline: true, minItems: 3 }],
|
|
25
|
+
// "style/array-element-newline": ["off", { multiline: true, minItems: 3 }],
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* Require parens in arrow function arguments 🔧
|
|
@@ -60,6 +60,9 @@ export default {
|
|
|
60
60
|
imports: "always-multiline",
|
|
61
61
|
exports: "always-multiline",
|
|
62
62
|
functions: "always-multiline",
|
|
63
|
+
enums: "always-multiline",
|
|
64
|
+
generics: "always-multiline",
|
|
65
|
+
tuples: "always-multiline",
|
|
63
66
|
},
|
|
64
67
|
],
|
|
65
68
|
|
|
@@ -127,7 +130,7 @@ export default {
|
|
|
127
130
|
* Require line breaks inside function parentheses if there are line breaks between parameters. 🔧
|
|
128
131
|
* https://eslint.org/docs/latest/rules/function-paren-newline.
|
|
129
132
|
*/
|
|
130
|
-
"style/function-paren-newline": "off",
|
|
133
|
+
// "style/function-paren-newline": "off",
|
|
131
134
|
|
|
132
135
|
/**
|
|
133
136
|
* Enforce the spacing around the * in generator functions 🔧
|
|
@@ -139,7 +142,7 @@ export default {
|
|
|
139
142
|
* Enforce the location of arrow function bodies with implicit returns 🔧
|
|
140
143
|
* https://eslint.org/docs/latest/rules/implicit-arrow-linebreak.
|
|
141
144
|
*/
|
|
142
|
-
"style/implicit-arrow-linebreak": "off",
|
|
145
|
+
// "style/implicit-arrow-linebreak": "off",
|
|
143
146
|
|
|
144
147
|
/**
|
|
145
148
|
* This option sets a specific tab width for your code 🔧
|
|
@@ -180,14 +183,14 @@ export default {
|
|
|
180
183
|
* Enforce position of line comments
|
|
181
184
|
* https://eslint.org/docs/latest/rules/line-comment-position.
|
|
182
185
|
*/
|
|
183
|
-
"style/line-comment-position": [
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
],
|
|
186
|
+
// "style/line-comment-position": [
|
|
187
|
+
// "off",
|
|
188
|
+
// {
|
|
189
|
+
// position: "above",
|
|
190
|
+
// ignorePattern: "",
|
|
191
|
+
// applyDefaultPatterns: true,
|
|
192
|
+
// },
|
|
193
|
+
// ],
|
|
191
194
|
|
|
192
195
|
/**
|
|
193
196
|
* Disallow mixed "LF" and "CRLF" as linebreaks 🔧
|
|
@@ -199,7 +202,7 @@ export default {
|
|
|
199
202
|
* Enforces empty lines around comments 🔧
|
|
200
203
|
* https://eslint.org/docs/latest/rules/lines-around-comment.
|
|
201
204
|
*/
|
|
202
|
-
"style/lines-around-comment": "off",
|
|
205
|
+
// "style/lines-around-comment": "off",
|
|
203
206
|
|
|
204
207
|
/**
|
|
205
208
|
* Require or disallow an empty line between class members 🔧
|
|
@@ -228,19 +231,19 @@ export default {
|
|
|
228
231
|
* Restrict the number of statements per line
|
|
229
232
|
* https://eslint.org/docs/latest/rules/max-statements-per-line.
|
|
230
233
|
*/
|
|
231
|
-
"style/max-statements-per-line": ["off", { max: 1 }],
|
|
234
|
+
// "style/max-statements-per-line": ["off", { max: 1 }],
|
|
232
235
|
|
|
233
236
|
/**
|
|
234
237
|
* Enforce a particular style for multiline comments 🔧
|
|
235
238
|
* https://eslint.org/docs/latest/rules/multiline-comment-style.
|
|
236
239
|
*/
|
|
237
|
-
"style/multiline-comment-style": ["off", "starred-block"],
|
|
240
|
+
// "style/multiline-comment-style": ["off", "starred-block"],
|
|
238
241
|
|
|
239
242
|
/**
|
|
240
243
|
* Require multiline ternary 🔧
|
|
241
244
|
* https://eslint.org/docs/latest/rules/multiline-ternary.
|
|
242
245
|
*/
|
|
243
|
-
"style/multiline-ternary": ["off", "never"],
|
|
246
|
+
// "style/multiline-ternary": ["off", "never"],
|
|
244
247
|
|
|
245
248
|
/**
|
|
246
249
|
* Disallow the omission of parentheses when invoking a constructor with no arguments 🔧
|
|
@@ -300,17 +303,17 @@ export default {
|
|
|
300
303
|
* Disallow unnecessary parentheses 🔧
|
|
301
304
|
* https://eslint.org/docs/latest/rules/no-extra-parens.
|
|
302
305
|
*/
|
|
303
|
-
"style/no-extra-parens": [
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
],
|
|
306
|
+
// "style/no-extra-parens": [
|
|
307
|
+
// "off",
|
|
308
|
+
// "all",
|
|
309
|
+
// {
|
|
310
|
+
// conditionalAssign: true,
|
|
311
|
+
// nestedBinaryExpressions: false,
|
|
312
|
+
// returnAssign: false,
|
|
313
|
+
// ignoreJSX: "all", // delegate to eslint-plugin-react
|
|
314
|
+
// enforceForArrowConditionals: false,
|
|
315
|
+
// },
|
|
316
|
+
// ],
|
|
314
317
|
|
|
315
318
|
/**
|
|
316
319
|
* Disallow mixed spaces and tabs for indentation ✅
|
|
@@ -412,7 +415,7 @@ export default {
|
|
|
412
415
|
* Require or disallow padding lines between statements 🔧
|
|
413
416
|
* https://eslint.org/docs/latest/rules/padding-line-between-statements.
|
|
414
417
|
*/
|
|
415
|
-
"style/padding-line-between-statements": "off",
|
|
418
|
+
// "style/padding-line-between-statements": "off",
|
|
416
419
|
|
|
417
420
|
/**
|
|
418
421
|
* Specifies double quotes should be used 🔧
|
|
@@ -527,7 +530,7 @@ export default {
|
|
|
527
530
|
* Require regex literals to be wrapped in parentheses 🔧
|
|
528
531
|
* https://eslint.org/docs/latest/rules/wrap-regex.
|
|
529
532
|
*/
|
|
530
|
-
"style/wrap-regex": "off",
|
|
533
|
+
// "style/wrap-regex": "off",
|
|
531
534
|
|
|
532
535
|
/**
|
|
533
536
|
* Enforce spacing around the * in yield* expressions 🔧
|