@coderwyd/eslint-config 2.6.2 → 2.6.3
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/cli.cjs +12 -12
- package/dist/cli.js +12 -12
- package/dist/index.cjs +51 -15
- package/dist/index.d.cts +69 -46
- package/dist/index.d.ts +69 -46
- package/dist/index.js +51 -15
- package/package.json +25 -25
package/dist/cli.cjs
CHANGED
|
@@ -37,20 +37,20 @@ var import_helpers = require("yargs/helpers");
|
|
|
37
37
|
var import_picocolors = __toESM(require("picocolors"), 1);
|
|
38
38
|
|
|
39
39
|
// package.json
|
|
40
|
-
var version = "2.6.
|
|
40
|
+
var version = "2.6.3";
|
|
41
41
|
var devDependencies = {
|
|
42
|
-
"@antfu/ni": "^0.22.
|
|
43
|
-
"@eslint-react/eslint-plugin": "^1.
|
|
42
|
+
"@antfu/ni": "^0.22.1",
|
|
43
|
+
"@eslint-react/eslint-plugin": "^1.9.1",
|
|
44
44
|
"@eslint/config-inspector": "^0.5.2",
|
|
45
|
-
"@stylistic/eslint-plugin-migrate": "^2.
|
|
45
|
+
"@stylistic/eslint-plugin-migrate": "^2.6.2",
|
|
46
46
|
"@types/eslint": "^9.6.0",
|
|
47
47
|
"@types/fs-extra": "^11.0.4",
|
|
48
|
-
"@types/node": "^20.14.
|
|
48
|
+
"@types/node": "^20.14.15",
|
|
49
49
|
"@types/prompts": "^2.4.9",
|
|
50
|
-
"@types/yargs": "^17.0.
|
|
51
|
-
"@unocss/eslint-plugin": "^0.61.
|
|
52
|
-
bumpp: "^9.4.
|
|
53
|
-
eslint: "^9.
|
|
50
|
+
"@types/yargs": "^17.0.33",
|
|
51
|
+
"@unocss/eslint-plugin": "^0.61.9",
|
|
52
|
+
bumpp: "^9.4.2",
|
|
53
|
+
eslint: "^9.9.0",
|
|
54
54
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
55
55
|
"eslint-plugin-react-refresh": "^0.4.9",
|
|
56
56
|
"eslint-plugin-svelte": "2.43.0",
|
|
@@ -58,13 +58,13 @@ var devDependencies = {
|
|
|
58
58
|
execa: "^9.3.0",
|
|
59
59
|
"fast-glob": "^3.3.2",
|
|
60
60
|
"fs-extra": "^11.2.0",
|
|
61
|
-
"lint-staged": "^15.2.
|
|
61
|
+
"lint-staged": "^15.2.8",
|
|
62
62
|
rimraf: "^6.0.1",
|
|
63
63
|
"simple-git-hooks": "^2.11.1",
|
|
64
64
|
svelte: "^4.2.18",
|
|
65
65
|
"svelte-eslint-parser": "^0.41.0",
|
|
66
|
-
tsup: "^8.2.
|
|
67
|
-
tsx: "^4.
|
|
66
|
+
tsup: "^8.2.4",
|
|
67
|
+
tsx: "^4.17.0",
|
|
68
68
|
typescript: "^5.5.4"
|
|
69
69
|
};
|
|
70
70
|
|
package/dist/cli.js
CHANGED
|
@@ -8,20 +8,20 @@ import { hideBin } from "yargs/helpers";
|
|
|
8
8
|
import c from "picocolors";
|
|
9
9
|
|
|
10
10
|
// package.json
|
|
11
|
-
var version = "2.6.
|
|
11
|
+
var version = "2.6.3";
|
|
12
12
|
var devDependencies = {
|
|
13
|
-
"@antfu/ni": "^0.22.
|
|
14
|
-
"@eslint-react/eslint-plugin": "^1.
|
|
13
|
+
"@antfu/ni": "^0.22.1",
|
|
14
|
+
"@eslint-react/eslint-plugin": "^1.9.1",
|
|
15
15
|
"@eslint/config-inspector": "^0.5.2",
|
|
16
|
-
"@stylistic/eslint-plugin-migrate": "^2.
|
|
16
|
+
"@stylistic/eslint-plugin-migrate": "^2.6.2",
|
|
17
17
|
"@types/eslint": "^9.6.0",
|
|
18
18
|
"@types/fs-extra": "^11.0.4",
|
|
19
|
-
"@types/node": "^20.14.
|
|
19
|
+
"@types/node": "^20.14.15",
|
|
20
20
|
"@types/prompts": "^2.4.9",
|
|
21
|
-
"@types/yargs": "^17.0.
|
|
22
|
-
"@unocss/eslint-plugin": "^0.61.
|
|
23
|
-
bumpp: "^9.4.
|
|
24
|
-
eslint: "^9.
|
|
21
|
+
"@types/yargs": "^17.0.33",
|
|
22
|
+
"@unocss/eslint-plugin": "^0.61.9",
|
|
23
|
+
bumpp: "^9.4.2",
|
|
24
|
+
eslint: "^9.9.0",
|
|
25
25
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
26
26
|
"eslint-plugin-react-refresh": "^0.4.9",
|
|
27
27
|
"eslint-plugin-svelte": "2.43.0",
|
|
@@ -29,13 +29,13 @@ var devDependencies = {
|
|
|
29
29
|
execa: "^9.3.0",
|
|
30
30
|
"fast-glob": "^3.3.2",
|
|
31
31
|
"fs-extra": "^11.2.0",
|
|
32
|
-
"lint-staged": "^15.2.
|
|
32
|
+
"lint-staged": "^15.2.8",
|
|
33
33
|
rimraf: "^6.0.1",
|
|
34
34
|
"simple-git-hooks": "^2.11.1",
|
|
35
35
|
svelte: "^4.2.18",
|
|
36
36
|
"svelte-eslint-parser": "^0.41.0",
|
|
37
|
-
tsup: "^8.2.
|
|
38
|
-
tsx: "^4.
|
|
37
|
+
tsup: "^8.2.4",
|
|
38
|
+
tsx: "^4.17.0",
|
|
39
39
|
typescript: "^5.5.4"
|
|
40
40
|
};
|
|
41
41
|
|
package/dist/index.cjs
CHANGED
|
@@ -658,6 +658,7 @@ function node() {
|
|
|
658
658
|
"node/no-exports-assign": "error",
|
|
659
659
|
"node/no-new-require": "error",
|
|
660
660
|
"node/no-path-concat": "error",
|
|
661
|
+
"node/no-unsupported-features/es-builtins": "error",
|
|
661
662
|
"node/prefer-global/buffer": ["error", "never"],
|
|
662
663
|
"node/prefer-global/process": ["error", "never"],
|
|
663
664
|
"node/process-exit-as-throw": "error"
|
|
@@ -1059,7 +1060,8 @@ async function typescript(options = {}) {
|
|
|
1059
1060
|
"ts/no-extraneous-class": "off",
|
|
1060
1061
|
"ts/no-import-type-side-effects": "error",
|
|
1061
1062
|
"ts/no-invalid-void-type": "off",
|
|
1062
|
-
|
|
1063
|
+
// this is deprecated
|
|
1064
|
+
"ts/no-loss-of-precision": "off",
|
|
1063
1065
|
"ts/no-non-null-assertion": "off",
|
|
1064
1066
|
"ts/no-redeclare": "error",
|
|
1065
1067
|
"ts/no-require-imports": "error",
|
|
@@ -1299,20 +1301,20 @@ async function vue(options = {}) {
|
|
|
1299
1301
|
"vue/dot-notation": ["error", { allowKeywords: true }],
|
|
1300
1302
|
"vue/eqeqeq": ["error", "smart"],
|
|
1301
1303
|
"vue/html-indent": ["error", indent],
|
|
1302
|
-
// 'vue/html-self-closing': [
|
|
1303
|
-
// 'error',
|
|
1304
|
-
// {
|
|
1305
|
-
// html: {
|
|
1306
|
-
// component: 'always',
|
|
1307
|
-
// normal: 'always',
|
|
1308
|
-
// void: 'any',
|
|
1309
|
-
// },
|
|
1310
|
-
// math: 'always',
|
|
1311
|
-
// svg: 'always',
|
|
1312
|
-
// },
|
|
1313
1304
|
"vue/html-quotes": ["error", "double"],
|
|
1314
|
-
|
|
1315
|
-
|
|
1305
|
+
"vue/html-self-closing": [
|
|
1306
|
+
"error",
|
|
1307
|
+
{
|
|
1308
|
+
html: {
|
|
1309
|
+
component: "always",
|
|
1310
|
+
normal: "always",
|
|
1311
|
+
void: "any"
|
|
1312
|
+
},
|
|
1313
|
+
math: "always",
|
|
1314
|
+
svg: "always"
|
|
1315
|
+
}
|
|
1316
|
+
],
|
|
1317
|
+
"vue/max-attributes-per-line": "off",
|
|
1316
1318
|
"vue/multi-word-component-names": "off",
|
|
1317
1319
|
// 'vue/next-tick-style': ['warn', 'promise'],
|
|
1318
1320
|
"vue/no-constant-condition": "warn",
|
|
@@ -1364,6 +1366,7 @@ async function vue(options = {}) {
|
|
|
1364
1366
|
}
|
|
1365
1367
|
],
|
|
1366
1368
|
"vue/require-prop-types": "off",
|
|
1369
|
+
// 'vue/singleline-html-element-content-newline': 'off',
|
|
1367
1370
|
"vue/space-infix-ops": "error",
|
|
1368
1371
|
"vue/space-unary-ops": ["error", { nonwords: false, words: true }],
|
|
1369
1372
|
"vue/valid-define-options": "warn",
|
|
@@ -1422,7 +1425,7 @@ var _pluginTest;
|
|
|
1422
1425
|
async function test(options = {}) {
|
|
1423
1426
|
const { files = GLOB_TESTS, isInEditor: isInEditor2 = false, overrides = {} } = options;
|
|
1424
1427
|
const [pluginVitest, pluginNoOnlyTests] = await Promise.all([
|
|
1425
|
-
interopDefault(import("eslint-plugin
|
|
1428
|
+
interopDefault(import("@vitest/eslint-plugin")),
|
|
1426
1429
|
// @ts-expect-error missing types
|
|
1427
1430
|
interopDefault(import("eslint-plugin-no-only-tests"))
|
|
1428
1431
|
]);
|
|
@@ -1501,6 +1504,39 @@ function perfectionist() {
|
|
|
1501
1504
|
"perfectionist/sort-named-imports": [
|
|
1502
1505
|
"warn",
|
|
1503
1506
|
{ groupKind: "values-first" }
|
|
1507
|
+
],
|
|
1508
|
+
"perfectionist/sort-vue-attributes": [
|
|
1509
|
+
"error",
|
|
1510
|
+
{
|
|
1511
|
+
// Based on: https://vuejs.org/style-guide/rules-recommended.html#element-attribute-order
|
|
1512
|
+
customGroups: {
|
|
1513
|
+
CONDITIONALS: "v-*(else-if|if|else|show|cloak)",
|
|
1514
|
+
CONTENT: "v-*(html|text)",
|
|
1515
|
+
DEFINITION: "*(is|:is|v-is)",
|
|
1516
|
+
// OTHER_DIRECTIVES e.g. 'v-custom-directive'
|
|
1517
|
+
EVENTS: "*(v-on|@*)",
|
|
1518
|
+
GLOBAL: "*(:id|id)",
|
|
1519
|
+
LIST_RENDERING: "v-for",
|
|
1520
|
+
RENDER_MODIFIERS: "v-*(pre|once)",
|
|
1521
|
+
SLOT: "*(v-slot|slot)",
|
|
1522
|
+
TWO_WAY_BINDING: "*(v-model|v-model:*)",
|
|
1523
|
+
UNIQUE: "*(ref|key|:ref|:key)"
|
|
1524
|
+
},
|
|
1525
|
+
groups: [
|
|
1526
|
+
"DEFINITION",
|
|
1527
|
+
"LIST_RENDERING",
|
|
1528
|
+
"CONDITIONALS",
|
|
1529
|
+
"RENDER_MODIFIERS",
|
|
1530
|
+
"GLOBAL",
|
|
1531
|
+
"UNIQUE",
|
|
1532
|
+
"SLOT",
|
|
1533
|
+
"TWO_WAY_BINDING",
|
|
1534
|
+
"unknown",
|
|
1535
|
+
"EVENTS",
|
|
1536
|
+
"CONTENT"
|
|
1537
|
+
],
|
|
1538
|
+
type: "natural"
|
|
1539
|
+
}
|
|
1504
1540
|
]
|
|
1505
1541
|
}
|
|
1506
1542
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -670,7 +670,7 @@ interface RuleOptions {
|
|
|
670
670
|
'jsdoc/check-tag-names'?: Linter.RuleEntry<JsdocCheckTagNames>
|
|
671
671
|
/**
|
|
672
672
|
* Checks that any `@template` names are actually used in the connected `@typedef` or type alias.
|
|
673
|
-
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/
|
|
673
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-template-names.md#repos-sticky-header
|
|
674
674
|
*/
|
|
675
675
|
'jsdoc/check-template-names'?: Linter.RuleEntry<[]>
|
|
676
676
|
/**
|
|
@@ -708,6 +708,11 @@ interface RuleOptions {
|
|
|
708
708
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/informative-docs.md#repos-sticky-header
|
|
709
709
|
*/
|
|
710
710
|
'jsdoc/informative-docs'?: Linter.RuleEntry<JsdocInformativeDocs>
|
|
711
|
+
/**
|
|
712
|
+
* Enforces minimum number of newlines before JSDoc comment blocks
|
|
713
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/lines-before-block.md#repos-sticky-header
|
|
714
|
+
*/
|
|
715
|
+
'jsdoc/lines-before-block'?: Linter.RuleEntry<JsdocLinesBeforeBlock>
|
|
711
716
|
/**
|
|
712
717
|
* Enforces a regular expression pattern on descriptions.
|
|
713
718
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/match-description.md#repos-sticky-header
|
|
@@ -2628,17 +2633,17 @@ interface RuleOptions {
|
|
|
2628
2633
|
'react-naming-convention/use-state'?: Linter.RuleEntry<[]>
|
|
2629
2634
|
'react-refresh/only-export-components'?: Linter.RuleEntry<ReactRefreshOnlyExportComponents>
|
|
2630
2635
|
/**
|
|
2631
|
-
*
|
|
2636
|
+
* avoid using shorthand boolean attribute
|
|
2632
2637
|
* @see https://eslint-react.xyz/docs/rules/avoid-shorthand-boolean
|
|
2633
2638
|
*/
|
|
2634
2639
|
'react/avoid-shorthand-boolean'?: Linter.RuleEntry<[]>
|
|
2635
2640
|
/**
|
|
2636
|
-
*
|
|
2641
|
+
* avoid using shorthand fragment syntax
|
|
2637
2642
|
* @see https://eslint-react.xyz/docs/rules/avoid-shorthand-fragment
|
|
2638
2643
|
*/
|
|
2639
2644
|
'react/avoid-shorthand-fragment'?: Linter.RuleEntry<[]>
|
|
2640
2645
|
/**
|
|
2641
|
-
* require
|
|
2646
|
+
* require a 'ref' parameter to be set when using 'forwardRef'
|
|
2642
2647
|
* @see https://eslint-react.xyz/docs/rules/ensure-forward-ref-using-ref
|
|
2643
2648
|
*/
|
|
2644
2649
|
'react/ensure-forward-ref-using-ref'?: Linter.RuleEntry<[]>
|
|
@@ -2648,47 +2653,47 @@ interface RuleOptions {
|
|
|
2648
2653
|
*/
|
|
2649
2654
|
'react/no-access-state-in-setstate'?: Linter.RuleEntry<[]>
|
|
2650
2655
|
/**
|
|
2651
|
-
* disallow using Array index as key
|
|
2656
|
+
* disallow using Array index as 'key'
|
|
2652
2657
|
* @see https://eslint-react.xyz/docs/rules/no-array-index-key
|
|
2653
2658
|
*/
|
|
2654
2659
|
'react/no-array-index-key'?: Linter.RuleEntry<[]>
|
|
2655
2660
|
/**
|
|
2656
|
-
* disallow 'Children.count'
|
|
2661
|
+
* disallow using 'Children.count'
|
|
2657
2662
|
* @see https://eslint-react.xyz/docs/rules/no-children-count
|
|
2658
2663
|
*/
|
|
2659
2664
|
'react/no-children-count'?: Linter.RuleEntry<[]>
|
|
2660
2665
|
/**
|
|
2661
|
-
* disallow 'Children.forEach'
|
|
2666
|
+
* disallow using 'Children.forEach'
|
|
2662
2667
|
* @see https://eslint-react.xyz/docs/rules/no-children-for-each
|
|
2663
2668
|
*/
|
|
2664
2669
|
'react/no-children-for-each'?: Linter.RuleEntry<[]>
|
|
2665
2670
|
/**
|
|
2666
|
-
* disallow 'Children.map'
|
|
2671
|
+
* disallow using 'Children.map'
|
|
2667
2672
|
* @see https://eslint-react.xyz/docs/rules/no-children-map
|
|
2668
2673
|
*/
|
|
2669
2674
|
'react/no-children-map'?: Linter.RuleEntry<[]>
|
|
2670
2675
|
/**
|
|
2671
|
-
* disallow 'Children.only'
|
|
2676
|
+
* disallow using 'Children.only'
|
|
2672
2677
|
* @see https://eslint-react.xyz/docs/rules/no-children-only
|
|
2673
2678
|
*/
|
|
2674
2679
|
'react/no-children-only'?: Linter.RuleEntry<[]>
|
|
2675
2680
|
/**
|
|
2676
|
-
* disallow passing
|
|
2681
|
+
* disallow passing 'children' as props
|
|
2677
2682
|
* @see https://eslint-react.xyz/docs/rules/no-children-prop
|
|
2678
2683
|
*/
|
|
2679
2684
|
'react/no-children-prop'?: Linter.RuleEntry<[]>
|
|
2680
2685
|
/**
|
|
2681
|
-
* disallow 'Children.toArray'
|
|
2686
|
+
* disallow using 'Children.toArray'
|
|
2682
2687
|
* @see https://eslint-react.xyz/docs/rules/no-children-to-array
|
|
2683
2688
|
*/
|
|
2684
2689
|
'react/no-children-to-array'?: Linter.RuleEntry<[]>
|
|
2685
2690
|
/**
|
|
2686
|
-
* disallow class
|
|
2691
|
+
* disallow using class components
|
|
2687
2692
|
* @see https://eslint-react.xyz/docs/rules/no-class-component
|
|
2688
2693
|
*/
|
|
2689
2694
|
'react/no-class-component'?: Linter.RuleEntry<[]>
|
|
2690
2695
|
/**
|
|
2691
|
-
* disallow 'cloneElement'
|
|
2696
|
+
* disallow using 'cloneElement'
|
|
2692
2697
|
* @see https://eslint-react.xyz/docs/rules/no-clone-element
|
|
2693
2698
|
*/
|
|
2694
2699
|
'react/no-clone-element'?: Linter.RuleEntry<[]>
|
|
@@ -2698,33 +2703,37 @@ interface RuleOptions {
|
|
|
2698
2703
|
*/
|
|
2699
2704
|
'react/no-comment-textnodes'?: Linter.RuleEntry<[]>
|
|
2700
2705
|
/**
|
|
2701
|
-
* disallow
|
|
2702
|
-
* @see https://eslint-react.xyz/docs/rules/no-
|
|
2703
|
-
|
|
2706
|
+
* disallow complex conditional rendering
|
|
2707
|
+
* @see https://eslint-react.xyz/docs/rules/no-complex-conditional-rendering
|
|
2708
|
+
*/
|
|
2709
|
+
'react/no-complex-conditional-rendering'?: Linter.RuleEntry<[]>
|
|
2710
|
+
/**
|
|
2711
|
+
* disallow complex conditional rendering
|
|
2712
|
+
* @see https://eslint-react.xyz/docs/rules/no-complex-conditional-rendering
|
|
2704
2713
|
*/
|
|
2705
2714
|
'react/no-complicated-conditional-rendering'?: Linter.RuleEntry<[]>
|
|
2706
2715
|
/**
|
|
2707
|
-
* disallow
|
|
2716
|
+
* disallow using 'componentWillMount'
|
|
2708
2717
|
* @see https://eslint-react.xyz/docs/rules/no-component-will-mount
|
|
2709
2718
|
*/
|
|
2710
2719
|
'react/no-component-will-mount'?: Linter.RuleEntry<[]>
|
|
2711
2720
|
/**
|
|
2712
|
-
* disallow
|
|
2721
|
+
* disallow using 'componentWillReceiveProps'
|
|
2713
2722
|
* @see https://eslint-react.xyz/docs/rules/no-component-will-receive-props
|
|
2714
2723
|
*/
|
|
2715
2724
|
'react/no-component-will-receive-props'?: Linter.RuleEntry<[]>
|
|
2716
2725
|
/**
|
|
2717
|
-
* disallow
|
|
2726
|
+
* disallow using 'componentWillReceiveProps'
|
|
2718
2727
|
* @see https://eslint-react.xyz/docs/rules/no-component-will-update
|
|
2719
2728
|
*/
|
|
2720
2729
|
'react/no-component-will-update'?: Linter.RuleEntry<[]>
|
|
2721
2730
|
/**
|
|
2722
|
-
* disallow 'createRef' in function components
|
|
2731
|
+
* disallow using 'createRef' in function components
|
|
2723
2732
|
* @see https://eslint-react.xyz/docs/rules/no-create-ref
|
|
2724
2733
|
*/
|
|
2725
2734
|
'react/no-create-ref'?: Linter.RuleEntry<[]>
|
|
2726
2735
|
/**
|
|
2727
|
-
* disallow
|
|
2736
|
+
* disallow using 'defaultProps' property in components
|
|
2728
2737
|
* @see https://eslint-react.xyz/docs/rules/no-default-props
|
|
2729
2738
|
*/
|
|
2730
2739
|
'react/no-default-props'?: Linter.RuleEntry<[]>
|
|
@@ -2734,14 +2743,13 @@ interface RuleOptions {
|
|
|
2734
2743
|
*/
|
|
2735
2744
|
'react/no-direct-mutation-state'?: Linter.RuleEntry<[]>
|
|
2736
2745
|
/**
|
|
2737
|
-
* disallow duplicate keys
|
|
2746
|
+
* disallow duplicate keys when rendering list
|
|
2738
2747
|
* @see https://eslint-react.xyz/docs/rules/no-duplicate-key
|
|
2739
2748
|
*/
|
|
2740
2749
|
'react/no-duplicate-key'?: Linter.RuleEntry<[]>
|
|
2741
2750
|
/**
|
|
2742
|
-
* disallow
|
|
2751
|
+
* disallow implicit 'key' props
|
|
2743
2752
|
* @see https://eslint-react.xyz/docs/rules/no-implicit-key
|
|
2744
|
-
* @deprecated
|
|
2745
2753
|
*/
|
|
2746
2754
|
'react/no-implicit-key'?: Linter.RuleEntry<[]>
|
|
2747
2755
|
/**
|
|
@@ -2750,42 +2758,42 @@ interface RuleOptions {
|
|
|
2750
2758
|
*/
|
|
2751
2759
|
'react/no-leaked-conditional-rendering'?: Linter.RuleEntry<[]>
|
|
2752
2760
|
/**
|
|
2753
|
-
* require 'displayName' for memo and forwardRef components
|
|
2761
|
+
* require 'displayName' for 'memo' and 'forwardRef' components
|
|
2754
2762
|
* @see https://eslint-react.xyz/docs/rules/no-missing-component-display-name
|
|
2755
2763
|
*/
|
|
2756
2764
|
'react/no-missing-component-display-name'?: Linter.RuleEntry<[]>
|
|
2757
2765
|
/**
|
|
2758
|
-
* require 'key'
|
|
2766
|
+
* require 'key' when rendering list
|
|
2759
2767
|
* @see https://eslint-react.xyz/docs/rules/no-missing-key
|
|
2760
2768
|
*/
|
|
2761
2769
|
'react/no-missing-key'?: Linter.RuleEntry<[]>
|
|
2762
2770
|
/**
|
|
2763
|
-
* disallow
|
|
2771
|
+
* disallow using unstable nested components
|
|
2764
2772
|
* @see https://eslint-react.xyz/docs/rules/no-nested-components
|
|
2765
2773
|
*/
|
|
2766
2774
|
'react/no-nested-components'?: Linter.RuleEntry<[]>
|
|
2767
2775
|
/**
|
|
2768
|
-
* disallow
|
|
2776
|
+
* disallow using 'propTypes' property in components
|
|
2769
2777
|
* @see https://eslint-react.xyz/docs/rules/no-prop-types
|
|
2770
2778
|
*/
|
|
2771
2779
|
'react/no-prop-types'?: Linter.RuleEntry<[]>
|
|
2772
2780
|
/**
|
|
2773
|
-
* disallow
|
|
2781
|
+
* disallow using 'shouldComponentUpdate' in class component extends 'React.PureComponent'
|
|
2774
2782
|
* @see https://eslint-react.xyz/docs/rules/no-redundant-should-component-update
|
|
2775
2783
|
*/
|
|
2776
2784
|
'react/no-redundant-should-component-update'?: Linter.RuleEntry<[]>
|
|
2777
2785
|
/**
|
|
2778
|
-
* disallow 'setState' in 'componentDidMount'
|
|
2786
|
+
* disallow using 'setState' in 'componentDidMount'
|
|
2779
2787
|
* @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-did-mount
|
|
2780
2788
|
*/
|
|
2781
2789
|
'react/no-set-state-in-component-did-mount'?: Linter.RuleEntry<[]>
|
|
2782
2790
|
/**
|
|
2783
|
-
* disallow 'setState' in 'componentDidUpdate'
|
|
2791
|
+
* disallow using 'setState' in 'componentDidUpdate'
|
|
2784
2792
|
* @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-did-update
|
|
2785
2793
|
*/
|
|
2786
2794
|
'react/no-set-state-in-component-did-update'?: Linter.RuleEntry<[]>
|
|
2787
2795
|
/**
|
|
2788
|
-
* disallow 'setState' in 'componentWillUpdate'
|
|
2796
|
+
* disallow using 'setState' in 'componentWillUpdate'
|
|
2789
2797
|
* @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-will-update
|
|
2790
2798
|
*/
|
|
2791
2799
|
'react/no-set-state-in-component-will-update'?: Linter.RuleEntry<[]>
|
|
@@ -2795,17 +2803,17 @@ interface RuleOptions {
|
|
|
2795
2803
|
*/
|
|
2796
2804
|
'react/no-string-refs'?: Linter.RuleEntry<[]>
|
|
2797
2805
|
/**
|
|
2798
|
-
* disallow
|
|
2806
|
+
* disallow using 'UNSAFE_componentWillMount'
|
|
2799
2807
|
* @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-mount
|
|
2800
2808
|
*/
|
|
2801
2809
|
'react/no-unsafe-component-will-mount'?: Linter.RuleEntry<[]>
|
|
2802
2810
|
/**
|
|
2803
|
-
* disallow
|
|
2811
|
+
* disallow using 'UNSAFE_componentWillReceiveProps'
|
|
2804
2812
|
* @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-receive-props
|
|
2805
2813
|
*/
|
|
2806
2814
|
'react/no-unsafe-component-will-receive-props'?: Linter.RuleEntry<[]>
|
|
2807
2815
|
/**
|
|
2808
|
-
* disallow
|
|
2816
|
+
* disallow using 'UNSAFE_componentWillUpdate'
|
|
2809
2817
|
* @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-update
|
|
2810
2818
|
*/
|
|
2811
2819
|
'react/no-unsafe-component-will-update'?: Linter.RuleEntry<[]>
|
|
@@ -2815,7 +2823,7 @@ interface RuleOptions {
|
|
|
2815
2823
|
*/
|
|
2816
2824
|
'react/no-unstable-context-value'?: Linter.RuleEntry<[]>
|
|
2817
2825
|
/**
|
|
2818
|
-
* disallow
|
|
2826
|
+
* disallow using unstable value as default param in function component
|
|
2819
2827
|
* @see https://eslint-react.xyz/docs/rules/no-unstable-default-props
|
|
2820
2828
|
*/
|
|
2821
2829
|
'react/no-unstable-default-props'?: Linter.RuleEntry<[]>
|
|
@@ -2825,7 +2833,7 @@ interface RuleOptions {
|
|
|
2825
2833
|
*/
|
|
2826
2834
|
'react/no-unused-class-component-members'?: Linter.RuleEntry<[]>
|
|
2827
2835
|
/**
|
|
2828
|
-
*
|
|
2836
|
+
* disallow unused state of class component
|
|
2829
2837
|
* @see https://eslint-react.xyz/docs/rules/no-unused-state
|
|
2830
2838
|
*/
|
|
2831
2839
|
'react/no-unused-state'?: Linter.RuleEntry<[]>
|
|
@@ -2840,17 +2848,17 @@ interface RuleOptions {
|
|
|
2840
2848
|
*/
|
|
2841
2849
|
'react/prefer-destructuring-assignment'?: Linter.RuleEntry<[]>
|
|
2842
2850
|
/**
|
|
2843
|
-
* enforce
|
|
2851
|
+
* enforce read-only props in components
|
|
2844
2852
|
* @see https://eslint-react.xyz/docs/rules/prefer-read-only-props
|
|
2845
2853
|
*/
|
|
2846
2854
|
'react/prefer-read-only-props'?: Linter.RuleEntry<[]>
|
|
2847
2855
|
/**
|
|
2848
|
-
* enforce boolean attributes
|
|
2856
|
+
* enforce using shorthand boolean attributes
|
|
2849
2857
|
* @see https://eslint-react.xyz/docs/rules/prefer-shorthand-boolean
|
|
2850
2858
|
*/
|
|
2851
2859
|
'react/prefer-shorthand-boolean'?: Linter.RuleEntry<[]>
|
|
2852
2860
|
/**
|
|
2853
|
-
* enforce using fragment syntax instead of Fragment component
|
|
2861
|
+
* enforce using fragment syntax instead of 'Fragment' component
|
|
2854
2862
|
* @see https://eslint-react.xyz/docs/rules/prefer-shorthand-fragment
|
|
2855
2863
|
*/
|
|
2856
2864
|
'react/prefer-shorthand-fragment'?: Linter.RuleEntry<[]>
|
|
@@ -4234,6 +4242,11 @@ interface RuleOptions {
|
|
|
4234
4242
|
* @see https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/expect-expect.md
|
|
4235
4243
|
*/
|
|
4236
4244
|
'test/expect-expect'?: Linter.RuleEntry<TestExpectExpect>
|
|
4245
|
+
/**
|
|
4246
|
+
* Enforce padding around afterAll blocks
|
|
4247
|
+
* @see https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/index.md
|
|
4248
|
+
*/
|
|
4249
|
+
'test/index'?: Linter.RuleEntry<[]>
|
|
4237
4250
|
/**
|
|
4238
4251
|
* enforce a maximum number of expect per test
|
|
4239
4252
|
* @see https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/max-expects.md
|
|
@@ -4910,7 +4923,7 @@ interface RuleOptions {
|
|
|
4910
4923
|
'ts/no-unused-expressions'?: Linter.RuleEntry<TsNoUnusedExpressions>
|
|
4911
4924
|
/**
|
|
4912
4925
|
* Disallow unused variables
|
|
4913
|
-
* @see https://
|
|
4926
|
+
* @see https://typescript-eslint.io/rules/no-unused-vars
|
|
4914
4927
|
*/
|
|
4915
4928
|
'ts/no-unused-vars'?: Linter.RuleEntry<TsNoUnusedVars>
|
|
4916
4929
|
/**
|
|
@@ -5838,7 +5851,7 @@ interface RuleOptions {
|
|
|
5838
5851
|
'unused-imports/no-unused-imports'?: Linter.RuleEntry<UnusedImportsNoUnusedImports>
|
|
5839
5852
|
/**
|
|
5840
5853
|
* Disallow unused variables
|
|
5841
|
-
* @see https://github.com/sweepline/eslint-plugin-unused-imports/blob/master/docs/rules/no-unused-
|
|
5854
|
+
* @see https://github.com/sweepline/eslint-plugin-unused-imports/blob/master/docs/rules/no-unused-vars.md
|
|
5842
5855
|
*/
|
|
5843
5856
|
'unused-imports/no-unused-vars'?: Linter.RuleEntry<UnusedImportsNoUnusedVars>
|
|
5844
5857
|
/**
|
|
@@ -7766,6 +7779,12 @@ type JsdocInformativeDocs = []|[{
|
|
|
7766
7779
|
excludedTags?: string[]
|
|
7767
7780
|
uselessWords?: string[]
|
|
7768
7781
|
}]
|
|
7782
|
+
// ----- jsdoc/lines-before-block -----
|
|
7783
|
+
type JsdocLinesBeforeBlock = []|[{
|
|
7784
|
+
excludedTags?: string[]
|
|
7785
|
+
ignoreSameLine?: boolean
|
|
7786
|
+
lines?: number
|
|
7787
|
+
}]
|
|
7769
7788
|
// ----- jsdoc/match-description -----
|
|
7770
7789
|
type JsdocMatchDescription = []|[{
|
|
7771
7790
|
contexts?: (string | {
|
|
@@ -9813,9 +9832,9 @@ type PerfectionistSortObjects = []|[{
|
|
|
9813
9832
|
|
|
9814
9833
|
styledComponents?: boolean
|
|
9815
9834
|
|
|
9816
|
-
|
|
9835
|
+
destructureOnly?: boolean
|
|
9817
9836
|
|
|
9818
|
-
|
|
9837
|
+
ignorePattern?: string[]
|
|
9819
9838
|
|
|
9820
9839
|
groups?: (string | string[])[]
|
|
9821
9840
|
|
|
@@ -11064,7 +11083,7 @@ type StylePaddedBlocks = []|[(("always" | "never") | {
|
|
|
11064
11083
|
}]
|
|
11065
11084
|
// ----- style/padding-line-between-statements -----
|
|
11066
11085
|
type _StylePaddingLineBetweenStatementsPaddingType = ("any" | "never" | "always")
|
|
11067
|
-
type _StylePaddingLineBetweenStatementsStatementType = (("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "interface" | "type" | "function-overload") | [("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "interface" | "type" | "function-overload"), ...(("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "interface" | "type" | "function-overload"))[]])
|
|
11086
|
+
type _StylePaddingLineBetweenStatementsStatementType = (("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "type" | "function-overload") | [("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "type" | "function-overload"), ...(("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "type" | "function-overload"))[]])
|
|
11068
11087
|
type StylePaddingLineBetweenStatements = {
|
|
11069
11088
|
blankLine: _StylePaddingLineBetweenStatementsPaddingType
|
|
11070
11089
|
prev: _StylePaddingLineBetweenStatementsStatementType
|
|
@@ -11473,7 +11492,8 @@ type TestNoRestrictedViMethods = []|[{
|
|
|
11473
11492
|
}]
|
|
11474
11493
|
// ----- test/no-standalone-expect -----
|
|
11475
11494
|
type TestNoStandaloneExpect = []|[{
|
|
11476
|
-
|
|
11495
|
+
additionaltestblockfunctions?: string[]
|
|
11496
|
+
[k: string]: unknown | undefined
|
|
11477
11497
|
}]
|
|
11478
11498
|
// ----- test/prefer-expect-assertions -----
|
|
11479
11499
|
type TestPreferExpectAssertions = []|[{
|
|
@@ -14644,6 +14664,7 @@ declare function getOverrides<K extends keyof OptionsConfig>(options: OptionsCon
|
|
|
14644
14664
|
'jsdoc/implements-on-classes'?: eslint.Linter.RuleEntry<undefined> | undefined;
|
|
14645
14665
|
'jsdoc/imports-as-dependencies'?: eslint.Linter.RuleEntry<[]> | undefined;
|
|
14646
14666
|
'jsdoc/informative-docs'?: eslint.Linter.RuleEntry<undefined> | undefined;
|
|
14667
|
+
'jsdoc/lines-before-block'?: eslint.Linter.RuleEntry<undefined> | undefined;
|
|
14647
14668
|
'jsdoc/match-description'?: eslint.Linter.RuleEntry<undefined> | undefined;
|
|
14648
14669
|
'jsdoc/match-name'?: eslint.Linter.RuleEntry<undefined> | undefined;
|
|
14649
14670
|
'jsdoc/multiline-blocks'?: eslint.Linter.RuleEntry<undefined> | undefined;
|
|
@@ -15032,6 +15053,7 @@ declare function getOverrides<K extends keyof OptionsConfig>(options: OptionsCon
|
|
|
15032
15053
|
'react/no-class-component'?: eslint.Linter.RuleEntry<[]> | undefined;
|
|
15033
15054
|
'react/no-clone-element'?: eslint.Linter.RuleEntry<[]> | undefined;
|
|
15034
15055
|
'react/no-comment-textnodes'?: eslint.Linter.RuleEntry<[]> | undefined;
|
|
15056
|
+
'react/no-complex-conditional-rendering'?: eslint.Linter.RuleEntry<[]> | undefined;
|
|
15035
15057
|
'react/no-complicated-conditional-rendering'?: eslint.Linter.RuleEntry<[]> | undefined;
|
|
15036
15058
|
'react/no-component-will-mount'?: eslint.Linter.RuleEntry<[]> | undefined;
|
|
15037
15059
|
'react/no-component-will-receive-props'?: eslint.Linter.RuleEntry<[]> | undefined;
|
|
@@ -15273,6 +15295,7 @@ declare function getOverrides<K extends keyof OptionsConfig>(options: OptionsCon
|
|
|
15273
15295
|
'test/consistent-test-filename'?: eslint.Linter.RuleEntry<undefined> | undefined;
|
|
15274
15296
|
'test/consistent-test-it'?: eslint.Linter.RuleEntry<undefined> | undefined;
|
|
15275
15297
|
'test/expect-expect'?: eslint.Linter.RuleEntry<undefined> | undefined;
|
|
15298
|
+
'test/index'?: eslint.Linter.RuleEntry<[]> | undefined;
|
|
15276
15299
|
'test/max-expects'?: eslint.Linter.RuleEntry<undefined> | undefined;
|
|
15277
15300
|
'test/max-nested-describe'?: eslint.Linter.RuleEntry<undefined> | undefined;
|
|
15278
15301
|
'test/no-alias-methods'?: eslint.Linter.RuleEntry<[]> | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -670,7 +670,7 @@ interface RuleOptions {
|
|
|
670
670
|
'jsdoc/check-tag-names'?: Linter.RuleEntry<JsdocCheckTagNames>
|
|
671
671
|
/**
|
|
672
672
|
* Checks that any `@template` names are actually used in the connected `@typedef` or type alias.
|
|
673
|
-
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/
|
|
673
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-template-names.md#repos-sticky-header
|
|
674
674
|
*/
|
|
675
675
|
'jsdoc/check-template-names'?: Linter.RuleEntry<[]>
|
|
676
676
|
/**
|
|
@@ -708,6 +708,11 @@ interface RuleOptions {
|
|
|
708
708
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/informative-docs.md#repos-sticky-header
|
|
709
709
|
*/
|
|
710
710
|
'jsdoc/informative-docs'?: Linter.RuleEntry<JsdocInformativeDocs>
|
|
711
|
+
/**
|
|
712
|
+
* Enforces minimum number of newlines before JSDoc comment blocks
|
|
713
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/lines-before-block.md#repos-sticky-header
|
|
714
|
+
*/
|
|
715
|
+
'jsdoc/lines-before-block'?: Linter.RuleEntry<JsdocLinesBeforeBlock>
|
|
711
716
|
/**
|
|
712
717
|
* Enforces a regular expression pattern on descriptions.
|
|
713
718
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/match-description.md#repos-sticky-header
|
|
@@ -2628,17 +2633,17 @@ interface RuleOptions {
|
|
|
2628
2633
|
'react-naming-convention/use-state'?: Linter.RuleEntry<[]>
|
|
2629
2634
|
'react-refresh/only-export-components'?: Linter.RuleEntry<ReactRefreshOnlyExportComponents>
|
|
2630
2635
|
/**
|
|
2631
|
-
*
|
|
2636
|
+
* avoid using shorthand boolean attribute
|
|
2632
2637
|
* @see https://eslint-react.xyz/docs/rules/avoid-shorthand-boolean
|
|
2633
2638
|
*/
|
|
2634
2639
|
'react/avoid-shorthand-boolean'?: Linter.RuleEntry<[]>
|
|
2635
2640
|
/**
|
|
2636
|
-
*
|
|
2641
|
+
* avoid using shorthand fragment syntax
|
|
2637
2642
|
* @see https://eslint-react.xyz/docs/rules/avoid-shorthand-fragment
|
|
2638
2643
|
*/
|
|
2639
2644
|
'react/avoid-shorthand-fragment'?: Linter.RuleEntry<[]>
|
|
2640
2645
|
/**
|
|
2641
|
-
* require
|
|
2646
|
+
* require a 'ref' parameter to be set when using 'forwardRef'
|
|
2642
2647
|
* @see https://eslint-react.xyz/docs/rules/ensure-forward-ref-using-ref
|
|
2643
2648
|
*/
|
|
2644
2649
|
'react/ensure-forward-ref-using-ref'?: Linter.RuleEntry<[]>
|
|
@@ -2648,47 +2653,47 @@ interface RuleOptions {
|
|
|
2648
2653
|
*/
|
|
2649
2654
|
'react/no-access-state-in-setstate'?: Linter.RuleEntry<[]>
|
|
2650
2655
|
/**
|
|
2651
|
-
* disallow using Array index as key
|
|
2656
|
+
* disallow using Array index as 'key'
|
|
2652
2657
|
* @see https://eslint-react.xyz/docs/rules/no-array-index-key
|
|
2653
2658
|
*/
|
|
2654
2659
|
'react/no-array-index-key'?: Linter.RuleEntry<[]>
|
|
2655
2660
|
/**
|
|
2656
|
-
* disallow 'Children.count'
|
|
2661
|
+
* disallow using 'Children.count'
|
|
2657
2662
|
* @see https://eslint-react.xyz/docs/rules/no-children-count
|
|
2658
2663
|
*/
|
|
2659
2664
|
'react/no-children-count'?: Linter.RuleEntry<[]>
|
|
2660
2665
|
/**
|
|
2661
|
-
* disallow 'Children.forEach'
|
|
2666
|
+
* disallow using 'Children.forEach'
|
|
2662
2667
|
* @see https://eslint-react.xyz/docs/rules/no-children-for-each
|
|
2663
2668
|
*/
|
|
2664
2669
|
'react/no-children-for-each'?: Linter.RuleEntry<[]>
|
|
2665
2670
|
/**
|
|
2666
|
-
* disallow 'Children.map'
|
|
2671
|
+
* disallow using 'Children.map'
|
|
2667
2672
|
* @see https://eslint-react.xyz/docs/rules/no-children-map
|
|
2668
2673
|
*/
|
|
2669
2674
|
'react/no-children-map'?: Linter.RuleEntry<[]>
|
|
2670
2675
|
/**
|
|
2671
|
-
* disallow 'Children.only'
|
|
2676
|
+
* disallow using 'Children.only'
|
|
2672
2677
|
* @see https://eslint-react.xyz/docs/rules/no-children-only
|
|
2673
2678
|
*/
|
|
2674
2679
|
'react/no-children-only'?: Linter.RuleEntry<[]>
|
|
2675
2680
|
/**
|
|
2676
|
-
* disallow passing
|
|
2681
|
+
* disallow passing 'children' as props
|
|
2677
2682
|
* @see https://eslint-react.xyz/docs/rules/no-children-prop
|
|
2678
2683
|
*/
|
|
2679
2684
|
'react/no-children-prop'?: Linter.RuleEntry<[]>
|
|
2680
2685
|
/**
|
|
2681
|
-
* disallow 'Children.toArray'
|
|
2686
|
+
* disallow using 'Children.toArray'
|
|
2682
2687
|
* @see https://eslint-react.xyz/docs/rules/no-children-to-array
|
|
2683
2688
|
*/
|
|
2684
2689
|
'react/no-children-to-array'?: Linter.RuleEntry<[]>
|
|
2685
2690
|
/**
|
|
2686
|
-
* disallow class
|
|
2691
|
+
* disallow using class components
|
|
2687
2692
|
* @see https://eslint-react.xyz/docs/rules/no-class-component
|
|
2688
2693
|
*/
|
|
2689
2694
|
'react/no-class-component'?: Linter.RuleEntry<[]>
|
|
2690
2695
|
/**
|
|
2691
|
-
* disallow 'cloneElement'
|
|
2696
|
+
* disallow using 'cloneElement'
|
|
2692
2697
|
* @see https://eslint-react.xyz/docs/rules/no-clone-element
|
|
2693
2698
|
*/
|
|
2694
2699
|
'react/no-clone-element'?: Linter.RuleEntry<[]>
|
|
@@ -2698,33 +2703,37 @@ interface RuleOptions {
|
|
|
2698
2703
|
*/
|
|
2699
2704
|
'react/no-comment-textnodes'?: Linter.RuleEntry<[]>
|
|
2700
2705
|
/**
|
|
2701
|
-
* disallow
|
|
2702
|
-
* @see https://eslint-react.xyz/docs/rules/no-
|
|
2703
|
-
|
|
2706
|
+
* disallow complex conditional rendering
|
|
2707
|
+
* @see https://eslint-react.xyz/docs/rules/no-complex-conditional-rendering
|
|
2708
|
+
*/
|
|
2709
|
+
'react/no-complex-conditional-rendering'?: Linter.RuleEntry<[]>
|
|
2710
|
+
/**
|
|
2711
|
+
* disallow complex conditional rendering
|
|
2712
|
+
* @see https://eslint-react.xyz/docs/rules/no-complex-conditional-rendering
|
|
2704
2713
|
*/
|
|
2705
2714
|
'react/no-complicated-conditional-rendering'?: Linter.RuleEntry<[]>
|
|
2706
2715
|
/**
|
|
2707
|
-
* disallow
|
|
2716
|
+
* disallow using 'componentWillMount'
|
|
2708
2717
|
* @see https://eslint-react.xyz/docs/rules/no-component-will-mount
|
|
2709
2718
|
*/
|
|
2710
2719
|
'react/no-component-will-mount'?: Linter.RuleEntry<[]>
|
|
2711
2720
|
/**
|
|
2712
|
-
* disallow
|
|
2721
|
+
* disallow using 'componentWillReceiveProps'
|
|
2713
2722
|
* @see https://eslint-react.xyz/docs/rules/no-component-will-receive-props
|
|
2714
2723
|
*/
|
|
2715
2724
|
'react/no-component-will-receive-props'?: Linter.RuleEntry<[]>
|
|
2716
2725
|
/**
|
|
2717
|
-
* disallow
|
|
2726
|
+
* disallow using 'componentWillReceiveProps'
|
|
2718
2727
|
* @see https://eslint-react.xyz/docs/rules/no-component-will-update
|
|
2719
2728
|
*/
|
|
2720
2729
|
'react/no-component-will-update'?: Linter.RuleEntry<[]>
|
|
2721
2730
|
/**
|
|
2722
|
-
* disallow 'createRef' in function components
|
|
2731
|
+
* disallow using 'createRef' in function components
|
|
2723
2732
|
* @see https://eslint-react.xyz/docs/rules/no-create-ref
|
|
2724
2733
|
*/
|
|
2725
2734
|
'react/no-create-ref'?: Linter.RuleEntry<[]>
|
|
2726
2735
|
/**
|
|
2727
|
-
* disallow
|
|
2736
|
+
* disallow using 'defaultProps' property in components
|
|
2728
2737
|
* @see https://eslint-react.xyz/docs/rules/no-default-props
|
|
2729
2738
|
*/
|
|
2730
2739
|
'react/no-default-props'?: Linter.RuleEntry<[]>
|
|
@@ -2734,14 +2743,13 @@ interface RuleOptions {
|
|
|
2734
2743
|
*/
|
|
2735
2744
|
'react/no-direct-mutation-state'?: Linter.RuleEntry<[]>
|
|
2736
2745
|
/**
|
|
2737
|
-
* disallow duplicate keys
|
|
2746
|
+
* disallow duplicate keys when rendering list
|
|
2738
2747
|
* @see https://eslint-react.xyz/docs/rules/no-duplicate-key
|
|
2739
2748
|
*/
|
|
2740
2749
|
'react/no-duplicate-key'?: Linter.RuleEntry<[]>
|
|
2741
2750
|
/**
|
|
2742
|
-
* disallow
|
|
2751
|
+
* disallow implicit 'key' props
|
|
2743
2752
|
* @see https://eslint-react.xyz/docs/rules/no-implicit-key
|
|
2744
|
-
* @deprecated
|
|
2745
2753
|
*/
|
|
2746
2754
|
'react/no-implicit-key'?: Linter.RuleEntry<[]>
|
|
2747
2755
|
/**
|
|
@@ -2750,42 +2758,42 @@ interface RuleOptions {
|
|
|
2750
2758
|
*/
|
|
2751
2759
|
'react/no-leaked-conditional-rendering'?: Linter.RuleEntry<[]>
|
|
2752
2760
|
/**
|
|
2753
|
-
* require 'displayName' for memo and forwardRef components
|
|
2761
|
+
* require 'displayName' for 'memo' and 'forwardRef' components
|
|
2754
2762
|
* @see https://eslint-react.xyz/docs/rules/no-missing-component-display-name
|
|
2755
2763
|
*/
|
|
2756
2764
|
'react/no-missing-component-display-name'?: Linter.RuleEntry<[]>
|
|
2757
2765
|
/**
|
|
2758
|
-
* require 'key'
|
|
2766
|
+
* require 'key' when rendering list
|
|
2759
2767
|
* @see https://eslint-react.xyz/docs/rules/no-missing-key
|
|
2760
2768
|
*/
|
|
2761
2769
|
'react/no-missing-key'?: Linter.RuleEntry<[]>
|
|
2762
2770
|
/**
|
|
2763
|
-
* disallow
|
|
2771
|
+
* disallow using unstable nested components
|
|
2764
2772
|
* @see https://eslint-react.xyz/docs/rules/no-nested-components
|
|
2765
2773
|
*/
|
|
2766
2774
|
'react/no-nested-components'?: Linter.RuleEntry<[]>
|
|
2767
2775
|
/**
|
|
2768
|
-
* disallow
|
|
2776
|
+
* disallow using 'propTypes' property in components
|
|
2769
2777
|
* @see https://eslint-react.xyz/docs/rules/no-prop-types
|
|
2770
2778
|
*/
|
|
2771
2779
|
'react/no-prop-types'?: Linter.RuleEntry<[]>
|
|
2772
2780
|
/**
|
|
2773
|
-
* disallow
|
|
2781
|
+
* disallow using 'shouldComponentUpdate' in class component extends 'React.PureComponent'
|
|
2774
2782
|
* @see https://eslint-react.xyz/docs/rules/no-redundant-should-component-update
|
|
2775
2783
|
*/
|
|
2776
2784
|
'react/no-redundant-should-component-update'?: Linter.RuleEntry<[]>
|
|
2777
2785
|
/**
|
|
2778
|
-
* disallow 'setState' in 'componentDidMount'
|
|
2786
|
+
* disallow using 'setState' in 'componentDidMount'
|
|
2779
2787
|
* @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-did-mount
|
|
2780
2788
|
*/
|
|
2781
2789
|
'react/no-set-state-in-component-did-mount'?: Linter.RuleEntry<[]>
|
|
2782
2790
|
/**
|
|
2783
|
-
* disallow 'setState' in 'componentDidUpdate'
|
|
2791
|
+
* disallow using 'setState' in 'componentDidUpdate'
|
|
2784
2792
|
* @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-did-update
|
|
2785
2793
|
*/
|
|
2786
2794
|
'react/no-set-state-in-component-did-update'?: Linter.RuleEntry<[]>
|
|
2787
2795
|
/**
|
|
2788
|
-
* disallow 'setState' in 'componentWillUpdate'
|
|
2796
|
+
* disallow using 'setState' in 'componentWillUpdate'
|
|
2789
2797
|
* @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-will-update
|
|
2790
2798
|
*/
|
|
2791
2799
|
'react/no-set-state-in-component-will-update'?: Linter.RuleEntry<[]>
|
|
@@ -2795,17 +2803,17 @@ interface RuleOptions {
|
|
|
2795
2803
|
*/
|
|
2796
2804
|
'react/no-string-refs'?: Linter.RuleEntry<[]>
|
|
2797
2805
|
/**
|
|
2798
|
-
* disallow
|
|
2806
|
+
* disallow using 'UNSAFE_componentWillMount'
|
|
2799
2807
|
* @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-mount
|
|
2800
2808
|
*/
|
|
2801
2809
|
'react/no-unsafe-component-will-mount'?: Linter.RuleEntry<[]>
|
|
2802
2810
|
/**
|
|
2803
|
-
* disallow
|
|
2811
|
+
* disallow using 'UNSAFE_componentWillReceiveProps'
|
|
2804
2812
|
* @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-receive-props
|
|
2805
2813
|
*/
|
|
2806
2814
|
'react/no-unsafe-component-will-receive-props'?: Linter.RuleEntry<[]>
|
|
2807
2815
|
/**
|
|
2808
|
-
* disallow
|
|
2816
|
+
* disallow using 'UNSAFE_componentWillUpdate'
|
|
2809
2817
|
* @see https://eslint-react.xyz/docs/rules/no-unsafe-component-will-update
|
|
2810
2818
|
*/
|
|
2811
2819
|
'react/no-unsafe-component-will-update'?: Linter.RuleEntry<[]>
|
|
@@ -2815,7 +2823,7 @@ interface RuleOptions {
|
|
|
2815
2823
|
*/
|
|
2816
2824
|
'react/no-unstable-context-value'?: Linter.RuleEntry<[]>
|
|
2817
2825
|
/**
|
|
2818
|
-
* disallow
|
|
2826
|
+
* disallow using unstable value as default param in function component
|
|
2819
2827
|
* @see https://eslint-react.xyz/docs/rules/no-unstable-default-props
|
|
2820
2828
|
*/
|
|
2821
2829
|
'react/no-unstable-default-props'?: Linter.RuleEntry<[]>
|
|
@@ -2825,7 +2833,7 @@ interface RuleOptions {
|
|
|
2825
2833
|
*/
|
|
2826
2834
|
'react/no-unused-class-component-members'?: Linter.RuleEntry<[]>
|
|
2827
2835
|
/**
|
|
2828
|
-
*
|
|
2836
|
+
* disallow unused state of class component
|
|
2829
2837
|
* @see https://eslint-react.xyz/docs/rules/no-unused-state
|
|
2830
2838
|
*/
|
|
2831
2839
|
'react/no-unused-state'?: Linter.RuleEntry<[]>
|
|
@@ -2840,17 +2848,17 @@ interface RuleOptions {
|
|
|
2840
2848
|
*/
|
|
2841
2849
|
'react/prefer-destructuring-assignment'?: Linter.RuleEntry<[]>
|
|
2842
2850
|
/**
|
|
2843
|
-
* enforce
|
|
2851
|
+
* enforce read-only props in components
|
|
2844
2852
|
* @see https://eslint-react.xyz/docs/rules/prefer-read-only-props
|
|
2845
2853
|
*/
|
|
2846
2854
|
'react/prefer-read-only-props'?: Linter.RuleEntry<[]>
|
|
2847
2855
|
/**
|
|
2848
|
-
* enforce boolean attributes
|
|
2856
|
+
* enforce using shorthand boolean attributes
|
|
2849
2857
|
* @see https://eslint-react.xyz/docs/rules/prefer-shorthand-boolean
|
|
2850
2858
|
*/
|
|
2851
2859
|
'react/prefer-shorthand-boolean'?: Linter.RuleEntry<[]>
|
|
2852
2860
|
/**
|
|
2853
|
-
* enforce using fragment syntax instead of Fragment component
|
|
2861
|
+
* enforce using fragment syntax instead of 'Fragment' component
|
|
2854
2862
|
* @see https://eslint-react.xyz/docs/rules/prefer-shorthand-fragment
|
|
2855
2863
|
*/
|
|
2856
2864
|
'react/prefer-shorthand-fragment'?: Linter.RuleEntry<[]>
|
|
@@ -4234,6 +4242,11 @@ interface RuleOptions {
|
|
|
4234
4242
|
* @see https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/expect-expect.md
|
|
4235
4243
|
*/
|
|
4236
4244
|
'test/expect-expect'?: Linter.RuleEntry<TestExpectExpect>
|
|
4245
|
+
/**
|
|
4246
|
+
* Enforce padding around afterAll blocks
|
|
4247
|
+
* @see https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/index.md
|
|
4248
|
+
*/
|
|
4249
|
+
'test/index'?: Linter.RuleEntry<[]>
|
|
4237
4250
|
/**
|
|
4238
4251
|
* enforce a maximum number of expect per test
|
|
4239
4252
|
* @see https://github.com/veritem/eslint-plugin-vitest/blob/main/docs/rules/max-expects.md
|
|
@@ -4910,7 +4923,7 @@ interface RuleOptions {
|
|
|
4910
4923
|
'ts/no-unused-expressions'?: Linter.RuleEntry<TsNoUnusedExpressions>
|
|
4911
4924
|
/**
|
|
4912
4925
|
* Disallow unused variables
|
|
4913
|
-
* @see https://
|
|
4926
|
+
* @see https://typescript-eslint.io/rules/no-unused-vars
|
|
4914
4927
|
*/
|
|
4915
4928
|
'ts/no-unused-vars'?: Linter.RuleEntry<TsNoUnusedVars>
|
|
4916
4929
|
/**
|
|
@@ -5838,7 +5851,7 @@ interface RuleOptions {
|
|
|
5838
5851
|
'unused-imports/no-unused-imports'?: Linter.RuleEntry<UnusedImportsNoUnusedImports>
|
|
5839
5852
|
/**
|
|
5840
5853
|
* Disallow unused variables
|
|
5841
|
-
* @see https://github.com/sweepline/eslint-plugin-unused-imports/blob/master/docs/rules/no-unused-
|
|
5854
|
+
* @see https://github.com/sweepline/eslint-plugin-unused-imports/blob/master/docs/rules/no-unused-vars.md
|
|
5842
5855
|
*/
|
|
5843
5856
|
'unused-imports/no-unused-vars'?: Linter.RuleEntry<UnusedImportsNoUnusedVars>
|
|
5844
5857
|
/**
|
|
@@ -7766,6 +7779,12 @@ type JsdocInformativeDocs = []|[{
|
|
|
7766
7779
|
excludedTags?: string[]
|
|
7767
7780
|
uselessWords?: string[]
|
|
7768
7781
|
}]
|
|
7782
|
+
// ----- jsdoc/lines-before-block -----
|
|
7783
|
+
type JsdocLinesBeforeBlock = []|[{
|
|
7784
|
+
excludedTags?: string[]
|
|
7785
|
+
ignoreSameLine?: boolean
|
|
7786
|
+
lines?: number
|
|
7787
|
+
}]
|
|
7769
7788
|
// ----- jsdoc/match-description -----
|
|
7770
7789
|
type JsdocMatchDescription = []|[{
|
|
7771
7790
|
contexts?: (string | {
|
|
@@ -9813,9 +9832,9 @@ type PerfectionistSortObjects = []|[{
|
|
|
9813
9832
|
|
|
9814
9833
|
styledComponents?: boolean
|
|
9815
9834
|
|
|
9816
|
-
|
|
9835
|
+
destructureOnly?: boolean
|
|
9817
9836
|
|
|
9818
|
-
|
|
9837
|
+
ignorePattern?: string[]
|
|
9819
9838
|
|
|
9820
9839
|
groups?: (string | string[])[]
|
|
9821
9840
|
|
|
@@ -11064,7 +11083,7 @@ type StylePaddedBlocks = []|[(("always" | "never") | {
|
|
|
11064
11083
|
}]
|
|
11065
11084
|
// ----- style/padding-line-between-statements -----
|
|
11066
11085
|
type _StylePaddingLineBetweenStatementsPaddingType = ("any" | "never" | "always")
|
|
11067
|
-
type _StylePaddingLineBetweenStatementsStatementType = (("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "interface" | "type" | "function-overload") | [("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "interface" | "type" | "function-overload"), ...(("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "interface" | "type" | "function-overload"))[]])
|
|
11086
|
+
type _StylePaddingLineBetweenStatementsStatementType = (("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "type" | "function-overload") | [("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "type" | "function-overload"), ...(("*" | "block-like" | "exports" | "require" | "directive" | "expression" | "iife" | "multiline-block-like" | "multiline-expression" | "multiline-const" | "multiline-let" | "multiline-var" | "singleline-const" | "singleline-let" | "singleline-var" | "block" | "empty" | "function" | "break" | "case" | "class" | "const" | "continue" | "debugger" | "default" | "do" | "export" | "for" | "if" | "import" | "let" | "return" | "switch" | "throw" | "try" | "var" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "type" | "function-overload"))[]])
|
|
11068
11087
|
type StylePaddingLineBetweenStatements = {
|
|
11069
11088
|
blankLine: _StylePaddingLineBetweenStatementsPaddingType
|
|
11070
11089
|
prev: _StylePaddingLineBetweenStatementsStatementType
|
|
@@ -11473,7 +11492,8 @@ type TestNoRestrictedViMethods = []|[{
|
|
|
11473
11492
|
}]
|
|
11474
11493
|
// ----- test/no-standalone-expect -----
|
|
11475
11494
|
type TestNoStandaloneExpect = []|[{
|
|
11476
|
-
|
|
11495
|
+
additionaltestblockfunctions?: string[]
|
|
11496
|
+
[k: string]: unknown | undefined
|
|
11477
11497
|
}]
|
|
11478
11498
|
// ----- test/prefer-expect-assertions -----
|
|
11479
11499
|
type TestPreferExpectAssertions = []|[{
|
|
@@ -14644,6 +14664,7 @@ declare function getOverrides<K extends keyof OptionsConfig>(options: OptionsCon
|
|
|
14644
14664
|
'jsdoc/implements-on-classes'?: eslint.Linter.RuleEntry<undefined> | undefined;
|
|
14645
14665
|
'jsdoc/imports-as-dependencies'?: eslint.Linter.RuleEntry<[]> | undefined;
|
|
14646
14666
|
'jsdoc/informative-docs'?: eslint.Linter.RuleEntry<undefined> | undefined;
|
|
14667
|
+
'jsdoc/lines-before-block'?: eslint.Linter.RuleEntry<undefined> | undefined;
|
|
14647
14668
|
'jsdoc/match-description'?: eslint.Linter.RuleEntry<undefined> | undefined;
|
|
14648
14669
|
'jsdoc/match-name'?: eslint.Linter.RuleEntry<undefined> | undefined;
|
|
14649
14670
|
'jsdoc/multiline-blocks'?: eslint.Linter.RuleEntry<undefined> | undefined;
|
|
@@ -15032,6 +15053,7 @@ declare function getOverrides<K extends keyof OptionsConfig>(options: OptionsCon
|
|
|
15032
15053
|
'react/no-class-component'?: eslint.Linter.RuleEntry<[]> | undefined;
|
|
15033
15054
|
'react/no-clone-element'?: eslint.Linter.RuleEntry<[]> | undefined;
|
|
15034
15055
|
'react/no-comment-textnodes'?: eslint.Linter.RuleEntry<[]> | undefined;
|
|
15056
|
+
'react/no-complex-conditional-rendering'?: eslint.Linter.RuleEntry<[]> | undefined;
|
|
15035
15057
|
'react/no-complicated-conditional-rendering'?: eslint.Linter.RuleEntry<[]> | undefined;
|
|
15036
15058
|
'react/no-component-will-mount'?: eslint.Linter.RuleEntry<[]> | undefined;
|
|
15037
15059
|
'react/no-component-will-receive-props'?: eslint.Linter.RuleEntry<[]> | undefined;
|
|
@@ -15273,6 +15295,7 @@ declare function getOverrides<K extends keyof OptionsConfig>(options: OptionsCon
|
|
|
15273
15295
|
'test/consistent-test-filename'?: eslint.Linter.RuleEntry<undefined> | undefined;
|
|
15274
15296
|
'test/consistent-test-it'?: eslint.Linter.RuleEntry<undefined> | undefined;
|
|
15275
15297
|
'test/expect-expect'?: eslint.Linter.RuleEntry<undefined> | undefined;
|
|
15298
|
+
'test/index'?: eslint.Linter.RuleEntry<[]> | undefined;
|
|
15276
15299
|
'test/max-expects'?: eslint.Linter.RuleEntry<undefined> | undefined;
|
|
15277
15300
|
'test/max-nested-describe'?: eslint.Linter.RuleEntry<undefined> | undefined;
|
|
15278
15301
|
'test/no-alias-methods'?: eslint.Linter.RuleEntry<[]> | undefined;
|
package/dist/index.js
CHANGED
|
@@ -611,6 +611,7 @@ function node() {
|
|
|
611
611
|
"node/no-exports-assign": "error",
|
|
612
612
|
"node/no-new-require": "error",
|
|
613
613
|
"node/no-path-concat": "error",
|
|
614
|
+
"node/no-unsupported-features/es-builtins": "error",
|
|
614
615
|
"node/prefer-global/buffer": ["error", "never"],
|
|
615
616
|
"node/prefer-global/process": ["error", "never"],
|
|
616
617
|
"node/process-exit-as-throw": "error"
|
|
@@ -1012,7 +1013,8 @@ async function typescript(options = {}) {
|
|
|
1012
1013
|
"ts/no-extraneous-class": "off",
|
|
1013
1014
|
"ts/no-import-type-side-effects": "error",
|
|
1014
1015
|
"ts/no-invalid-void-type": "off",
|
|
1015
|
-
|
|
1016
|
+
// this is deprecated
|
|
1017
|
+
"ts/no-loss-of-precision": "off",
|
|
1016
1018
|
"ts/no-non-null-assertion": "off",
|
|
1017
1019
|
"ts/no-redeclare": "error",
|
|
1018
1020
|
"ts/no-require-imports": "error",
|
|
@@ -1252,20 +1254,20 @@ async function vue(options = {}) {
|
|
|
1252
1254
|
"vue/dot-notation": ["error", { allowKeywords: true }],
|
|
1253
1255
|
"vue/eqeqeq": ["error", "smart"],
|
|
1254
1256
|
"vue/html-indent": ["error", indent],
|
|
1255
|
-
// 'vue/html-self-closing': [
|
|
1256
|
-
// 'error',
|
|
1257
|
-
// {
|
|
1258
|
-
// html: {
|
|
1259
|
-
// component: 'always',
|
|
1260
|
-
// normal: 'always',
|
|
1261
|
-
// void: 'any',
|
|
1262
|
-
// },
|
|
1263
|
-
// math: 'always',
|
|
1264
|
-
// svg: 'always',
|
|
1265
|
-
// },
|
|
1266
1257
|
"vue/html-quotes": ["error", "double"],
|
|
1267
|
-
|
|
1268
|
-
|
|
1258
|
+
"vue/html-self-closing": [
|
|
1259
|
+
"error",
|
|
1260
|
+
{
|
|
1261
|
+
html: {
|
|
1262
|
+
component: "always",
|
|
1263
|
+
normal: "always",
|
|
1264
|
+
void: "any"
|
|
1265
|
+
},
|
|
1266
|
+
math: "always",
|
|
1267
|
+
svg: "always"
|
|
1268
|
+
}
|
|
1269
|
+
],
|
|
1270
|
+
"vue/max-attributes-per-line": "off",
|
|
1269
1271
|
"vue/multi-word-component-names": "off",
|
|
1270
1272
|
// 'vue/next-tick-style': ['warn', 'promise'],
|
|
1271
1273
|
"vue/no-constant-condition": "warn",
|
|
@@ -1317,6 +1319,7 @@ async function vue(options = {}) {
|
|
|
1317
1319
|
}
|
|
1318
1320
|
],
|
|
1319
1321
|
"vue/require-prop-types": "off",
|
|
1322
|
+
// 'vue/singleline-html-element-content-newline': 'off',
|
|
1320
1323
|
"vue/space-infix-ops": "error",
|
|
1321
1324
|
"vue/space-unary-ops": ["error", { nonwords: false, words: true }],
|
|
1322
1325
|
"vue/valid-define-options": "warn",
|
|
@@ -1375,7 +1378,7 @@ var _pluginTest;
|
|
|
1375
1378
|
async function test(options = {}) {
|
|
1376
1379
|
const { files = GLOB_TESTS, isInEditor: isInEditor2 = false, overrides = {} } = options;
|
|
1377
1380
|
const [pluginVitest, pluginNoOnlyTests] = await Promise.all([
|
|
1378
|
-
interopDefault(import("eslint-plugin
|
|
1381
|
+
interopDefault(import("@vitest/eslint-plugin")),
|
|
1379
1382
|
// @ts-expect-error missing types
|
|
1380
1383
|
interopDefault(import("eslint-plugin-no-only-tests"))
|
|
1381
1384
|
]);
|
|
@@ -1454,6 +1457,39 @@ function perfectionist() {
|
|
|
1454
1457
|
"perfectionist/sort-named-imports": [
|
|
1455
1458
|
"warn",
|
|
1456
1459
|
{ groupKind: "values-first" }
|
|
1460
|
+
],
|
|
1461
|
+
"perfectionist/sort-vue-attributes": [
|
|
1462
|
+
"error",
|
|
1463
|
+
{
|
|
1464
|
+
// Based on: https://vuejs.org/style-guide/rules-recommended.html#element-attribute-order
|
|
1465
|
+
customGroups: {
|
|
1466
|
+
CONDITIONALS: "v-*(else-if|if|else|show|cloak)",
|
|
1467
|
+
CONTENT: "v-*(html|text)",
|
|
1468
|
+
DEFINITION: "*(is|:is|v-is)",
|
|
1469
|
+
// OTHER_DIRECTIVES e.g. 'v-custom-directive'
|
|
1470
|
+
EVENTS: "*(v-on|@*)",
|
|
1471
|
+
GLOBAL: "*(:id|id)",
|
|
1472
|
+
LIST_RENDERING: "v-for",
|
|
1473
|
+
RENDER_MODIFIERS: "v-*(pre|once)",
|
|
1474
|
+
SLOT: "*(v-slot|slot)",
|
|
1475
|
+
TWO_WAY_BINDING: "*(v-model|v-model:*)",
|
|
1476
|
+
UNIQUE: "*(ref|key|:ref|:key)"
|
|
1477
|
+
},
|
|
1478
|
+
groups: [
|
|
1479
|
+
"DEFINITION",
|
|
1480
|
+
"LIST_RENDERING",
|
|
1481
|
+
"CONDITIONALS",
|
|
1482
|
+
"RENDER_MODIFIERS",
|
|
1483
|
+
"GLOBAL",
|
|
1484
|
+
"UNIQUE",
|
|
1485
|
+
"SLOT",
|
|
1486
|
+
"TWO_WAY_BINDING",
|
|
1487
|
+
"unknown",
|
|
1488
|
+
"EVENTS",
|
|
1489
|
+
"CONTENT"
|
|
1490
|
+
],
|
|
1491
|
+
type: "natural"
|
|
1492
|
+
}
|
|
1457
1493
|
]
|
|
1458
1494
|
}
|
|
1459
1495
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coderwyd/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.6.
|
|
4
|
+
"version": "2.6.3",
|
|
5
5
|
"description": "Donny's ESLint config",
|
|
6
6
|
"author": "Donny Wang <donny526@outlook.com> (https://github.com/coderwyd/)",
|
|
7
7
|
"license": "MIT",
|
|
@@ -69,10 +69,11 @@
|
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
71
|
"@antfu/install-pkg": "^0.3.3",
|
|
72
|
-
"@stylistic/eslint-plugin": "^2.6.
|
|
72
|
+
"@stylistic/eslint-plugin": "^2.6.2",
|
|
73
73
|
"@toml-tools/parser": "^1.0.0",
|
|
74
|
-
"@typescript-eslint/eslint-plugin": "^8.0.
|
|
75
|
-
"@typescript-eslint/parser": "^8.0.
|
|
74
|
+
"@typescript-eslint/eslint-plugin": "^8.0.1",
|
|
75
|
+
"@typescript-eslint/parser": "^8.0.1",
|
|
76
|
+
"@vitest/eslint-plugin": "^1.0.0",
|
|
76
77
|
"eslint-config-flat-gitignore": "^0.1.8",
|
|
77
78
|
"eslint-merge-processors": "^0.1.0",
|
|
78
79
|
"eslint-plugin-antfu": "^2.3.4",
|
|
@@ -80,19 +81,18 @@
|
|
|
80
81
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
81
82
|
"eslint-plugin-format": "^0.1.2",
|
|
82
83
|
"eslint-plugin-import-x": "^3.1.0",
|
|
83
|
-
"eslint-plugin-jsdoc": "^
|
|
84
|
+
"eslint-plugin-jsdoc": "^50.0.1",
|
|
84
85
|
"eslint-plugin-jsonc": "^2.16.0",
|
|
85
|
-
"eslint-plugin-n": "^17.10.
|
|
86
|
+
"eslint-plugin-n": "^17.10.2",
|
|
86
87
|
"eslint-plugin-no-only-tests": "^3.1.0",
|
|
87
|
-
"eslint-plugin-perfectionist": "^3.
|
|
88
|
+
"eslint-plugin-perfectionist": "^3.1.3",
|
|
88
89
|
"eslint-plugin-regexp": "^2.6.0",
|
|
89
90
|
"eslint-plugin-unicorn": "^55.0.0",
|
|
90
|
-
"eslint-plugin-unused-imports": "^4.
|
|
91
|
-
"eslint-plugin-vitest": "^0.5.4",
|
|
91
|
+
"eslint-plugin-unused-imports": "^4.1.3",
|
|
92
92
|
"eslint-plugin-vue": "^9.27.0",
|
|
93
93
|
"eslint-processor-vue-blocks": "^0.1.2",
|
|
94
|
-
"eslint-typegen": "^0.
|
|
95
|
-
"globals": "^15.
|
|
94
|
+
"eslint-typegen": "^0.3.0",
|
|
95
|
+
"globals": "^15.9.0",
|
|
96
96
|
"jsonc-eslint-parser": "^2.4.0",
|
|
97
97
|
"local-pkg": "^0.5.0",
|
|
98
98
|
"parse-gitignore": "^2.0.0",
|
|
@@ -103,18 +103,18 @@
|
|
|
103
103
|
"yargs": "^17.7.2"
|
|
104
104
|
},
|
|
105
105
|
"devDependencies": {
|
|
106
|
-
"@antfu/ni": "^0.22.
|
|
107
|
-
"@eslint-react/eslint-plugin": "^1.
|
|
106
|
+
"@antfu/ni": "^0.22.1",
|
|
107
|
+
"@eslint-react/eslint-plugin": "^1.9.1",
|
|
108
108
|
"@eslint/config-inspector": "^0.5.2",
|
|
109
|
-
"@stylistic/eslint-plugin-migrate": "^2.
|
|
109
|
+
"@stylistic/eslint-plugin-migrate": "^2.6.2",
|
|
110
110
|
"@types/eslint": "^9.6.0",
|
|
111
111
|
"@types/fs-extra": "^11.0.4",
|
|
112
|
-
"@types/node": "^20.14.
|
|
112
|
+
"@types/node": "^20.14.15",
|
|
113
113
|
"@types/prompts": "^2.4.9",
|
|
114
|
-
"@types/yargs": "^17.0.
|
|
115
|
-
"@unocss/eslint-plugin": "^0.61.
|
|
116
|
-
"bumpp": "^9.4.
|
|
117
|
-
"eslint": "^9.
|
|
114
|
+
"@types/yargs": "^17.0.33",
|
|
115
|
+
"@unocss/eslint-plugin": "^0.61.9",
|
|
116
|
+
"bumpp": "^9.4.2",
|
|
117
|
+
"eslint": "^9.9.0",
|
|
118
118
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
119
119
|
"eslint-plugin-react-refresh": "^0.4.9",
|
|
120
120
|
"eslint-plugin-svelte": "2.43.0",
|
|
@@ -122,13 +122,13 @@
|
|
|
122
122
|
"execa": "^9.3.0",
|
|
123
123
|
"fast-glob": "^3.3.2",
|
|
124
124
|
"fs-extra": "^11.2.0",
|
|
125
|
-
"lint-staged": "^15.2.
|
|
125
|
+
"lint-staged": "^15.2.8",
|
|
126
126
|
"rimraf": "^6.0.1",
|
|
127
127
|
"simple-git-hooks": "^2.11.1",
|
|
128
128
|
"svelte": "^4.2.18",
|
|
129
129
|
"svelte-eslint-parser": "^0.41.0",
|
|
130
|
-
"tsup": "^8.2.
|
|
131
|
-
"tsx": "^4.
|
|
130
|
+
"tsup": "^8.2.4",
|
|
131
|
+
"tsx": "^4.17.0",
|
|
132
132
|
"typescript": "^5.5.4"
|
|
133
133
|
},
|
|
134
134
|
"simple-git-hooks": {
|
|
@@ -138,12 +138,12 @@
|
|
|
138
138
|
"*": "eslint --fix"
|
|
139
139
|
},
|
|
140
140
|
"scripts": {
|
|
141
|
-
"build": "nr typegen && tsup",
|
|
142
|
-
"dev": "
|
|
141
|
+
"build": "nr build:typegen && tsup",
|
|
142
|
+
"dev": "npx @eslint/config-inspector",
|
|
143
143
|
"lint": "eslint .",
|
|
144
144
|
"lint:fix": "eslint . --fix",
|
|
145
145
|
"build:inspector": "pnpm build && npx @eslint/config-inspector build",
|
|
146
|
-
"typegen": "tsx scripts/typegen.ts",
|
|
146
|
+
"build:typegen": "tsx scripts/typegen.ts",
|
|
147
147
|
"release": "bumpp && pnpm publish",
|
|
148
148
|
"typecheck": "tsc --noEmit"
|
|
149
149
|
}
|