@kitschpatrol/eslint-config 5.7.1 → 5.7.2

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/bin/cli.js CHANGED
@@ -5138,7 +5138,7 @@ var Yargs = YargsFactory(esm_default);
5138
5138
  var yargs_default = Yargs;
5139
5139
 
5140
5140
  // ../../package.json
5141
- var version = "5.7.1";
5141
+ var version = "5.7.2";
5142
5142
 
5143
5143
  // ../../src/execa-utilities.ts
5144
5144
  function isErrorExecaError(error) {
package/dist/index.d.ts CHANGED
@@ -1181,6 +1181,11 @@ interface RuleOptions {
1181
1181
  * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/empty-tags.md#repos-sticky-header
1182
1182
  */
1183
1183
  'jsdoc/empty-tags'?: Linter.RuleEntry<JsdocEmptyTags>
1184
+ /**
1185
+ * Reports use of JSDoc tags in non-tag positions (in the default "typescript" mode).
1186
+ * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/escape-inline-tags.md#repos-sticky-header
1187
+ */
1188
+ 'jsdoc/escape-inline-tags'?: Linter.RuleEntry<JsdocEscapeInlineTags>
1184
1189
  /**
1185
1190
  * Prohibits use of `@implements` on non-constructor functions (to enforce the tag only being used on classes/constructors).
1186
1191
  * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/implements-on-classes.md#repos-sticky-header
@@ -3555,7 +3560,7 @@ interface RuleOptions {
3555
3560
  */
3556
3561
  'react-dom/no-missing-button-type'?: Linter.RuleEntry<[]>
3557
3562
  /**
3558
- * Enforces explicit `sandbox` attribute for `iframe` elements.
3563
+ * Enforces explicit `sandbox` prop for `iframe` elements.
3559
3564
  * @see https://eslint-react.xyz/docs/rules/dom-no-missing-iframe-sandbox
3560
3565
  */
3561
3566
  'react-dom/no-missing-iframe-sandbox'?: Linter.RuleEntry<[]>
@@ -3609,6 +3614,11 @@ interface RuleOptions {
3609
3614
  * @see https://eslint-react.xyz/docs/rules/dom-no-void-elements-with-children
3610
3615
  */
3611
3616
  'react-dom/no-void-elements-with-children'?: Linter.RuleEntry<[]>
3617
+ /**
3618
+ * Enforces React Dom is imported via a namespace import.
3619
+ * @see https://eslint-react.xyz/docs/rules/dom-prefer-namespace-import
3620
+ */
3621
+ 'react-dom/prefer-namespace-import'?: Linter.RuleEntry<[]>
3612
3622
  /**
3613
3623
  * Disallow direct calls to the `set` function of `useState` in `useEffect`.
3614
3624
  * @see https://eslint-react.xyz/docs/rules/hooks-extra-no-direct-set-state-in-use-effect
@@ -3660,7 +3670,7 @@ interface RuleOptions {
3660
3670
  */
3661
3671
  'react-web-api/no-leaked-timeout'?: Linter.RuleEntry<[]>
3662
3672
  /**
3663
- * Enforces that the 'key' attribute is placed before the spread attribute in JSX elements.
3673
+ * Enforces that the 'key' prop is placed before the spread prop in JSX elements.
3664
3674
  * @see https://eslint-react.xyz/docs/rules/jsx-key-before-spread
3665
3675
  */
3666
3676
  'react/jsx-key-before-spread'?: Linter.RuleEntry<[]>
@@ -3865,7 +3875,7 @@ interface RuleOptions {
3865
3875
  */
3866
3876
  'react/no-set-state-in-component-did-update'?: Linter.RuleEntry<[]>
3867
3877
  /**
3868
- * Disallows calling `this.setState` in `componentWillUpdate` outside of functions, such as callbacks.
3878
+ * Disallow calling `this.setState` in `componentWillUpdate` outside of functions, such as callbacks.
3869
3879
  * @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-will-update
3870
3880
  */
3871
3881
  'react/no-set-state-in-component-will-update'?: Linter.RuleEntry<[]>
@@ -3925,7 +3935,7 @@ interface RuleOptions {
3925
3935
  */
3926
3936
  'react/no-unused-class-component-members'?: Linter.RuleEntry<[]>
3927
3937
  /**
3928
- * Warns about unused component prop declarations.
3938
+ * Warns component props that are defined but never used.
3929
3939
  * @see https://eslint-react.xyz/docs/rules/no-unused-props
3930
3940
  */
3931
3941
  'react/no-unused-props'?: Linter.RuleEntry<[]>
@@ -5087,6 +5097,11 @@ interface RuleOptions {
5087
5097
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/padding-around-test-blocks.md
5088
5098
  */
5089
5099
  'test/padding-around-test-blocks'?: Linter.RuleEntry<[]>
5100
+ /**
5101
+ * Prefer `toHaveBeenCalledExactlyOnceWith` over `toHaveBeenCalledOnce` and `toHaveBeenCalledWith`
5102
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-called-exactly-once-with.md
5103
+ */
5104
+ 'test/prefer-called-exactly-once-with'?: Linter.RuleEntry<[]>
5090
5105
  /**
5091
5106
  * enforce using `toBeCalledOnce()` or `toHaveBeenCalledOnce()`
5092
5107
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-called-once.md
@@ -5147,6 +5162,11 @@ interface RuleOptions {
5147
5162
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-hooks-on-top.md
5148
5163
  */
5149
5164
  'test/prefer-hooks-on-top'?: Linter.RuleEntry<[]>
5165
+ /**
5166
+ * prefer dynamic import in mock
5167
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-import-in-mock.md
5168
+ */
5169
+ 'test/prefer-import-in-mock'?: Linter.RuleEntry<[]>
5150
5170
  /**
5151
5171
  * enforce importing Vitest globals
5152
5172
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-importing-vitest-globals.md
@@ -5805,7 +5825,7 @@ interface RuleOptions {
5805
5825
  * Disallow member access on a value with type `any`
5806
5826
  * @see https://typescript-eslint.io/rules/no-unsafe-member-access
5807
5827
  */
5808
- 'ts/no-unsafe-member-access'?: Linter.RuleEntry<[]>
5828
+ 'ts/no-unsafe-member-access'?: Linter.RuleEntry<TsNoUnsafeMemberAccess>
5809
5829
  /**
5810
5830
  * Disallow returning a value with type `any` from a function
5811
5831
  * @see https://typescript-eslint.io/rules/no-unsafe-return
@@ -8661,6 +8681,18 @@ type JsdocEmptyTags =
8661
8681
  tags?: string[]
8662
8682
  },
8663
8683
  ]
8684
+ // ----- jsdoc/escape-inline-tags -----
8685
+ type JsdocEscapeInlineTags =
8686
+ | []
8687
+ | [
8688
+ {
8689
+ allowedInlineTags?: string[]
8690
+
8691
+ enableFixer?: boolean
8692
+
8693
+ fixType?: 'backticks' | 'backslash'
8694
+ },
8695
+ ]
8664
8696
  // ----- jsdoc/implements-on-classes -----
8665
8697
  type JsdocImplementsOnClasses =
8666
8698
  | []
@@ -9211,6 +9243,8 @@ type JsdocRequireReturnsCheck =
9211
9243
 
9212
9244
  exemptGenerators?: boolean
9213
9245
 
9246
+ noNativeTypes?: boolean
9247
+
9214
9248
  reportMissingReturnForUndefinedTypes?: boolean
9215
9249
  },
9216
9250
  ]
@@ -11611,6 +11645,8 @@ type NoRestrictedImports =
11611
11645
  message?: string
11612
11646
  importNames?: string[]
11613
11647
  allowImportNames?: string[]
11648
+
11649
+ allowTypeImports?: boolean
11614
11650
  }
11615
11651
  )[]
11616
11652
  | []
@@ -11623,6 +11659,8 @@ type NoRestrictedImports =
11623
11659
  message?: string
11624
11660
  importNames?: string[]
11625
11661
  allowImportNames?: string[]
11662
+
11663
+ allowTypeImports?: boolean
11626
11664
  }
11627
11665
  )[]
11628
11666
  patterns?:
@@ -20560,24 +20598,28 @@ type TsBanTsComment =
20560
20598
  | [
20561
20599
  {
20562
20600
  minimumDescriptionLength?: number
20601
+
20563
20602
  'ts-check'?:
20564
20603
  | boolean
20565
20604
  | 'allow-with-description'
20566
20605
  | {
20567
20606
  descriptionFormat?: string
20568
20607
  }
20608
+
20569
20609
  'ts-expect-error'?:
20570
20610
  | boolean
20571
20611
  | 'allow-with-description'
20572
20612
  | {
20573
20613
  descriptionFormat?: string
20574
20614
  }
20615
+
20575
20616
  'ts-ignore'?:
20576
20617
  | boolean
20577
20618
  | 'allow-with-description'
20578
20619
  | {
20579
20620
  descriptionFormat?: string
20580
20621
  }
20622
+
20581
20623
  'ts-nocheck'?:
20582
20624
  | boolean
20583
20625
  | 'allow-with-description'
@@ -20700,9 +20742,13 @@ type TsExplicitMemberAccessibility =
20700
20742
 
20701
20743
  overrides?: {
20702
20744
  accessors?: 'explicit' | 'no-public' | 'off'
20745
+
20703
20746
  constructors?: 'explicit' | 'no-public' | 'off'
20747
+
20704
20748
  methods?: 'explicit' | 'no-public' | 'off'
20749
+
20705
20750
  parameterProperties?: 'explicit' | 'no-public' | 'off'
20751
+
20706
20752
  properties?: 'explicit' | 'no-public' | 'off'
20707
20753
  }
20708
20754
  },
@@ -21391,6 +21437,7 @@ type TsMemberOrdering =
21391
21437
  | 'natural'
21392
21438
  | 'natural-case-insensitive'
21393
21439
  }
21440
+
21394
21441
  classExpressions?:
21395
21442
  | 'never'
21396
21443
  | (
@@ -22028,6 +22075,7 @@ type TsMemberOrdering =
22028
22075
  | 'natural'
22029
22076
  | 'natural-case-insensitive'
22030
22077
  }
22078
+
22031
22079
  default?:
22032
22080
  | 'never'
22033
22081
  | (
@@ -22665,6 +22713,7 @@ type TsMemberOrdering =
22665
22713
  | 'natural'
22666
22714
  | 'natural-case-insensitive'
22667
22715
  }
22716
+
22668
22717
  interfaces?:
22669
22718
  | 'never'
22670
22719
  | (
@@ -22714,6 +22763,7 @@ type TsMemberOrdering =
22714
22763
  | 'natural'
22715
22764
  | 'natural-case-insensitive'
22716
22765
  }
22766
+
22717
22767
  typeLiterals?:
22718
22768
  | 'never'
22719
22769
  | (
@@ -23744,6 +23794,14 @@ type TsNoUnnecessaryTypeAssertion =
23744
23794
  typesToIgnore?: string[]
23745
23795
  },
23746
23796
  ]
23797
+ // ----- ts/no-unsafe-member-access -----
23798
+ type TsNoUnsafeMemberAccess =
23799
+ | []
23800
+ | [
23801
+ {
23802
+ allowOptionalChaining?: boolean
23803
+ },
23804
+ ]
23747
23805
  // ----- ts/no-unused-expressions -----
23748
23806
  type TsNoUnusedExpressions =
23749
23807
  | []
@@ -23776,6 +23834,8 @@ type TsNoUnusedVars =
23776
23834
 
23777
23835
  ignoreRestSiblings?: boolean
23778
23836
 
23837
+ ignoreUsingDeclarations?: boolean
23838
+
23779
23839
  reportUsedIgnorePattern?: boolean
23780
23840
 
23781
23841
  vars?: 'all' | 'local'
package/dist/index.js CHANGED
@@ -548,6 +548,7 @@ var jsdocCommentsRecommendedTypescriptFlavorRules = {
548
548
  "jsdoc/check-values": "warn",
549
549
  "jsdoc/convert-to-jsdoc-comments": "off",
550
550
  "jsdoc/empty-tags": "warn",
551
+ "jsdoc/escape-inline-tags": "warn",
551
552
  "jsdoc/implements-on-classes": "warn",
552
553
  "jsdoc/imports-as-dependencies": "off",
553
554
  "jsdoc/informative-docs": "off",
@@ -621,6 +622,7 @@ var jsdocCommentsRecommendedTypescriptRules = {
621
622
  "jsdoc/check-values": "warn",
622
623
  "jsdoc/convert-to-jsdoc-comments": "off",
623
624
  "jsdoc/empty-tags": "warn",
625
+ "jsdoc/escape-inline-tags": "warn",
624
626
  "jsdoc/implements-on-classes": "warn",
625
627
  "jsdoc/imports-as-dependencies": "off",
626
628
  "jsdoc/informative-docs": "off",
@@ -1369,6 +1371,10 @@ var reactRecommendedTypeCheckedRules = {
1369
1371
  // Begin expansion '@eslint-react/eslint-plugin' 'recommended-type-checked'
1370
1372
  "react/jsx-no-comment-textnodes": "warn",
1371
1373
  "react/jsx-no-duplicate-props": "off",
1374
+ "react/jsx-no-iife": "off",
1375
+ "react/jsx-no-undef": "off",
1376
+ "react/jsx-shorthand-boolean": "off",
1377
+ "react/jsx-shorthand-fragment": "off",
1372
1378
  "react/jsx-uses-react": "off",
1373
1379
  "react/jsx-uses-vars": "off",
1374
1380
  "react/no-access-state-in-setstate": "error",
@@ -1377,7 +1383,9 @@ var reactRecommendedTypeCheckedRules = {
1377
1383
  "react/no-children-for-each": "warn",
1378
1384
  "react/no-children-map": "warn",
1379
1385
  "react/no-children-only": "warn",
1386
+ "react/no-children-prop": "off",
1380
1387
  "react/no-children-to-array": "warn",
1388
+ "react/no-class-component": "off",
1381
1389
  "react/no-clone-element": "warn",
1382
1390
  "react/no-component-will-mount": "error",
1383
1391
  "react/no-component-will-receive-props": "error",
@@ -1387,9 +1395,14 @@ var reactRecommendedTypeCheckedRules = {
1387
1395
  "react/no-default-props": "error",
1388
1396
  "react/no-direct-mutation-state": "error",
1389
1397
  "react/no-duplicate-key": "error",
1398
+ "react/no-forbidden-props": "off",
1390
1399
  "react/no-forward-ref": "warn",
1391
1400
  "react/no-implicit-key": "warn",
1401
+ "react/no-leaked-conditional-rendering": "warn",
1402
+ "react/no-missing-component-display-name": "off",
1403
+ "react/no-missing-context-display-name": "off",
1392
1404
  "react/no-missing-key": "error",
1405
+ "react/no-misused-capture-owner-stack": "off",
1393
1406
  "react/no-nested-component-definitions": "error",
1394
1407
  "react/no-nested-lazy-component-declarations": "error",
1395
1408
  "react/no-prop-types": "error",
@@ -1398,6 +1411,9 @@ var reactRecommendedTypeCheckedRules = {
1398
1411
  "react/no-set-state-in-component-did-update": "warn",
1399
1412
  "react/no-set-state-in-component-will-update": "warn",
1400
1413
  "react/no-string-refs": "error",
1414
+ "react/no-unnecessary-key": "off",
1415
+ "react/no-unnecessary-use-callback": "off",
1416
+ "react/no-unnecessary-use-memo": "off",
1401
1417
  "react/no-unnecessary-use-prefix": "warn",
1402
1418
  "react/no-unsafe-component-will-mount": "warn",
1403
1419
  "react/no-unsafe-component-will-receive-props": "warn",
@@ -1405,9 +1421,14 @@ var reactRecommendedTypeCheckedRules = {
1405
1421
  "react/no-unstable-context-value": "warn",
1406
1422
  "react/no-unstable-default-props": "warn",
1407
1423
  "react/no-unused-class-component-members": "warn",
1424
+ "react/no-unused-props": "warn",
1408
1425
  "react/no-unused-state": "warn",
1409
1426
  "react/no-use-context": "warn",
1410
1427
  "react/no-useless-forward-ref": "warn",
1428
+ "react/no-useless-fragment": "off",
1429
+ "react/prefer-destructuring-assignment": "off",
1430
+ "react/prefer-namespace-import": "off",
1431
+ "react/prefer-read-only-props": "off",
1411
1432
  "react/prefer-use-state-lazy-initialization": "warn",
1412
1433
  "react-dom/no-dangerously-set-innerhtml": "warn",
1413
1434
  "react-dom/no-dangerously-set-innerhtml-with-children": "error",
@@ -1428,11 +1449,11 @@ var reactRecommendedTypeCheckedRules = {
1428
1449
  "react-web-api/no-leaked-interval": "warn",
1429
1450
  "react-web-api/no-leaked-resize-observer": "warn",
1430
1451
  "react-web-api/no-leaked-timeout": "warn",
1452
+ "react-hooks-extra/no-direct-set-state-in-use-effect": "warn",
1431
1453
  "react-naming-convention/context-name": "warn",
1454
+ "react-naming-convention/use-state": "warn",
1432
1455
  "react-dom/no-string-style-prop": "off",
1433
- "react-dom/no-unknown-property": "off",
1434
- "react/no-leaked-conditional-rendering": "warn",
1435
- "react/no-unused-props": "warn"
1456
+ "react-dom/no-unknown-property": "off"
1436
1457
  // End expansion
1437
1458
  };
1438
1459
  var reactDisableTypeCheckedRules = {
@@ -1570,7 +1591,8 @@ var testRecommendedRules = {
1570
1591
  "test/valid-expect": "error",
1571
1592
  "test/valid-describe-callback": "error",
1572
1593
  "test/require-local-test-context-for-concurrent-snapshots": "error",
1573
- "test/no-import-node-test": "error"
1594
+ "test/no-import-node-test": "error",
1595
+ "test/prefer-called-exactly-once-with": "error"
1574
1596
  // End expansion
1575
1597
  };
1576
1598
 
@@ -2613,6 +2635,15 @@ var sharedScriptConfig = {
2613
2635
  // Matches everything
2614
2636
  selector: "default"
2615
2637
  },
2638
+ {
2639
+ custom: {
2640
+ match: true,
2641
+ regex: "^_+$"
2642
+ },
2643
+ format: null,
2644
+ modifiers: ["unused"],
2645
+ selector: "parameter"
2646
+ },
2616
2647
  {
2617
2648
  format: null,
2618
2649
  modifiers: ["requiresQuotes"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kitschpatrol/eslint-config",
3
- "version": "5.7.1",
3
+ "version": "5.7.2",
4
4
  "description": "ESLint configuration for @kitschpatrol/shared-config.",
5
5
  "keywords": [
6
6
  "shared-config",
@@ -43,15 +43,15 @@
43
43
  ],
44
44
  "dependencies": {
45
45
  "@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
46
- "@eslint-react/eslint-plugin": "^2.0.1",
46
+ "@eslint-react/eslint-plugin": "^2.0.6",
47
47
  "@html-eslint/eslint-plugin": "^0.47.0",
48
48
  "@html-eslint/parser": "^0.47.0",
49
49
  "@pinojs/json-colorizer": "^4.0.0",
50
- "@typescript-eslint/eslint-plugin": "^8.44.1",
51
- "@typescript-eslint/parser": "^8.44.1",
52
- "@vitest/eslint-plugin": "^1.3.13",
50
+ "@typescript-eslint/eslint-plugin": "^8.46.0",
51
+ "@typescript-eslint/parser": "^8.46.0",
52
+ "@vitest/eslint-plugin": "^1.3.16",
53
53
  "astro-eslint-parser": "^1.2.2",
54
- "eslint": "^9.36.0",
54
+ "eslint": "^9.37.0",
55
55
  "eslint-config-flat-gitignore": "^2.1.0",
56
56
  "eslint-flat-config-utils": "^2.1.4",
57
57
  "eslint-import-resolver-typescript": "^4.4.4",
@@ -60,19 +60,19 @@
60
60
  "eslint-plugin-depend": "^1.3.1",
61
61
  "eslint-plugin-html": "^8.1.3",
62
62
  "eslint-plugin-import-x": "^4.16.1",
63
- "eslint-plugin-jsdoc": "^60.5.0",
64
- "eslint-plugin-jsonc": "^2.20.1",
63
+ "eslint-plugin-jsdoc": "^60.8.3",
64
+ "eslint-plugin-jsonc": "^2.21.0",
65
65
  "eslint-plugin-jsx-a11y": "^6.10.2",
66
66
  "eslint-plugin-mdx": "^3.6.2",
67
67
  "eslint-plugin-n": "^17.23.1",
68
68
  "eslint-plugin-no-only-tests": "^3.3.0",
69
69
  "eslint-plugin-package-json": "^0.56.3",
70
- "eslint-plugin-perfectionist": "^4.15.0",
70
+ "eslint-plugin-perfectionist": "^4.15.1",
71
71
  "eslint-plugin-regexp": "^2.10.0",
72
72
  "eslint-plugin-svelte": "^3.12.4",
73
73
  "eslint-plugin-toml": "^0.12.0",
74
74
  "eslint-plugin-unicorn": "^61.0.2",
75
- "eslint-plugin-yml": "^1.18.0",
75
+ "eslint-plugin-yml": "^1.19.0",
76
76
  "execa": "^9.6.0",
77
77
  "find-workspaces": "^0.3.1",
78
78
  "fs-extra": "^11.3.2",
@@ -87,13 +87,13 @@
87
87
  },
88
88
  "devDependencies": {
89
89
  "@types/eslint-config-prettier": "^6.11.3",
90
- "@types/eslint-plugin-jsx-a11y": "^6.10.0",
91
- "dot-prop": "^10.0.0",
90
+ "@types/eslint-plugin-jsx-a11y": "^6.10.1",
91
+ "dot-prop": "^10.1.0",
92
92
  "eslint-config-prettier": "^10.1.8",
93
93
  "eslint-config-xo-typescript": "^9.0.0",
94
94
  "eslint-typegen": "^2.3.0",
95
95
  "globby": "^15.0.0",
96
- "svelte": "^5.39.6",
96
+ "svelte": "^5.39.9",
97
97
  "tsup": "^8.5.0"
98
98
  },
99
99
  "engines": {