@w5s/eslint-config 3.2.0 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -831,6 +831,11 @@ interface RuleOptions$7 {
831
831
  * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-property-type.md#repos-sticky-header
832
832
  */
833
833
  'jsdoc/require-property-type'?: Linter.RuleEntry<[]>
834
+ /**
835
+ * Requires that Promise rejections are documented with `@rejects` tags.
836
+ * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-rejects.md#repos-sticky-header
837
+ */
838
+ 'jsdoc/require-rejects'?: Linter.RuleEntry<JsdocRequireRejects>
834
839
  /**
835
840
  * Requires that returns are documented with `@returns`.
836
841
  * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-returns.md#repos-sticky-header
@@ -979,6 +984,8 @@ type JsdocCheckExamples = []|[{
979
984
  // ----- jsdoc/check-indentation -----
980
985
  type JsdocCheckIndentation = []|[{
981
986
 
987
+ allowIndentedSections?: boolean
988
+
982
989
  excludeTags?: string[]
983
990
  }]
984
991
  // ----- jsdoc/check-line-alignment -----
@@ -1364,6 +1371,8 @@ type JsdocRequireHyphenBeforeParamDescription = []|[("always" | "never")]|[("alw
1364
1371
  // ----- jsdoc/require-jsdoc -----
1365
1372
  type JsdocRequireJsdoc = []|[{
1366
1373
 
1374
+ checkAllFunctionExpressions?: boolean
1375
+
1367
1376
  checkConstructors?: boolean
1368
1377
 
1369
1378
  checkGetters?: (boolean | "no-setter")
@@ -1484,6 +1493,16 @@ type JsdocRequireParamType = []|[{
1484
1493
 
1485
1494
  setDefaultDestructuredRootType?: boolean
1486
1495
  }]
1496
+ // ----- jsdoc/require-rejects -----
1497
+ type JsdocRequireRejects = []|[{
1498
+
1499
+ contexts?: (string | {
1500
+ comment?: string
1501
+ context?: string
1502
+ })[]
1503
+
1504
+ exemptedBy?: string[]
1505
+ }]
1487
1506
  // ----- jsdoc/require-returns -----
1488
1507
  type JsdocRequireReturns = []|[{
1489
1508
 
@@ -1608,6 +1627,10 @@ type JsdocSortTags = []|[{
1608
1627
 
1609
1628
  reportTagGroupSpacing?: boolean
1610
1629
 
1630
+ tagExceptions?: {
1631
+ [k: string]: number
1632
+ }
1633
+
1611
1634
  tagSequence?: {
1612
1635
 
1613
1636
  tags?: string[]
@@ -1700,6 +1723,8 @@ type JsdocTypeFormatting = []|[{
1700
1723
 
1701
1724
  objectFieldSeparatorTrailingPunctuation?: boolean
1702
1725
 
1726
+ objectTypeBracketSpacing?: string
1727
+
1703
1728
  parameterDefaultValueSpacing?: string
1704
1729
 
1705
1730
  postMethodNameSpacing?: string
@@ -1710,6 +1735,8 @@ type JsdocTypeFormatting = []|[{
1710
1735
 
1711
1736
  stringQuotes?: ("double" | "single")
1712
1737
 
1738
+ trailingPunctuationMultilineOnly?: boolean
1739
+
1713
1740
  typeBracketSpacing?: string
1714
1741
 
1715
1742
  unionSpacing?: string
@@ -2409,6 +2436,11 @@ interface RuleOptions$5 {
2409
2436
  * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/console.md
2410
2437
  */
2411
2438
  'node/prefer-global/console'?: Linter.RuleEntry<NodePreferGlobalConsole>
2439
+ /**
2440
+ * enforce either `crypto` or `require("crypto").webcrypto`
2441
+ * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/crypto.md
2442
+ */
2443
+ 'node/prefer-global/crypto'?: Linter.RuleEntry<NodePreferGlobalCrypto>
2412
2444
  /**
2413
2445
  * enforce either `process` or `require("process")`
2414
2446
  * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/process.md
@@ -2424,6 +2456,11 @@ interface RuleOptions$5 {
2424
2456
  * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/text-encoder.md
2425
2457
  */
2426
2458
  'node/prefer-global/text-encoder'?: Linter.RuleEntry<NodePreferGlobalTextEncoder>
2459
+ /**
2460
+ * enforce either global timer functions or `require("timers")`
2461
+ * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/timers.md
2462
+ */
2463
+ 'node/prefer-global/timers'?: Linter.RuleEntry<NodePreferGlobalTimers>
2427
2464
  /**
2428
2465
  * enforce either `URL` or `require("url").URL`
2429
2466
  * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/url.md
@@ -2732,12 +2769,16 @@ type NodeNoUnsupportedFeaturesNodeBuiltins = []|[{
2732
2769
  type NodePreferGlobalBuffer = []|[("always" | "never")]
2733
2770
  // ----- node/prefer-global/console -----
2734
2771
  type NodePreferGlobalConsole = []|[("always" | "never")]
2772
+ // ----- node/prefer-global/crypto -----
2773
+ type NodePreferGlobalCrypto = []|[("always" | "never")]
2735
2774
  // ----- node/prefer-global/process -----
2736
2775
  type NodePreferGlobalProcess = []|[("always" | "never")]
2737
2776
  // ----- node/prefer-global/text-decoder -----
2738
2777
  type NodePreferGlobalTextDecoder = []|[("always" | "never")]
2739
2778
  // ----- node/prefer-global/text-encoder -----
2740
2779
  type NodePreferGlobalTextEncoder = []|[("always" | "never")]
2780
+ // ----- node/prefer-global/timers -----
2781
+ type NodePreferGlobalTimers = []|[("always" | "never")]
2741
2782
  // ----- node/prefer-global/url -----
2742
2783
  type NodePreferGlobalUrl = []|[("always" | "never")]
2743
2784
  // ----- node/prefer-global/url-search-params -----
@@ -2859,6 +2900,11 @@ interface RuleOptions$4 {
2859
2900
  * @see https://eslint.style/rules/eol-last
2860
2901
  */
2861
2902
  'style/eol-last'?: Linter.RuleEntry<StyleEolLast>
2903
+ /**
2904
+ * Enforce consistent line break styles for JSX props
2905
+ * @see https://eslint.style/rules/jsx-props-style
2906
+ */
2907
+ 'style/exp-jsx-props-style'?: Linter.RuleEntry<StyleExpJsxPropsStyle>
2862
2908
  /**
2863
2909
  * Enforce consistent spacing and line break styles inside brackets.
2864
2910
  * @see https://eslint.style/rules/list-style
@@ -2994,6 +3040,7 @@ interface RuleOptions$4 {
2994
3040
  /**
2995
3041
  * Enforce props alphabetical sorting
2996
3042
  * @see https://eslint.style/rules/jsx-sort-props
3043
+ * @deprecated
2997
3044
  */
2998
3045
  'style/jsx-sort-props'?: Linter.RuleEntry<StyleJsxSortProps>
2999
3046
  /**
@@ -3455,15 +3502,25 @@ type StyleCurlyNewline = []|[(("always" | "never") | {
3455
3502
  type StyleDotLocation = []|[("object" | "property")]
3456
3503
  // ----- style/eol-last -----
3457
3504
  type StyleEolLast = []|[("always" | "never" | "unix" | "windows")]
3505
+ // ----- style/exp-jsx-props-style -----
3506
+ type StyleExpJsxPropsStyle = []|[{
3507
+ singleLine?: {
3508
+ maxItems?: number
3509
+ }
3510
+ multiLine?: {
3511
+ minItems?: number
3512
+ maxItemsPerLine?: number
3513
+ }
3514
+ }]
3458
3515
  // ----- style/exp-list-style -----
3459
3516
  type StyleExpListStyle = []|[{
3460
3517
  singleLine?: _StyleExpListStyle_SingleLineConfig
3461
3518
  multiLine?: _StyleExpListStyle_MultiLineConfig
3462
3519
  overrides?: {
3520
+ "()"?: _StyleExpListStyle_BaseConfig
3463
3521
  "[]"?: _StyleExpListStyle_BaseConfig
3464
3522
  "{}"?: _StyleExpListStyle_BaseConfig
3465
3523
  "<>"?: _StyleExpListStyle_BaseConfig
3466
- "()"?: _StyleExpListStyle_BaseConfig
3467
3524
  ArrayExpression?: _StyleExpListStyle_BaseConfig
3468
3525
  ArrayPattern?: _StyleExpListStyle_BaseConfig
3469
3526
  ArrowFunctionExpression?: _StyleExpListStyle_BaseConfig
@@ -3471,21 +3528,22 @@ type StyleExpListStyle = []|[{
3471
3528
  ExportNamedDeclaration?: _StyleExpListStyle_BaseConfig
3472
3529
  FunctionDeclaration?: _StyleExpListStyle_BaseConfig
3473
3530
  FunctionExpression?: _StyleExpListStyle_BaseConfig
3474
- ImportDeclaration?: _StyleExpListStyle_BaseConfig
3531
+ IfStatement?: _StyleExpListStyle_BaseConfig
3475
3532
  ImportAttributes?: _StyleExpListStyle_BaseConfig
3533
+ ImportDeclaration?: _StyleExpListStyle_BaseConfig
3534
+ JSONArrayExpression?: _StyleExpListStyle_BaseConfig
3535
+ JSONObjectExpression?: _StyleExpListStyle_BaseConfig
3476
3536
  NewExpression?: _StyleExpListStyle_BaseConfig
3477
3537
  ObjectExpression?: _StyleExpListStyle_BaseConfig
3478
3538
  ObjectPattern?: _StyleExpListStyle_BaseConfig
3479
3539
  TSDeclareFunction?: _StyleExpListStyle_BaseConfig
3540
+ TSEnumBody?: _StyleExpListStyle_BaseConfig
3480
3541
  TSFunctionType?: _StyleExpListStyle_BaseConfig
3481
3542
  TSInterfaceBody?: _StyleExpListStyle_BaseConfig
3482
- TSEnumBody?: _StyleExpListStyle_BaseConfig
3483
3543
  TSTupleType?: _StyleExpListStyle_BaseConfig
3484
3544
  TSTypeLiteral?: _StyleExpListStyle_BaseConfig
3485
3545
  TSTypeParameterDeclaration?: _StyleExpListStyle_BaseConfig
3486
3546
  TSTypeParameterInstantiation?: _StyleExpListStyle_BaseConfig
3487
- JSONArrayExpression?: _StyleExpListStyle_BaseConfig
3488
- JSONObjectExpression?: _StyleExpListStyle_BaseConfig
3489
3547
  }
3490
3548
  }]
3491
3549
  interface _StyleExpListStyle_SingleLineConfig {
@@ -4498,7 +4556,7 @@ type StyleTypeAnnotationSpacing = []|[{
4498
4556
  after?: boolean
4499
4557
  overrides?: {
4500
4558
  colon?: _StyleTypeAnnotationSpacing_SpacingConfig
4501
- arrow?: _StyleTypeAnnotationSpacing_SpacingConfig
4559
+ arrow?: ("ignore" | _StyleTypeAnnotationSpacing_SpacingConfig)
4502
4560
  variable?: _StyleTypeAnnotationSpacing_SpacingConfig
4503
4561
  parameter?: _StyleTypeAnnotationSpacing_SpacingConfig
4504
4562
  property?: _StyleTypeAnnotationSpacing_SpacingConfig
@@ -4538,7 +4596,12 @@ declare module 'eslint' {
4538
4596
 
4539
4597
  interface RuleOptions$3 {
4540
4598
  /**
4541
- * require .spec test file pattern
4599
+ * enforce using `.each` or `.for` consistently
4600
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/consistent-each-for.md
4601
+ */
4602
+ 'test/consistent-each-for'?: Linter.RuleEntry<TestConsistentEachFor>
4603
+ /**
4604
+ * require test file pattern
4542
4605
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/consistent-test-filename.md
4543
4606
  */
4544
4607
  'test/consistent-test-filename'?: Linter.RuleEntry<TestConsistentTestFilename>
@@ -4547,11 +4610,21 @@ interface RuleOptions$3 {
4547
4610
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/consistent-test-it.md
4548
4611
  */
4549
4612
  'test/consistent-test-it'?: Linter.RuleEntry<TestConsistentTestIt>
4613
+ /**
4614
+ * enforce using vitest or vi but not both
4615
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/consistent-vitest-vi.md
4616
+ */
4617
+ 'test/consistent-vitest-vi'?: Linter.RuleEntry<TestConsistentVitestVi>
4550
4618
  /**
4551
4619
  * enforce having expectation in test body
4552
4620
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/expect-expect.md
4553
4621
  */
4554
4622
  'test/expect-expect'?: Linter.RuleEntry<TestExpectExpect>
4623
+ /**
4624
+ * enforce hoisted APIs to be on top of the file
4625
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/hoisted-apis-on-top.md
4626
+ */
4627
+ 'test/hoisted-apis-on-top'?: Linter.RuleEntry<[]>
4555
4628
  /**
4556
4629
  * enforce a maximum number of expect per test
4557
4630
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/max-expects.md
@@ -4576,7 +4649,7 @@ interface RuleOptions$3 {
4576
4649
  * disallow conditional expects
4577
4650
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-conditional-expect.md
4578
4651
  */
4579
- 'test/no-conditional-expect'?: Linter.RuleEntry<[]>
4652
+ 'test/no-conditional-expect'?: Linter.RuleEntry<TestNoConditionalExpect>
4580
4653
  /**
4581
4654
  * disallow conditional tests
4582
4655
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-conditional-in-test.md
@@ -4623,6 +4696,11 @@ interface RuleOptions$3 {
4623
4696
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-import-node-test.md
4624
4697
  */
4625
4698
  'test/no-import-node-test'?: Linter.RuleEntry<[]>
4699
+ /**
4700
+ * disallow importing Vitest globals
4701
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-importing-vitest-globals.md
4702
+ */
4703
+ 'test/no-importing-vitest-globals'?: Linter.RuleEntry<[]>
4626
4704
  /**
4627
4705
  * disallow string interpolation in snapshots
4628
4706
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-interpolation-in-snapshots.md
@@ -4654,7 +4732,7 @@ interface RuleOptions$3 {
4654
4732
  */
4655
4733
  'test/no-standalone-expect'?: Linter.RuleEntry<TestNoStandaloneExpect>
4656
4734
  /**
4657
- * disallow using `test` as a prefix
4735
+ * disallow using the `f` and `x` prefixes in favour of `.only` and `.skip`
4658
4736
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-test-prefixes.md
4659
4737
  */
4660
4738
  'test/no-test-prefixes'?: Linter.RuleEntry<[]>
@@ -4663,6 +4741,11 @@ interface RuleOptions$3 {
4663
4741
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-test-return-statement.md
4664
4742
  */
4665
4743
  'test/no-test-return-statement'?: Linter.RuleEntry<[]>
4744
+ /**
4745
+ * Disallow unnecessary async function wrapper for expected promises
4746
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-unneeded-async-expect-function.md
4747
+ */
4748
+ 'test/no-unneeded-async-expect-function'?: Linter.RuleEntry<[]>
4666
4749
  /**
4667
4750
  * Enforce padding around `afterAll` blocks
4668
4751
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/padding-around-after-all-blocks.md
@@ -4703,6 +4786,21 @@ interface RuleOptions$3 {
4703
4786
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/padding-around-test-blocks.md
4704
4787
  */
4705
4788
  'test/padding-around-test-blocks'?: Linter.RuleEntry<[]>
4789
+ /**
4790
+ * Prefer `toHaveBeenCalledExactlyOnceWith` over `toHaveBeenCalledOnce` and `toHaveBeenCalledWith`
4791
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-called-exactly-once-with.md
4792
+ */
4793
+ 'test/prefer-called-exactly-once-with'?: Linter.RuleEntry<[]>
4794
+ /**
4795
+ * enforce using `toBeCalledOnce()` or `toHaveBeenCalledOnce()`
4796
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-called-once.md
4797
+ */
4798
+ 'test/prefer-called-once'?: Linter.RuleEntry<[]>
4799
+ /**
4800
+ * enforce using `toBeCalledTimes(1)` or `toHaveBeenCalledTimes(1)`
4801
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-called-times.md
4802
+ */
4803
+ 'test/prefer-called-times'?: Linter.RuleEntry<[]>
4706
4804
  /**
4707
4805
  * enforce using `toBeCalledWith()` or `toHaveBeenCalledWith()`
4708
4806
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-called-with.md
@@ -4713,13 +4811,18 @@ interface RuleOptions$3 {
4713
4811
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-comparison-matcher.md
4714
4812
  */
4715
4813
  'test/prefer-comparison-matcher'?: Linter.RuleEntry<[]>
4814
+ /**
4815
+ * enforce using a function as a describe title over an equivalent string
4816
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-describe-function-title.md
4817
+ */
4818
+ 'test/prefer-describe-function-title'?: Linter.RuleEntry<[]>
4716
4819
  /**
4717
4820
  * enforce using `each` rather than manual loops
4718
4821
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-each.md
4719
4822
  */
4720
4823
  'test/prefer-each'?: Linter.RuleEntry<[]>
4721
4824
  /**
4722
- * enforce using the built-in quality matchers
4825
+ * enforce using the built-in equality matchers
4723
4826
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-equality-matcher.md
4724
4827
  */
4725
4828
  'test/prefer-equality-matcher'?: Linter.RuleEntry<[]>
@@ -4733,6 +4836,11 @@ interface RuleOptions$3 {
4733
4836
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-expect-resolves.md
4734
4837
  */
4735
4838
  'test/prefer-expect-resolves'?: Linter.RuleEntry<[]>
4839
+ /**
4840
+ * enforce using `expectTypeOf` instead of `expect(typeof ...)`
4841
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-expect-type-of.md
4842
+ */
4843
+ 'test/prefer-expect-type-of'?: Linter.RuleEntry<[]>
4736
4844
  /**
4737
4845
  * enforce having hooks in consistent order
4738
4846
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-hooks-in-order.md
@@ -4743,6 +4851,16 @@ interface RuleOptions$3 {
4743
4851
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-hooks-on-top.md
4744
4852
  */
4745
4853
  'test/prefer-hooks-on-top'?: Linter.RuleEntry<[]>
4854
+ /**
4855
+ * prefer dynamic import in mock
4856
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-import-in-mock.md
4857
+ */
4858
+ 'test/prefer-import-in-mock'?: Linter.RuleEntry<TestPreferImportInMock>
4859
+ /**
4860
+ * enforce importing Vitest globals
4861
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-importing-vitest-globals.md
4862
+ */
4863
+ 'test/prefer-importing-vitest-globals'?: Linter.RuleEntry<[]>
4746
4864
  /**
4747
4865
  * enforce lowercase titles
4748
4866
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-lowercase-title.md
@@ -4753,6 +4871,11 @@ interface RuleOptions$3 {
4753
4871
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-mock-promise-shorthand.md
4754
4872
  */
4755
4873
  'test/prefer-mock-promise-shorthand'?: Linter.RuleEntry<[]>
4874
+ /**
4875
+ * Prefer mock return shorthands
4876
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-mock-return-shorthand.md
4877
+ */
4878
+ 'test/prefer-mock-return-shorthand'?: Linter.RuleEntry<[]>
4756
4879
  /**
4757
4880
  * enforce including a hint with external snapshots
4758
4881
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-snapshot-hint.md
@@ -4798,6 +4921,11 @@ interface RuleOptions$3 {
4798
4921
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-contain.md
4799
4922
  */
4800
4923
  'test/prefer-to-contain'?: Linter.RuleEntry<[]>
4924
+ /**
4925
+ * Suggest using `toHaveBeenCalledTimes()`
4926
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-have-been-called-times.md
4927
+ */
4928
+ 'test/prefer-to-have-been-called-times'?: Linter.RuleEntry<[]>
4801
4929
  /**
4802
4930
  * enforce using toHaveLength()
4803
4931
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-have-length.md
@@ -4813,6 +4941,11 @@ interface RuleOptions$3 {
4813
4941
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-vi-mocked.md
4814
4942
  */
4815
4943
  'test/prefer-vi-mocked'?: Linter.RuleEntry<[]>
4944
+ /**
4945
+ * ensure that every `expect.poll` call is awaited
4946
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-awaited-expect-poll.md
4947
+ */
4948
+ 'test/require-awaited-expect-poll'?: Linter.RuleEntry<[]>
4816
4949
  /**
4817
4950
  * require setup and teardown to be within a hook
4818
4951
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-hook.md
@@ -4828,6 +4961,11 @@ interface RuleOptions$3 {
4828
4961
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-mock-type-parameters.md
4829
4962
  */
4830
4963
  'test/require-mock-type-parameters'?: Linter.RuleEntry<TestRequireMockTypeParameters>
4964
+ /**
4965
+ * require tests to declare a timeout
4966
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-test-timeout.md
4967
+ */
4968
+ 'test/require-test-timeout'?: Linter.RuleEntry<[]>
4831
4969
  /**
4832
4970
  * require toThrow() to be called with an error message
4833
4971
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-to-throw-message.md
@@ -4858,9 +4996,21 @@ interface RuleOptions$3 {
4858
4996
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/valid-title.md
4859
4997
  */
4860
4998
  'test/valid-title'?: Linter.RuleEntry<TestValidTitle>
4999
+ /**
5000
+ * disallow `.todo` usage
5001
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/warn-todo.md
5002
+ */
5003
+ 'test/warn-todo'?: Linter.RuleEntry<[]>
4861
5004
  }
4862
5005
 
4863
5006
  /* ======= Declarations ======= */
5007
+ // ----- test/consistent-each-for -----
5008
+ type TestConsistentEachFor = []|[{
5009
+ test?: ("each" | "for")
5010
+ it?: ("each" | "for")
5011
+ describe?: ("each" | "for")
5012
+ suite?: ("each" | "for")
5013
+ }]
4864
5014
  // ----- test/consistent-test-filename -----
4865
5015
  type TestConsistentTestFilename = []|[{
4866
5016
  pattern?: string
@@ -4871,6 +5021,10 @@ type TestConsistentTestIt = []|[{
4871
5021
  fn?: ("test" | "it")
4872
5022
  withinDescribe?: ("test" | "it")
4873
5023
  }]
5024
+ // ----- test/consistent-vitest-vi -----
5025
+ type TestConsistentVitestVi = []|[{
5026
+ fn?: ("vi" | "vitest")
5027
+ }]
4874
5028
  // ----- test/expect-expect -----
4875
5029
  type TestExpectExpect = []|[{
4876
5030
  assertFunctionNames?: string[]
@@ -4884,13 +5038,19 @@ type TestMaxExpects = []|[{
4884
5038
  type TestMaxNestedDescribe = []|[{
4885
5039
  max?: number
4886
5040
  }]
5041
+ // ----- test/no-conditional-expect -----
5042
+ type TestNoConditionalExpect = []|[{
5043
+
5044
+ expectAssertions?: boolean
5045
+ }]
4887
5046
  // ----- test/no-focused-tests -----
4888
5047
  type TestNoFocusedTests = []|[{
4889
5048
  fixable?: boolean
4890
5049
  }]
4891
5050
  // ----- test/no-hooks -----
4892
5051
  type TestNoHooks = []|[{
4893
- allow?: unknown[]
5052
+
5053
+ allow?: ("beforeAll" | "beforeEach" | "afterAll" | "afterEach")[]
4894
5054
  }]
4895
5055
  // ----- test/no-large-snapshots -----
4896
5056
  type TestNoLargeSnapshots = []|[{
@@ -4918,6 +5078,10 @@ type TestPreferExpectAssertions = []|[{
4918
5078
  onlyFunctionsWithExpectInLoop?: boolean
4919
5079
  onlyFunctionsWithExpectInCallback?: boolean
4920
5080
  }]
5081
+ // ----- test/prefer-import-in-mock -----
5082
+ type TestPreferImportInMock = []|[{
5083
+ fixable?: boolean
5084
+ }]
4921
5085
  // ----- test/prefer-lowercase-title -----
4922
5086
  type TestPreferLowercaseTitle = []|[{
4923
5087
  ignore?: ("describe" | "test" | "it")[]
@@ -5417,6 +5581,11 @@ interface RuleOptions$2 {
5417
5581
  * @see https://typescript-eslint.io/rules/no-unused-expressions
5418
5582
  */
5419
5583
  'ts/no-unused-expressions'?: Linter.RuleEntry<TsNoUnusedExpressions>
5584
+ /**
5585
+ * Disallow unused private class members
5586
+ * @see https://typescript-eslint.io/rules/no-unused-private-class-members
5587
+ */
5588
+ 'ts/no-unused-private-class-members'?: Linter.RuleEntry<[]>
5420
5589
  /**
5421
5590
  * Disallow unused variables
5422
5591
  * @see https://typescript-eslint.io/rules/no-unused-vars
@@ -5432,6 +5601,11 @@ interface RuleOptions$2 {
5432
5601
  * @see https://typescript-eslint.io/rules/no-useless-constructor
5433
5602
  */
5434
5603
  'ts/no-useless-constructor'?: Linter.RuleEntry<[]>
5604
+ /**
5605
+ * Disallow default values that will never be used
5606
+ * @see https://typescript-eslint.io/rules/no-useless-default-assignment
5607
+ */
5608
+ 'ts/no-useless-default-assignment'?: Linter.RuleEntry<TsNoUselessDefaultAssignment>
5435
5609
  /**
5436
5610
  * Disallow empty exports that don't change anything in a module file
5437
5611
  * @see https://typescript-eslint.io/rules/no-useless-empty-export
@@ -5605,6 +5779,11 @@ interface RuleOptions$2 {
5605
5779
  * @see https://typescript-eslint.io/rules/strict-boolean-expressions
5606
5780
  */
5607
5781
  'ts/strict-boolean-expressions'?: Linter.RuleEntry<TsStrictBooleanExpressions>
5782
+ /**
5783
+ * Disallow passing a value-returning function in a position accepting a void function
5784
+ * @see https://typescript-eslint.io/rules/strict-void-return
5785
+ */
5786
+ 'ts/strict-void-return'?: Linter.RuleEntry<TsStrictVoidReturn>
5608
5787
  /**
5609
5788
  * Require switch-case statements to be exhaustive
5610
5789
  * @see https://typescript-eslint.io/rules/switch-exhaustiveness-check
@@ -6499,6 +6678,11 @@ type TsNoUnusedVars = []|[(("all" | "local") | {
6499
6678
 
6500
6679
  destructuredArrayIgnorePattern?: string
6501
6680
 
6681
+ enableAutofixRemoval?: {
6682
+
6683
+ imports?: boolean
6684
+ }
6685
+
6502
6686
  ignoreClassWithStaticInitBlock?: boolean
6503
6687
 
6504
6688
  ignoreRestSiblings?: boolean
@@ -6528,6 +6712,11 @@ type TsNoUseBeforeDefine = []|[("nofunc" | {
6528
6712
 
6529
6713
  variables?: boolean
6530
6714
  })]
6715
+ // ----- ts/no-useless-default-assignment -----
6716
+ type TsNoUselessDefaultAssignment = []|[{
6717
+
6718
+ allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing?: boolean
6719
+ }]
6531
6720
  // ----- ts/no-var-requires -----
6532
6721
  type TsNoVarRequires = []|[{
6533
6722
 
@@ -6783,6 +6972,11 @@ type TsStrictBooleanExpressions = []|[{
6783
6972
 
6784
6973
  allowString?: boolean
6785
6974
  }]
6975
+ // ----- ts/strict-void-return -----
6976
+ type TsStrictVoidReturn = []|[{
6977
+
6978
+ allowReturnAny?: boolean
6979
+ }]
6786
6980
  // ----- ts/switch-exhaustiveness-check -----
6787
6981
  type TsSwitchExhaustivenessCheck = []|[{
6788
6982
 
@@ -6856,710 +7050,725 @@ declare module 'eslint' {
6856
7050
  interface RuleOptions$1 {
6857
7051
  /**
6858
7052
  * Improve regexes by making them shorter, consistent, and safer.
6859
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/better-regex.md
7053
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/better-regex.md
6860
7054
  */
6861
7055
  'unicorn/better-regex'?: Linter.RuleEntry<UnicornBetterRegex>
6862
7056
  /**
6863
7057
  * Enforce a specific parameter name in catch clauses.
6864
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/catch-error-name.md
7058
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/catch-error-name.md
6865
7059
  */
6866
7060
  'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>
6867
7061
  /**
6868
7062
  * Enforce consistent assertion style with `node:assert`.
6869
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-assert.md
7063
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-assert.md
6870
7064
  */
6871
7065
  'unicorn/consistent-assert'?: Linter.RuleEntry<[]>
6872
7066
  /**
6873
7067
  * Prefer passing `Date` directly to the constructor when cloning.
6874
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-date-clone.md
7068
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-date-clone.md
6875
7069
  */
6876
7070
  'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>
6877
7071
  /**
6878
7072
  * Use destructured variables over properties.
6879
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-destructuring.md
7073
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-destructuring.md
6880
7074
  */
6881
7075
  'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>
6882
7076
  /**
6883
7077
  * Prefer consistent types when spreading a ternary in an array literal.
6884
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-empty-array-spread.md
7078
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-empty-array-spread.md
6885
7079
  */
6886
7080
  'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>
6887
7081
  /**
6888
7082
  * Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
6889
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-existence-index-check.md
7083
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-existence-index-check.md
6890
7084
  */
6891
7085
  'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>
6892
7086
  /**
6893
7087
  * Move function definitions to the highest possible scope.
6894
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/consistent-function-scoping.md
7088
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-function-scoping.md
6895
7089
  */
6896
7090
  'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>
6897
7091
  /**
6898
7092
  * Enforce correct `Error` subclassing.
6899
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/custom-error-definition.md
7093
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/custom-error-definition.md
6900
7094
  */
6901
7095
  'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>
6902
7096
  /**
6903
7097
  * Enforce no spaces between braces.
6904
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/empty-brace-spaces.md
7098
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/empty-brace-spaces.md
6905
7099
  */
6906
7100
  'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>
6907
7101
  /**
6908
7102
  * Enforce passing a `message` value when creating a built-in error.
6909
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/error-message.md
7103
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/error-message.md
6910
7104
  */
6911
7105
  'unicorn/error-message'?: Linter.RuleEntry<[]>
6912
7106
  /**
6913
7107
  * Require escape sequences to use uppercase or lowercase values.
6914
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/escape-case.md
7108
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/escape-case.md
6915
7109
  */
6916
7110
  'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>
6917
7111
  /**
6918
7112
  * Add expiration conditions to TODO comments.
6919
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/expiring-todo-comments.md
7113
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/expiring-todo-comments.md
6920
7114
  */
6921
7115
  'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>
6922
7116
  /**
6923
7117
  * Enforce explicitly comparing the `length` or `size` property of a value.
6924
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/explicit-length-check.md
7118
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/explicit-length-check.md
6925
7119
  */
6926
7120
  'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>
6927
7121
  /**
6928
7122
  * Enforce a case style for filenames.
6929
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/filename-case.md
7123
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/filename-case.md
6930
7124
  */
6931
7125
  'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>
6932
7126
  /**
6933
7127
  * Enforce specific import styles per module.
6934
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/import-style.md
7128
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/import-style.md
6935
7129
  */
6936
7130
  'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>
6937
7131
  /**
6938
7132
  * Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
6939
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/new-for-builtins.md
7133
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/new-for-builtins.md
6940
7134
  */
6941
7135
  'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>
6942
7136
  /**
6943
7137
  * Enforce specifying rules to disable in `eslint-disable` comments.
6944
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-abusive-eslint-disable.md
7138
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-abusive-eslint-disable.md
6945
7139
  */
6946
7140
  'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>
6947
7141
  /**
6948
7142
  * Disallow recursive access to `this` within getters and setters.
6949
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-accessor-recursion.md
7143
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-accessor-recursion.md
6950
7144
  */
6951
7145
  'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>
6952
7146
  /**
6953
7147
  * Disallow anonymous functions and classes as the default export.
6954
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-anonymous-default-export.md
7148
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-anonymous-default-export.md
6955
7149
  */
6956
7150
  'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>
6957
7151
  /**
6958
7152
  * Prevent passing a function reference directly to iterator methods.
6959
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-callback-reference.md
7153
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-callback-reference.md
6960
7154
  */
6961
7155
  'unicorn/no-array-callback-reference'?: Linter.RuleEntry<[]>
6962
7156
  /**
6963
7157
  * Prefer `for…of` over the `forEach` method.
6964
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-for-each.md
7158
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-for-each.md
6965
7159
  */
6966
7160
  'unicorn/no-array-for-each'?: Linter.RuleEntry<[]>
6967
7161
  /**
6968
7162
  * Disallow using the `this` argument in array methods.
6969
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-method-this-argument.md
7163
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-method-this-argument.md
6970
7164
  */
6971
7165
  'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>
6972
7166
  /**
6973
7167
  * Replaced by `unicorn/prefer-single-call` which covers more cases.
6974
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/deprecated-rules.md#no-array-push-push
7168
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/deprecated-rules.md#no-array-push-push
6975
7169
  * @deprecated
6976
7170
  */
6977
7171
  'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>
6978
7172
  /**
6979
7173
  * Disallow `Array#reduce()` and `Array#reduceRight()`.
6980
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-reduce.md
7174
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-reduce.md
6981
7175
  */
6982
7176
  'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>
6983
7177
  /**
6984
7178
  * Prefer `Array#toReversed()` over `Array#reverse()`.
6985
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-reverse.md
7179
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-reverse.md
6986
7180
  */
6987
7181
  'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>
6988
7182
  /**
6989
7183
  * Prefer `Array#toSorted()` over `Array#sort()`.
6990
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-array-sort.md
7184
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-sort.md
6991
7185
  */
6992
7186
  'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>
6993
7187
  /**
6994
7188
  * Disallow member access from await expression.
6995
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-await-expression-member.md
7189
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-await-expression-member.md
6996
7190
  */
6997
7191
  'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>
6998
7192
  /**
6999
7193
  * Disallow using `await` in `Promise` method parameters.
7000
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-await-in-promise-methods.md
7194
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-await-in-promise-methods.md
7001
7195
  */
7002
7196
  'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>
7003
7197
  /**
7004
7198
  * Do not use leading/trailing space between `console.log` parameters.
7005
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-console-spaces.md
7199
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-console-spaces.md
7006
7200
  */
7007
7201
  'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>
7008
7202
  /**
7009
7203
  * Do not use `document.cookie` directly.
7010
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-document-cookie.md
7204
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-document-cookie.md
7011
7205
  */
7012
7206
  'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>
7013
7207
  /**
7014
7208
  * Disallow empty files.
7015
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-empty-file.md
7209
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-empty-file.md
7016
7210
  */
7017
7211
  'unicorn/no-empty-file'?: Linter.RuleEntry<[]>
7018
7212
  /**
7019
7213
  * Do not use a `for` loop that can be replaced with a `for-of` loop.
7020
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-for-loop.md
7214
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-for-loop.md
7021
7215
  */
7022
7216
  'unicorn/no-for-loop'?: Linter.RuleEntry<[]>
7023
7217
  /**
7024
7218
  * Enforce the use of Unicode escapes instead of hexadecimal escapes.
7025
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-hex-escape.md
7219
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-hex-escape.md
7026
7220
  */
7027
7221
  'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>
7222
+ /**
7223
+ * Disallow immediate mutation after variable assignment.
7224
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-immediate-mutation.md
7225
+ */
7226
+ 'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]>
7028
7227
  /**
7029
7228
  * Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
7030
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/deprecated-rules.md#no-instanceof-array
7229
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/deprecated-rules.md#no-instanceof-array
7031
7230
  * @deprecated
7032
7231
  */
7033
7232
  'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>
7034
7233
  /**
7035
7234
  * Disallow `instanceof` with built-in objects
7036
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-instanceof-builtins.md
7235
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-instanceof-builtins.md
7037
7236
  */
7038
7237
  'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>
7039
7238
  /**
7040
7239
  * Disallow invalid options in `fetch()` and `new Request()`.
7041
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-invalid-fetch-options.md
7240
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-invalid-fetch-options.md
7042
7241
  */
7043
7242
  'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>
7044
7243
  /**
7045
7244
  * Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
7046
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-invalid-remove-event-listener.md
7245
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-invalid-remove-event-listener.md
7047
7246
  */
7048
7247
  'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>
7049
7248
  /**
7050
7249
  * Disallow identifiers starting with `new` or `class`.
7051
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-keyword-prefix.md
7250
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-keyword-prefix.md
7052
7251
  */
7053
7252
  'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>
7054
7253
  /**
7055
7254
  * Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
7056
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/deprecated-rules.md#no-length-as-slice-end
7255
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/deprecated-rules.md#no-length-as-slice-end
7057
7256
  * @deprecated
7058
7257
  */
7059
7258
  'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>
7060
7259
  /**
7061
7260
  * Disallow `if` statements as the only statement in `if` blocks without `else`.
7062
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-lonely-if.md
7261
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-lonely-if.md
7063
7262
  */
7064
7263
  'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>
7065
7264
  /**
7066
7265
  * Disallow a magic number as the `depth` argument in `Array#flat(…).`
7067
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-magic-array-flat-depth.md
7266
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-magic-array-flat-depth.md
7068
7267
  */
7069
7268
  'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>
7070
7269
  /**
7071
7270
  * Disallow named usage of default import and export.
7072
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-named-default.md
7271
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-named-default.md
7073
7272
  */
7074
7273
  'unicorn/no-named-default'?: Linter.RuleEntry<[]>
7075
7274
  /**
7076
7275
  * Disallow negated conditions.
7077
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-negated-condition.md
7276
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-negated-condition.md
7078
7277
  */
7079
7278
  'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>
7080
7279
  /**
7081
7280
  * Disallow negated expression in equality check.
7082
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-negation-in-equality-check.md
7281
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-negation-in-equality-check.md
7083
7282
  */
7084
7283
  'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>
7085
7284
  /**
7086
7285
  * Disallow nested ternary expressions.
7087
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-nested-ternary.md
7286
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-nested-ternary.md
7088
7287
  */
7089
7288
  'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>
7090
7289
  /**
7091
7290
  * Disallow `new Array()`.
7092
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-new-array.md
7291
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-new-array.md
7093
7292
  */
7094
7293
  'unicorn/no-new-array'?: Linter.RuleEntry<[]>
7095
7294
  /**
7096
7295
  * Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
7097
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-new-buffer.md
7296
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-new-buffer.md
7098
7297
  */
7099
7298
  'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>
7100
7299
  /**
7101
7300
  * Disallow the use of the `null` literal.
7102
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-null.md
7301
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-null.md
7103
7302
  */
7104
7303
  'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>
7105
7304
  /**
7106
7305
  * Disallow the use of objects as default parameters.
7107
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-object-as-default-parameter.md
7306
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-object-as-default-parameter.md
7108
7307
  */
7109
7308
  'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>
7110
7309
  /**
7111
7310
  * Disallow `process.exit()`.
7112
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-process-exit.md
7311
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-process-exit.md
7113
7312
  */
7114
7313
  'unicorn/no-process-exit'?: Linter.RuleEntry<[]>
7115
7314
  /**
7116
7315
  * Disallow passing single-element arrays to `Promise` methods.
7117
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-single-promise-in-promise-methods.md
7316
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-single-promise-in-promise-methods.md
7118
7317
  */
7119
7318
  'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>
7120
7319
  /**
7121
7320
  * Disallow classes that only have static members.
7122
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-static-only-class.md
7321
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-static-only-class.md
7123
7322
  */
7124
7323
  'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>
7125
7324
  /**
7126
7325
  * Disallow `then` property.
7127
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-thenable.md
7326
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-thenable.md
7128
7327
  */
7129
7328
  'unicorn/no-thenable'?: Linter.RuleEntry<[]>
7130
7329
  /**
7131
7330
  * Disallow assigning `this` to a variable.
7132
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-this-assignment.md
7331
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-this-assignment.md
7133
7332
  */
7134
7333
  'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>
7135
7334
  /**
7136
7335
  * Disallow comparing `undefined` using `typeof`.
7137
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-typeof-undefined.md
7336
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-typeof-undefined.md
7138
7337
  */
7139
7338
  'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>
7140
7339
  /**
7141
7340
  * Disallow using `1` as the `depth` argument of `Array#flat()`.
7142
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unnecessary-array-flat-depth.md
7341
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-array-flat-depth.md
7143
7342
  */
7144
7343
  'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>
7145
7344
  /**
7146
7345
  * Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
7147
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unnecessary-array-splice-count.md
7346
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-array-splice-count.md
7148
7347
  */
7149
7348
  'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>
7150
7349
  /**
7151
7350
  * Disallow awaiting non-promise values.
7152
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unnecessary-await.md
7351
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-await.md
7153
7352
  */
7154
7353
  'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>
7155
7354
  /**
7156
7355
  * Enforce the use of built-in methods instead of unnecessary polyfills.
7157
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unnecessary-polyfills.md
7356
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-polyfills.md
7158
7357
  */
7159
7358
  'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>
7160
7359
  /**
7161
7360
  * Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
7162
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unnecessary-slice-end.md
7361
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-slice-end.md
7163
7362
  */
7164
7363
  'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>
7165
7364
  /**
7166
7365
  * Disallow unreadable array destructuring.
7167
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unreadable-array-destructuring.md
7366
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unreadable-array-destructuring.md
7168
7367
  */
7169
7368
  'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<[]>
7170
7369
  /**
7171
7370
  * Disallow unreadable IIFEs.
7172
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unreadable-iife.md
7371
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unreadable-iife.md
7173
7372
  */
7174
7373
  'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>
7175
7374
  /**
7176
7375
  * Disallow unused object properties.
7177
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-unused-properties.md
7376
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unused-properties.md
7178
7377
  */
7179
7378
  'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>
7379
+ /**
7380
+ * Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
7381
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-collection-argument.md
7382
+ */
7383
+ 'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>
7180
7384
  /**
7181
7385
  * Disallow unnecessary `Error.captureStackTrace(…)`.
7182
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-error-capture-stack-trace.md
7386
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-error-capture-stack-trace.md
7183
7387
  */
7184
7388
  'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>
7185
7389
  /**
7186
7390
  * Disallow useless fallback when spreading in object literals.
7187
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-fallback-in-spread.md
7391
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-fallback-in-spread.md
7188
7392
  */
7189
7393
  'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>
7190
7394
  /**
7191
7395
  * Disallow useless array length check.
7192
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-length-check.md
7396
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-length-check.md
7193
7397
  */
7194
7398
  'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>
7195
7399
  /**
7196
7400
  * Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
7197
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-promise-resolve-reject.md
7401
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-promise-resolve-reject.md
7198
7402
  */
7199
7403
  'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>
7200
7404
  /**
7201
7405
  * Disallow unnecessary spread.
7202
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-spread.md
7406
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-spread.md
7203
7407
  */
7204
7408
  'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>
7205
7409
  /**
7206
7410
  * Disallow useless case in switch statements.
7207
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-switch-case.md
7411
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-switch-case.md
7208
7412
  */
7209
7413
  'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>
7210
7414
  /**
7211
7415
  * Disallow useless `undefined`.
7212
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-useless-undefined.md
7416
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-undefined.md
7213
7417
  */
7214
7418
  'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>
7215
7419
  /**
7216
7420
  * Disallow number literals with zero fractions or dangling dots.
7217
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/no-zero-fractions.md
7421
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-zero-fractions.md
7218
7422
  */
7219
7423
  'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>
7220
7424
  /**
7221
7425
  * Enforce proper case for numeric literals.
7222
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/number-literal-case.md
7426
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/number-literal-case.md
7223
7427
  */
7224
7428
  'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>
7225
7429
  /**
7226
7430
  * Enforce the style of numeric separators by correctly grouping digits.
7227
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/numeric-separators-style.md
7431
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/numeric-separators-style.md
7228
7432
  */
7229
7433
  'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>
7230
7434
  /**
7231
7435
  * Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
7232
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-add-event-listener.md
7436
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-add-event-listener.md
7233
7437
  */
7234
7438
  'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>
7235
7439
  /**
7236
7440
  * Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
7237
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-array-find.md
7441
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-find.md
7238
7442
  */
7239
7443
  'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>
7240
7444
  /**
7241
7445
  * Prefer `Array#flat()` over legacy techniques to flatten arrays.
7242
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-array-flat.md
7446
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-flat.md
7243
7447
  */
7244
7448
  'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>
7245
7449
  /**
7246
7450
  * Prefer `.flatMap(…)` over `.map(…).flat()`.
7247
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-array-flat-map.md
7451
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-flat-map.md
7248
7452
  */
7249
7453
  'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>
7250
7454
  /**
7251
7455
  * Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
7252
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-array-index-of.md
7456
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-index-of.md
7253
7457
  */
7254
7458
  'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>
7255
7459
  /**
7256
7460
  * Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
7257
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-array-some.md
7461
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-some.md
7258
7462
  */
7259
7463
  'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>
7260
7464
  /**
7261
7465
  * Prefer `.at()` method for index access and `String#charAt()`.
7262
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-at.md
7466
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-at.md
7263
7467
  */
7264
7468
  'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>
7265
7469
  /**
7266
7470
  * Prefer `BigInt` literals over the constructor.
7267
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-bigint-literals.md
7471
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-bigint-literals.md
7268
7472
  */
7269
7473
  'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>
7270
7474
  /**
7271
7475
  * Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
7272
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-blob-reading-methods.md
7476
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-blob-reading-methods.md
7273
7477
  */
7274
7478
  'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>
7275
7479
  /**
7276
7480
  * Prefer class field declarations over `this` assignments in constructors.
7277
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-class-fields.md
7481
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-class-fields.md
7278
7482
  */
7279
7483
  'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>
7280
7484
  /**
7281
7485
  * Prefer using `Element#classList.toggle()` to toggle class names.
7282
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-classlist-toggle.md
7486
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-classlist-toggle.md
7283
7487
  */
7284
7488
  'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>
7285
7489
  /**
7286
7490
  * Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
7287
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-code-point.md
7491
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-code-point.md
7288
7492
  */
7289
7493
  'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>
7290
7494
  /**
7291
7495
  * Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
7292
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-date-now.md
7496
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-date-now.md
7293
7497
  */
7294
7498
  'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>
7295
7499
  /**
7296
7500
  * Prefer default parameters over reassignment.
7297
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-default-parameters.md
7501
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-default-parameters.md
7298
7502
  */
7299
7503
  'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>
7300
7504
  /**
7301
7505
  * Prefer `Node#append()` over `Node#appendChild()`.
7302
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-dom-node-append.md
7506
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-dom-node-append.md
7303
7507
  */
7304
7508
  'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>
7305
7509
  /**
7306
7510
  * Prefer using `.dataset` on DOM elements over calling attribute methods.
7307
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-dom-node-dataset.md
7511
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-dom-node-dataset.md
7308
7512
  */
7309
7513
  'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>
7310
7514
  /**
7311
7515
  * Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
7312
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-dom-node-remove.md
7516
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-dom-node-remove.md
7313
7517
  */
7314
7518
  'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>
7315
7519
  /**
7316
7520
  * Prefer `.textContent` over `.innerText`.
7317
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-dom-node-text-content.md
7521
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-dom-node-text-content.md
7318
7522
  */
7319
7523
  'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>
7320
7524
  /**
7321
7525
  * Prefer `EventTarget` over `EventEmitter`.
7322
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-event-target.md
7526
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-event-target.md
7323
7527
  */
7324
7528
  'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>
7325
7529
  /**
7326
7530
  * Prefer `export…from` when re-exporting.
7327
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-export-from.md
7531
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-export-from.md
7328
7532
  */
7329
7533
  'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>
7330
7534
  /**
7331
7535
  * Prefer `globalThis` over `window`, `self`, and `global`.
7332
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-global-this.md
7536
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-global-this.md
7333
7537
  */
7334
7538
  'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>
7335
7539
  /**
7336
7540
  * Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
7337
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-import-meta-properties.md
7541
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-import-meta-properties.md
7338
7542
  */
7339
7543
  'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>
7340
7544
  /**
7341
7545
  * Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
7342
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-includes.md
7546
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-includes.md
7343
7547
  */
7344
7548
  'unicorn/prefer-includes'?: Linter.RuleEntry<[]>
7345
7549
  /**
7346
7550
  * Prefer reading a JSON file as a buffer.
7347
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-json-parse-buffer.md
7551
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-json-parse-buffer.md
7348
7552
  */
7349
7553
  'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>
7350
7554
  /**
7351
7555
  * Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
7352
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-keyboard-event-key.md
7556
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-keyboard-event-key.md
7353
7557
  */
7354
7558
  'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>
7355
7559
  /**
7356
7560
  * Prefer using a logical operator over a ternary.
7357
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-logical-operator-over-ternary.md
7561
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-logical-operator-over-ternary.md
7358
7562
  */
7359
7563
  'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>
7360
7564
  /**
7361
7565
  * Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
7362
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-math-min-max.md
7566
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-math-min-max.md
7363
7567
  */
7364
7568
  'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>
7365
7569
  /**
7366
7570
  * Enforce the use of `Math.trunc` instead of bitwise operators.
7367
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-math-trunc.md
7571
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-math-trunc.md
7368
7572
  */
7369
7573
  'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>
7370
7574
  /**
7371
7575
  * Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
7372
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-modern-dom-apis.md
7576
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-modern-dom-apis.md
7373
7577
  */
7374
7578
  'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>
7375
7579
  /**
7376
7580
  * Prefer modern `Math` APIs over legacy patterns.
7377
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-modern-math-apis.md
7581
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-modern-math-apis.md
7378
7582
  */
7379
7583
  'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>
7380
7584
  /**
7381
7585
  * Prefer JavaScript modules (ESM) over CommonJS.
7382
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-module.md
7586
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-module.md
7383
7587
  */
7384
7588
  'unicorn/prefer-module'?: Linter.RuleEntry<[]>
7385
7589
  /**
7386
7590
  * Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
7387
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-native-coercion-functions.md
7591
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-native-coercion-functions.md
7388
7592
  */
7389
7593
  'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>
7390
7594
  /**
7391
7595
  * Prefer negative index over `.length - index` when possible.
7392
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-negative-index.md
7596
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-negative-index.md
7393
7597
  */
7394
7598
  'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>
7395
7599
  /**
7396
7600
  * Prefer using the `node:` protocol when importing Node.js builtin modules.
7397
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-node-protocol.md
7601
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-node-protocol.md
7398
7602
  */
7399
7603
  'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>
7400
7604
  /**
7401
7605
  * Prefer `Number` static properties over global ones.
7402
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-number-properties.md
7606
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-number-properties.md
7403
7607
  */
7404
7608
  'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>
7405
7609
  /**
7406
7610
  * Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
7407
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-object-from-entries.md
7611
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-object-from-entries.md
7408
7612
  */
7409
7613
  'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>
7410
7614
  /**
7411
7615
  * Prefer omitting the `catch` binding parameter.
7412
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-optional-catch-binding.md
7616
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-optional-catch-binding.md
7413
7617
  */
7414
7618
  'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>
7415
7619
  /**
7416
7620
  * Prefer borrowing methods from the prototype instead of the instance.
7417
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-prototype-methods.md
7621
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-prototype-methods.md
7418
7622
  */
7419
7623
  'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>
7420
7624
  /**
7421
7625
  * Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`.
7422
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-query-selector.md
7626
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-query-selector.md
7423
7627
  */
7424
7628
  'unicorn/prefer-query-selector'?: Linter.RuleEntry<[]>
7425
7629
  /**
7426
7630
  * Prefer `Reflect.apply()` over `Function#apply()`.
7427
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-reflect-apply.md
7631
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-reflect-apply.md
7428
7632
  */
7429
7633
  'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>
7430
7634
  /**
7431
7635
  * Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
7432
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-regexp-test.md
7636
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-regexp-test.md
7433
7637
  */
7434
7638
  'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>
7639
+ /**
7640
+ * Prefer `Response.json()` over `new Response(JSON.stringify())`.
7641
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-response-static-json.md
7642
+ */
7643
+ 'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>
7435
7644
  /**
7436
7645
  * Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
7437
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-set-has.md
7646
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-set-has.md
7438
7647
  */
7439
7648
  'unicorn/prefer-set-has'?: Linter.RuleEntry<[]>
7440
7649
  /**
7441
7650
  * Prefer using `Set#size` instead of `Array#length`.
7442
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-set-size.md
7651
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-set-size.md
7443
7652
  */
7444
7653
  'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>
7445
7654
  /**
7446
7655
  * Enforce combining multiple `Array#push()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
7447
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-single-call.md
7656
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-single-call.md
7448
7657
  */
7449
7658
  'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>
7450
7659
  /**
7451
7660
  * Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
7452
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-spread.md
7661
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-spread.md
7453
7662
  */
7454
7663
  'unicorn/prefer-spread'?: Linter.RuleEntry<[]>
7455
7664
  /**
7456
7665
  * Prefer using the `String.raw` tag to avoid escaping `\`.
7457
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-string-raw.md
7666
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-raw.md
7458
7667
  */
7459
7668
  'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>
7460
7669
  /**
7461
7670
  * Prefer `String#replaceAll()` over regex searches with the global flag.
7462
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-string-replace-all.md
7671
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-replace-all.md
7463
7672
  */
7464
7673
  'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>
7465
7674
  /**
7466
7675
  * Prefer `String#slice()` over `String#substr()` and `String#substring()`.
7467
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-string-slice.md
7676
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-slice.md
7468
7677
  */
7469
7678
  'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>
7470
7679
  /**
7471
7680
  * Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
7472
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-string-starts-ends-with.md
7681
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-starts-ends-with.md
7473
7682
  */
7474
7683
  'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>
7475
7684
  /**
7476
7685
  * Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
7477
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-string-trim-start-end.md
7686
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-trim-start-end.md
7478
7687
  */
7479
7688
  'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>
7480
7689
  /**
7481
7690
  * Prefer using `structuredClone` to create a deep clone.
7482
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-structured-clone.md
7691
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-structured-clone.md
7483
7692
  */
7484
7693
  'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>
7485
7694
  /**
7486
7695
  * Prefer `switch` over multiple `else-if`.
7487
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-switch.md
7696
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-switch.md
7488
7697
  */
7489
7698
  'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>
7490
7699
  /**
7491
7700
  * Prefer ternary expressions over simple `if-else` statements.
7492
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-ternary.md
7701
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-ternary.md
7493
7702
  */
7494
7703
  'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>
7495
7704
  /**
7496
7705
  * Prefer top-level await over top-level promises and async function calls.
7497
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-top-level-await.md
7706
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-top-level-await.md
7498
7707
  */
7499
7708
  'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>
7500
7709
  /**
7501
7710
  * Enforce throwing `TypeError` in type checking conditions.
7502
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prefer-type-error.md
7711
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-type-error.md
7503
7712
  */
7504
7713
  'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>
7505
7714
  /**
7506
7715
  * Prevent abbreviations.
7507
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/prevent-abbreviations.md
7716
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prevent-abbreviations.md
7508
7717
  */
7509
7718
  'unicorn/prevent-abbreviations'?: Linter.RuleEntry<UnicornPreventAbbreviations>
7510
7719
  /**
7511
7720
  * Enforce consistent relative URL style.
7512
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/relative-url-style.md
7721
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/relative-url-style.md
7513
7722
  */
7514
7723
  'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>
7515
7724
  /**
7516
7725
  * Enforce using the separator argument with `Array#join()`.
7517
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/require-array-join-separator.md
7726
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-array-join-separator.md
7518
7727
  */
7519
7728
  'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>
7520
7729
  /**
7521
7730
  * Require non-empty module attributes for imports and exports
7522
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/require-module-attributes.md
7731
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-module-attributes.md
7523
7732
  */
7524
7733
  'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>
7525
7734
  /**
7526
7735
  * Require non-empty specifier list in import and export statements.
7527
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/require-module-specifiers.md
7736
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-module-specifiers.md
7528
7737
  */
7529
7738
  'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>
7530
7739
  /**
7531
7740
  * Enforce using the digits argument with `Number#toFixed()`.
7532
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/require-number-to-fixed-digits-argument.md
7741
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-number-to-fixed-digits-argument.md
7533
7742
  */
7534
7743
  'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>
7535
7744
  /**
7536
7745
  * Enforce using the `targetOrigin` argument with `window.postMessage()`.
7537
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/require-post-message-target-origin.md
7746
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-post-message-target-origin.md
7538
7747
  */
7539
7748
  'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>
7540
7749
  /**
7541
7750
  * Enforce better string content.
7542
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/string-content.md
7751
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/string-content.md
7543
7752
  */
7544
7753
  'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>
7545
7754
  /**
7546
7755
  * Enforce consistent brace style for `case` clauses.
7547
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/switch-case-braces.md
7756
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/switch-case-braces.md
7548
7757
  */
7549
7758
  'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>
7550
7759
  /**
7551
7760
  * Fix whitespace-insensitive template indentation.
7552
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/template-indent.md
7761
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/template-indent.md
7553
7762
  */
7554
7763
  'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>
7555
7764
  /**
7556
7765
  * Enforce consistent case for text encoding identifiers.
7557
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/text-encoding-identifier-case.md
7766
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/text-encoding-identifier-case.md
7558
7767
  */
7559
- 'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<[]>
7768
+ 'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>
7560
7769
  /**
7561
7770
  * Require `new` when creating an error.
7562
- * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v61.0.2/docs/rules/throw-new-error.md
7771
+ * @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/throw-new-error.md
7563
7772
  */
7564
7773
  'unicorn/throw-new-error'?: Linter.RuleEntry<[]>
7565
7774
  }
@@ -7784,6 +7993,10 @@ type UnicornTemplateIndent = []|[{
7784
7993
  selectors?: string[]
7785
7994
  comments?: string[]
7786
7995
  }]
7996
+ // ----- unicorn/text-encoding-identifier-case -----
7997
+ type UnicornTextEncodingIdentifierCase = []|[{
7998
+ withDash?: boolean
7999
+ }]
7787
8000
 
7788
8001
  declare function unicorn(options?: unicorn.Options): Promise<[Config, Config, Config]>;
7789
8002
  declare namespace unicorn {