@kitschpatrol/eslint-config 5.7.1 → 5.7.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/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.3";
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
@@ -1446,6 +1451,26 @@ interface RuleOptions {
1446
1451
  * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/text-escaping.md#repos-sticky-header
1447
1452
  */
1448
1453
  'jsdoc/text-escaping'?: Linter.RuleEntry<JsdocTextEscaping>
1454
+ /**
1455
+ * Prefers either function properties or method signatures
1456
+ * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/ts-method-signature-style.md#repos-sticky-header
1457
+ */
1458
+ 'jsdoc/ts-method-signature-style'?: Linter.RuleEntry<JsdocTsMethodSignatureStyle>
1459
+ /**
1460
+ * Warns against use of the empty object type
1461
+ * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/ts-no-empty-object-type.md#repos-sticky-header
1462
+ */
1463
+ 'jsdoc/ts-no-empty-object-type'?: Linter.RuleEntry<[]>
1464
+ /**
1465
+ * Catches unnecessary template expressions such as string expressions within a template literal.
1466
+ * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/ts-no-unnecessary-template-expression.md#repos-sticky-header
1467
+ */
1468
+ 'jsdoc/ts-no-unnecessary-template-expression'?: Linter.RuleEntry<JsdocTsNoUnnecessaryTemplateExpression>
1469
+ /**
1470
+ * Prefers function types over call signatures when there are no other properties.
1471
+ * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/ts-prefer-function-type.md#repos-sticky-header
1472
+ */
1473
+ 'jsdoc/ts-prefer-function-type'?: Linter.RuleEntry<JsdocTsPreferFunctionType>
1449
1474
  /**
1450
1475
  * Formats JSDoc type values.
1451
1476
  * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/type-formatting.md#repos-sticky-header
@@ -3555,7 +3580,7 @@ interface RuleOptions {
3555
3580
  */
3556
3581
  'react-dom/no-missing-button-type'?: Linter.RuleEntry<[]>
3557
3582
  /**
3558
- * Enforces explicit `sandbox` attribute for `iframe` elements.
3583
+ * Enforces explicit `sandbox` prop for `iframe` elements.
3559
3584
  * @see https://eslint-react.xyz/docs/rules/dom-no-missing-iframe-sandbox
3560
3585
  */
3561
3586
  'react-dom/no-missing-iframe-sandbox'?: Linter.RuleEntry<[]>
@@ -3609,6 +3634,11 @@ interface RuleOptions {
3609
3634
  * @see https://eslint-react.xyz/docs/rules/dom-no-void-elements-with-children
3610
3635
  */
3611
3636
  'react-dom/no-void-elements-with-children'?: Linter.RuleEntry<[]>
3637
+ /**
3638
+ * Enforces React Dom is imported via a namespace import.
3639
+ * @see https://eslint-react.xyz/docs/rules/dom-prefer-namespace-import
3640
+ */
3641
+ 'react-dom/prefer-namespace-import'?: Linter.RuleEntry<[]>
3612
3642
  /**
3613
3643
  * Disallow direct calls to the `set` function of `useState` in `useEffect`.
3614
3644
  * @see https://eslint-react.xyz/docs/rules/hooks-extra-no-direct-set-state-in-use-effect
@@ -3660,7 +3690,7 @@ interface RuleOptions {
3660
3690
  */
3661
3691
  'react-web-api/no-leaked-timeout'?: Linter.RuleEntry<[]>
3662
3692
  /**
3663
- * Enforces that the 'key' attribute is placed before the spread attribute in JSX elements.
3693
+ * Enforces that the 'key' prop is placed before the spread prop in JSX elements.
3664
3694
  * @see https://eslint-react.xyz/docs/rules/jsx-key-before-spread
3665
3695
  */
3666
3696
  'react/jsx-key-before-spread'?: Linter.RuleEntry<[]>
@@ -3865,7 +3895,7 @@ interface RuleOptions {
3865
3895
  */
3866
3896
  'react/no-set-state-in-component-did-update'?: Linter.RuleEntry<[]>
3867
3897
  /**
3868
- * Disallows calling `this.setState` in `componentWillUpdate` outside of functions, such as callbacks.
3898
+ * Disallow calling `this.setState` in `componentWillUpdate` outside of functions, such as callbacks.
3869
3899
  * @see https://eslint-react.xyz/docs/rules/no-set-state-in-component-will-update
3870
3900
  */
3871
3901
  'react/no-set-state-in-component-will-update'?: Linter.RuleEntry<[]>
@@ -3925,7 +3955,7 @@ interface RuleOptions {
3925
3955
  */
3926
3956
  'react/no-unused-class-component-members'?: Linter.RuleEntry<[]>
3927
3957
  /**
3928
- * Warns about unused component prop declarations.
3958
+ * Warns component props that are defined but never used.
3929
3959
  * @see https://eslint-react.xyz/docs/rules/no-unused-props
3930
3960
  */
3931
3961
  'react/no-unused-props'?: Linter.RuleEntry<[]>
@@ -4902,7 +4932,7 @@ interface RuleOptions {
4902
4932
  */
4903
4933
  'template-tag-spacing'?: Linter.RuleEntry<TemplateTagSpacing>
4904
4934
  /**
4905
- * require .spec test file pattern
4935
+ * require test file pattern
4906
4936
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/consistent-test-filename.md
4907
4937
  */
4908
4938
  'test/consistent-test-filename'?: Linter.RuleEntry<TestConsistentTestFilename>
@@ -5087,6 +5117,11 @@ interface RuleOptions {
5087
5117
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/padding-around-test-blocks.md
5088
5118
  */
5089
5119
  'test/padding-around-test-blocks'?: Linter.RuleEntry<[]>
5120
+ /**
5121
+ * Prefer `toHaveBeenCalledExactlyOnceWith` over `toHaveBeenCalledOnce` and `toHaveBeenCalledWith`
5122
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-called-exactly-once-with.md
5123
+ */
5124
+ 'test/prefer-called-exactly-once-with'?: Linter.RuleEntry<[]>
5090
5125
  /**
5091
5126
  * enforce using `toBeCalledOnce()` or `toHaveBeenCalledOnce()`
5092
5127
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-called-once.md
@@ -5147,6 +5182,11 @@ interface RuleOptions {
5147
5182
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-hooks-on-top.md
5148
5183
  */
5149
5184
  'test/prefer-hooks-on-top'?: Linter.RuleEntry<[]>
5185
+ /**
5186
+ * prefer dynamic import in mock
5187
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-import-in-mock.md
5188
+ */
5189
+ 'test/prefer-import-in-mock'?: Linter.RuleEntry<[]>
5150
5190
  /**
5151
5191
  * enforce importing Vitest globals
5152
5192
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-importing-vitest-globals.md
@@ -5805,7 +5845,7 @@ interface RuleOptions {
5805
5845
  * Disallow member access on a value with type `any`
5806
5846
  * @see https://typescript-eslint.io/rules/no-unsafe-member-access
5807
5847
  */
5808
- 'ts/no-unsafe-member-access'?: Linter.RuleEntry<[]>
5848
+ 'ts/no-unsafe-member-access'?: Linter.RuleEntry<TsNoUnsafeMemberAccess>
5809
5849
  /**
5810
5850
  * Disallow returning a value with type `any` from a function
5811
5851
  * @see https://typescript-eslint.io/rules/no-unsafe-return
@@ -8661,6 +8701,18 @@ type JsdocEmptyTags =
8661
8701
  tags?: string[]
8662
8702
  },
8663
8703
  ]
8704
+ // ----- jsdoc/escape-inline-tags -----
8705
+ type JsdocEscapeInlineTags =
8706
+ | []
8707
+ | [
8708
+ {
8709
+ allowedInlineTags?: string[]
8710
+
8711
+ enableFixer?: boolean
8712
+
8713
+ fixType?: 'backticks' | 'backslash'
8714
+ },
8715
+ ]
8664
8716
  // ----- jsdoc/implements-on-classes -----
8665
8717
  type JsdocImplementsOnClasses =
8666
8718
  | []
@@ -9211,6 +9263,8 @@ type JsdocRequireReturnsCheck =
9211
9263
 
9212
9264
  exemptGenerators?: boolean
9213
9265
 
9266
+ noNativeTypes?: boolean
9267
+
9214
9268
  reportMissingReturnForUndefinedTypes?: boolean
9215
9269
  },
9216
9270
  ]
@@ -9380,6 +9434,32 @@ type JsdocTextEscaping =
9380
9434
  escapeMarkdown?: boolean
9381
9435
  },
9382
9436
  ]
9437
+ // ----- jsdoc/ts-method-signature-style -----
9438
+ type JsdocTsMethodSignatureStyle =
9439
+ | []
9440
+ | ['method' | 'property']
9441
+ | [
9442
+ 'method' | 'property',
9443
+ {
9444
+ enableFixer?: boolean
9445
+ },
9446
+ ]
9447
+ // ----- jsdoc/ts-no-unnecessary-template-expression -----
9448
+ type JsdocTsNoUnnecessaryTemplateExpression =
9449
+ | []
9450
+ | [
9451
+ {
9452
+ enableFixer?: boolean
9453
+ },
9454
+ ]
9455
+ // ----- jsdoc/ts-prefer-function-type -----
9456
+ type JsdocTsPreferFunctionType =
9457
+ | []
9458
+ | [
9459
+ {
9460
+ enableFixer?: boolean
9461
+ },
9462
+ ]
9383
9463
  // ----- jsdoc/type-formatting -----
9384
9464
  type JsdocTypeFormatting =
9385
9465
  | []
@@ -9387,10 +9467,36 @@ type JsdocTypeFormatting =
9387
9467
  {
9388
9468
  arrayBrackets?: 'angle' | 'square'
9389
9469
 
9470
+ arrowFunctionPostReturnMarkerSpacing?: string
9471
+
9472
+ arrowFunctionPreReturnMarkerSpacing?: string
9473
+
9390
9474
  enableFixer?: boolean
9391
9475
 
9476
+ functionOrClassParameterSpacing?: string
9477
+
9478
+ functionOrClassPostGenericSpacing?: string
9479
+
9480
+ functionOrClassPostReturnMarkerSpacing?: string
9481
+
9482
+ functionOrClassPreReturnMarkerSpacing?: string
9483
+
9484
+ functionOrClassTypeParameterSpacing?: string
9485
+
9486
+ genericAndTupleElementSpacing?: string
9487
+
9392
9488
  genericDot?: boolean
9393
9489
 
9490
+ keyValuePostColonSpacing?: string
9491
+
9492
+ keyValuePostKeySpacing?: string
9493
+
9494
+ keyValuePostOptionalSpacing?: string
9495
+
9496
+ keyValuePostVariadicSpacing?: string
9497
+
9498
+ methodQuotes?: 'double' | 'single'
9499
+
9394
9500
  objectFieldIndent?: string
9395
9501
 
9396
9502
  objectFieldQuote?: 'double' | 'single' | null
@@ -9406,6 +9512,12 @@ type JsdocTypeFormatting =
9406
9512
 
9407
9513
  objectFieldSeparatorTrailingPunctuation?: boolean
9408
9514
 
9515
+ parameterDefaultValueSpacing?: string
9516
+
9517
+ postMethodNameSpacing?: string
9518
+
9519
+ postNewSpacing?: string
9520
+
9409
9521
  separatorForSingleObjectField?: boolean
9410
9522
 
9411
9523
  stringQuotes?: 'double' | 'single'
@@ -11611,6 +11723,8 @@ type NoRestrictedImports =
11611
11723
  message?: string
11612
11724
  importNames?: string[]
11613
11725
  allowImportNames?: string[]
11726
+
11727
+ allowTypeImports?: boolean
11614
11728
  }
11615
11729
  )[]
11616
11730
  | []
@@ -11623,6 +11737,8 @@ type NoRestrictedImports =
11623
11737
  message?: string
11624
11738
  importNames?: string[]
11625
11739
  allowImportNames?: string[]
11740
+
11741
+ allowTypeImports?: boolean
11626
11742
  }
11627
11743
  )[]
11628
11744
  patterns?:
@@ -19373,7 +19489,6 @@ type ReactNoForbiddenProps =
19373
19489
  prop: string
19374
19490
  }
19375
19491
  )[]
19376
- [k: string]: unknown | undefined
19377
19492
  },
19378
19493
  ]
19379
19494
  // ----- react/no-useless-fragment -----
@@ -20560,24 +20675,28 @@ type TsBanTsComment =
20560
20675
  | [
20561
20676
  {
20562
20677
  minimumDescriptionLength?: number
20678
+
20563
20679
  'ts-check'?:
20564
20680
  | boolean
20565
20681
  | 'allow-with-description'
20566
20682
  | {
20567
20683
  descriptionFormat?: string
20568
20684
  }
20685
+
20569
20686
  'ts-expect-error'?:
20570
20687
  | boolean
20571
20688
  | 'allow-with-description'
20572
20689
  | {
20573
20690
  descriptionFormat?: string
20574
20691
  }
20692
+
20575
20693
  'ts-ignore'?:
20576
20694
  | boolean
20577
20695
  | 'allow-with-description'
20578
20696
  | {
20579
20697
  descriptionFormat?: string
20580
20698
  }
20699
+
20581
20700
  'ts-nocheck'?:
20582
20701
  | boolean
20583
20702
  | 'allow-with-description'
@@ -20700,9 +20819,13 @@ type TsExplicitMemberAccessibility =
20700
20819
 
20701
20820
  overrides?: {
20702
20821
  accessors?: 'explicit' | 'no-public' | 'off'
20822
+
20703
20823
  constructors?: 'explicit' | 'no-public' | 'off'
20824
+
20704
20825
  methods?: 'explicit' | 'no-public' | 'off'
20826
+
20705
20827
  parameterProperties?: 'explicit' | 'no-public' | 'off'
20828
+
20706
20829
  properties?: 'explicit' | 'no-public' | 'off'
20707
20830
  }
20708
20831
  },
@@ -21391,6 +21514,7 @@ type TsMemberOrdering =
21391
21514
  | 'natural'
21392
21515
  | 'natural-case-insensitive'
21393
21516
  }
21517
+
21394
21518
  classExpressions?:
21395
21519
  | 'never'
21396
21520
  | (
@@ -22028,6 +22152,7 @@ type TsMemberOrdering =
22028
22152
  | 'natural'
22029
22153
  | 'natural-case-insensitive'
22030
22154
  }
22155
+
22031
22156
  default?:
22032
22157
  | 'never'
22033
22158
  | (
@@ -22665,6 +22790,7 @@ type TsMemberOrdering =
22665
22790
  | 'natural'
22666
22791
  | 'natural-case-insensitive'
22667
22792
  }
22793
+
22668
22794
  interfaces?:
22669
22795
  | 'never'
22670
22796
  | (
@@ -22714,6 +22840,7 @@ type TsMemberOrdering =
22714
22840
  | 'natural'
22715
22841
  | 'natural-case-insensitive'
22716
22842
  }
22843
+
22717
22844
  typeLiterals?:
22718
22845
  | 'never'
22719
22846
  | (
@@ -23744,6 +23871,14 @@ type TsNoUnnecessaryTypeAssertion =
23744
23871
  typesToIgnore?: string[]
23745
23872
  },
23746
23873
  ]
23874
+ // ----- ts/no-unsafe-member-access -----
23875
+ type TsNoUnsafeMemberAccess =
23876
+ | []
23877
+ | [
23878
+ {
23879
+ allowOptionalChaining?: boolean
23880
+ },
23881
+ ]
23747
23882
  // ----- ts/no-unused-expressions -----
23748
23883
  type TsNoUnusedExpressions =
23749
23884
  | []
@@ -23776,6 +23911,8 @@ type TsNoUnusedVars =
23776
23911
 
23777
23912
  ignoreRestSiblings?: boolean
23778
23913
 
23914
+ ignoreUsingDeclarations?: boolean
23915
+
23779
23916
  reportUsedIgnorePattern?: boolean
23780
23917
 
23781
23918
  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",
@@ -601,6 +602,10 @@ var jsdocCommentsRecommendedTypescriptFlavorRules = {
601
602
  "jsdoc/sort-tags": "off",
602
603
  "jsdoc/tag-lines": "warn",
603
604
  "jsdoc/text-escaping": "off",
605
+ "jsdoc/ts-method-signature-style": "off",
606
+ "jsdoc/ts-no-empty-object-type": "warn",
607
+ "jsdoc/ts-no-unnecessary-template-expression": "off",
608
+ "jsdoc/ts-prefer-function-type": "off",
604
609
  "jsdoc/type-formatting": "off",
605
610
  "jsdoc/valid-types": "warn"
606
611
  // End expansion
@@ -621,6 +626,7 @@ var jsdocCommentsRecommendedTypescriptRules = {
621
626
  "jsdoc/check-values": "warn",
622
627
  "jsdoc/convert-to-jsdoc-comments": "off",
623
628
  "jsdoc/empty-tags": "warn",
629
+ "jsdoc/escape-inline-tags": "warn",
624
630
  "jsdoc/implements-on-classes": "warn",
625
631
  "jsdoc/imports-as-dependencies": "off",
626
632
  "jsdoc/informative-docs": "off",
@@ -674,6 +680,10 @@ var jsdocCommentsRecommendedTypescriptRules = {
674
680
  "jsdoc/sort-tags": "off",
675
681
  "jsdoc/tag-lines": "warn",
676
682
  "jsdoc/text-escaping": "off",
683
+ "jsdoc/ts-method-signature-style": "off",
684
+ "jsdoc/ts-no-empty-object-type": "warn",
685
+ "jsdoc/ts-no-unnecessary-template-expression": "off",
686
+ "jsdoc/ts-prefer-function-type": "off",
677
687
  "jsdoc/type-formatting": "off",
678
688
  "jsdoc/valid-types": "warn"
679
689
  // End expansion
@@ -1402,10 +1412,7 @@ var reactRecommendedTypeCheckedRules = {
1402
1412
  "react/no-unsafe-component-will-mount": "warn",
1403
1413
  "react/no-unsafe-component-will-receive-props": "warn",
1404
1414
  "react/no-unsafe-component-will-update": "warn",
1405
- "react/no-unstable-context-value": "warn",
1406
- "react/no-unstable-default-props": "warn",
1407
1415
  "react/no-unused-class-component-members": "warn",
1408
- "react/no-unused-state": "warn",
1409
1416
  "react/no-use-context": "warn",
1410
1417
  "react/no-useless-forward-ref": "warn",
1411
1418
  "react/prefer-use-state-lazy-initialization": "warn",
@@ -1414,25 +1421,24 @@ var reactRecommendedTypeCheckedRules = {
1414
1421
  "react-dom/no-find-dom-node": "error",
1415
1422
  "react-dom/no-flush-sync": "error",
1416
1423
  "react-dom/no-hydrate": "error",
1417
- "react-dom/no-missing-button-type": "warn",
1418
- "react-dom/no-missing-iframe-sandbox": "warn",
1419
1424
  "react-dom/no-namespace": "error",
1420
1425
  "react-dom/no-render": "error",
1421
1426
  "react-dom/no-render-return-value": "error",
1422
1427
  "react-dom/no-script-url": "warn",
1423
1428
  "react-dom/no-unsafe-iframe-sandbox": "warn",
1424
- "react-dom/no-unsafe-target-blank": "warn",
1425
1429
  "react-dom/no-use-form-state": "error",
1426
1430
  "react-dom/no-void-elements-with-children": "error",
1427
1431
  "react-web-api/no-leaked-event-listener": "warn",
1428
1432
  "react-web-api/no-leaked-interval": "warn",
1429
1433
  "react-web-api/no-leaked-resize-observer": "warn",
1430
1434
  "react-web-api/no-leaked-timeout": "warn",
1435
+ "react-hooks-extra/no-direct-set-state-in-use-effect": "warn",
1431
1436
  "react-naming-convention/context-name": "warn",
1437
+ "react-naming-convention/use-state": "warn",
1432
1438
  "react-dom/no-string-style-prop": "off",
1433
1439
  "react-dom/no-unknown-property": "off",
1434
- "react/no-leaked-conditional-rendering": "warn",
1435
- "react/no-unused-props": "warn"
1440
+ "react/jsx-no-undef": "off",
1441
+ "react/no-leaked-conditional-rendering": "error"
1436
1442
  // End expansion
1437
1443
  };
1438
1444
  var reactDisableTypeCheckedRules = {
@@ -1570,7 +1576,8 @@ var testRecommendedRules = {
1570
1576
  "test/valid-expect": "error",
1571
1577
  "test/valid-describe-callback": "error",
1572
1578
  "test/require-local-test-context-for-concurrent-snapshots": "error",
1573
- "test/no-import-node-test": "error"
1579
+ "test/no-import-node-test": "error",
1580
+ "test/prefer-called-exactly-once-with": "error"
1574
1581
  // End expansion
1575
1582
  };
1576
1583
 
@@ -2466,6 +2473,46 @@ var kpSharedDisableTypeCheckedRules = {
2466
2473
  "jsdoc/check-tag-names": ["error", { typed: false }],
2467
2474
  "jsdoc/no-types": "off"
2468
2475
  };
2476
+ var kpPerfectionistSortConfig = [
2477
+ // Note precedence sensitivity...
2478
+ // This has to come before the `min` rules to sort
2479
+ // strings like `{ minImageWidth: 1, minImageHeight: 1 }` correctly
2480
+ generatePerfectionistSortConfig(["width", "height"]),
2481
+ generatePerfectionistSortConfig(["width", "height"], "leading"),
2482
+ generatePerfectionistSortConfig(["Width", "Height"], "trailing"),
2483
+ generatePerfectionistSortConfig(["r", "g", "b"]),
2484
+ generatePerfectionistSortConfig(["R", "G", "B"], "trailing"),
2485
+ generatePerfectionistSortConfig(["red", "green", "blue"]),
2486
+ generatePerfectionistSortConfig(["Red", "Green", "Blue"], "trailing"),
2487
+ generatePerfectionistSortConfig(["h", "s", "l"]),
2488
+ generatePerfectionistSortConfig(["hue", "saturation", "lightness"]),
2489
+ generatePerfectionistSortConfig(["h", "s", "l", "a"]),
2490
+ generatePerfectionistSortConfig(["hue", "saturation", "lightness", "alpha"]),
2491
+ generatePerfectionistSortConfig(["h", "s", "v"]),
2492
+ generatePerfectionistSortConfig(["a", "b"]),
2493
+ // For partial matches...
2494
+ generatePerfectionistSortConfig(["r", "g", "b", "a"]),
2495
+ generatePerfectionistSortConfig(["red", "green", "blue", "alpha"]),
2496
+ generatePerfectionistSortConfig(["Red", "Green", "Blue", "Alpha"], "trailing"),
2497
+ generatePerfectionistSortConfig(["x", "y", "z", "w"]),
2498
+ generatePerfectionistSortConfig(["x", "y", "z", "w"], "leading"),
2499
+ generatePerfectionistSortConfig(["X", "Y", "Z", "W"], "trailing"),
2500
+ generatePerfectionistSortConfig(["x1", "y1", "x2", "y2"]),
2501
+ generatePerfectionistSortConfig(["x1", "y1", "x2", "y2"], "leading"),
2502
+ generatePerfectionistSortConfig(["X1", "Y1", "X2", "Y2"], "trailing"),
2503
+ generatePerfectionistSortConfig(["x1", "y1", "x2", "y2", "z1", "z2"]),
2504
+ generatePerfectionistSortConfig(["x1", "y1", "x2", "y2", "z1", "z2"], "leading"),
2505
+ generatePerfectionistSortConfig(["X1", "Y1", "X2", "Y2", "Z1", "Z2"], "trailing"),
2506
+ generatePerfectionistSortConfig(["open", "close"]),
2507
+ generatePerfectionistSortConfig(["open", "close"], "leading"),
2508
+ generatePerfectionistSortConfig(["Open", "Close"], "trailing"),
2509
+ generatePerfectionistSortConfig(["start", "end"]),
2510
+ generatePerfectionistSortConfig(["start", "end"], "leading"),
2511
+ generatePerfectionistSortConfig(["Start", "End"], "trailing"),
2512
+ generatePerfectionistSortConfig(["min", "max"]),
2513
+ generatePerfectionistSortConfig(["min", "max"], "leading"),
2514
+ generatePerfectionistSortConfig(["Min", "Max"], "trailing")
2515
+ ];
2469
2516
  var sharedScriptConfig = {
2470
2517
  plugins: {
2471
2518
  depend: pluginDepend,
@@ -2565,39 +2612,14 @@ var sharedScriptConfig = {
2565
2612
  ],
2566
2613
  // Too chaotic... but should revisit
2567
2614
  "perfectionist/sort-modules": "off",
2615
+ "perfectionist/sort-object-types": [
2616
+ "error",
2617
+ ...kpPerfectionistSortConfig,
2618
+ { newlinesBetween: "never", order: "asc", type: "natural" }
2619
+ ],
2568
2620
  "perfectionist/sort-objects": [
2569
2621
  "error",
2570
- // Note precedence sensitivity...
2571
- // This has to come before the `min` rules to sort
2572
- // strings like `{ minImageWidth: 1, minImageHeight: 1 }` correctly
2573
- generatePerfectionistSortConfig(["width", "height"]),
2574
- generatePerfectionistSortConfig(["width", "height"], "leading"),
2575
- generatePerfectionistSortConfig(["Width", "Height"], "trailing"),
2576
- generatePerfectionistSortConfig(["r", "g", "b"]),
2577
- generatePerfectionistSortConfig(["R", "G", "B"], "trailing"),
2578
- generatePerfectionistSortConfig(["red", "green", "blue"]),
2579
- generatePerfectionistSortConfig(["Red", "Green", "Blue"], "trailing"),
2580
- generatePerfectionistSortConfig(["h", "s", "l"]),
2581
- generatePerfectionistSortConfig(["hue", "saturation", "lightness"]),
2582
- generatePerfectionistSortConfig(["h", "s", "l", "a"]),
2583
- generatePerfectionistSortConfig(["hue", "saturation", "lightness", "alpha"]),
2584
- generatePerfectionistSortConfig(["h", "s", "v"]),
2585
- generatePerfectionistSortConfig(["a", "b"]),
2586
- // For partial matches...
2587
- generatePerfectionistSortConfig(["r", "g", "b", "a"]),
2588
- generatePerfectionistSortConfig(["red", "green", "blue", "alpha"]),
2589
- generatePerfectionistSortConfig(["Red", "Green", "Blue", "Alpha"], "trailing"),
2590
- generatePerfectionistSortConfig(["x", "y", "z", "w"]),
2591
- generatePerfectionistSortConfig(["X", "Y", "Z", "W"], "trailing"),
2592
- generatePerfectionistSortConfig(["open", "close"]),
2593
- generatePerfectionistSortConfig(["open", "close"], "leading"),
2594
- generatePerfectionistSortConfig(["Open", "Close"], "trailing"),
2595
- generatePerfectionistSortConfig(["start", "end"]),
2596
- generatePerfectionistSortConfig(["start", "end"], "leading"),
2597
- generatePerfectionistSortConfig(["Start", "End"], "trailing"),
2598
- generatePerfectionistSortConfig(["min", "max"]),
2599
- generatePerfectionistSortConfig(["min", "max"], "leading"),
2600
- generatePerfectionistSortConfig(["Min", "Max"], "trailing"),
2622
+ ...kpPerfectionistSortConfig,
2601
2623
  { newlinesBetween: "never", order: "asc", type: "natural" }
2602
2624
  ],
2603
2625
  "sort-imports": "off",
@@ -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.3",
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.1.1",
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.1",
51
+ "@typescript-eslint/parser": "^8.46.1",
52
+ "@vitest/eslint-plugin": "^1.3.20",
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": "^61.1.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
- "eslint-plugin-package-json": "^0.56.3",
70
- "eslint-plugin-perfectionist": "^4.15.0",
69
+ "eslint-plugin-package-json": "^0.56.4",
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,14 @@
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.40.0",
97
+ "to-valid-identifier": "^0.1.1",
97
98
  "tsup": "^8.5.0"
98
99
  },
99
100
  "engines": {
package/readme.md CHANGED
@@ -40,14 +40,14 @@ To use just this ESLint config in isolation:
40
40
  1. Install the `.npmrc` in your project root. This is required for correct PNPM behavior:
41
41
 
42
42
  ```sh
43
- pnpm dlx @kitschpatrol/repo-config init
43
+ pnpm --package=@kitschpatrol/repo-config dlx ksc-repo init
44
44
  ```
45
45
 
46
46
  2. Install and initialize the required TypeScript `tsconfig.json` configuration in your project root:
47
47
 
48
48
  ```sh
49
49
  pnpm add -D @kitschpatrol/typescript-config
50
- pnpm dlx @kitschpatrol/typescript-config init
50
+ pnpm --package=@kitschpatrol/typescript-config dlx ksc-typescript init
51
51
  ```
52
52
 
53
53
  3. Add the package: