@lincy/eslint-config 6.0.0 → 6.1.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.cjs +101 -25
- package/dist/index.d.cts +330 -149
- package/dist/index.d.ts +330 -149
- package/dist/index.js +97 -23
- package/dist/{lib-DMY_mkdT.js → lib-CEKTiw7V.js} +827 -612
- package/dist/{lib-B2tdYoXA.cjs → lib-DS4wQk2J.cjs} +827 -612
- package/package.json +43 -46
package/dist/index.d.cts
CHANGED
|
@@ -689,6 +689,11 @@ interface RuleOptions {
|
|
|
689
689
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-property-type.md#repos-sticky-header
|
|
690
690
|
*/
|
|
691
691
|
'jsdoc/require-property-type'?: Linter.RuleEntry<[]>;
|
|
692
|
+
/**
|
|
693
|
+
* Requires that Promise rejections are documented with `@rejects` tags.
|
|
694
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-rejects.md#repos-sticky-header
|
|
695
|
+
*/
|
|
696
|
+
'jsdoc/require-rejects'?: Linter.RuleEntry<JsdocRequireRejects>;
|
|
692
697
|
/**
|
|
693
698
|
* Requires that returns are documented with `@returns`.
|
|
694
699
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/require-returns.md#repos-sticky-header
|
|
@@ -774,6 +779,26 @@ interface RuleOptions {
|
|
|
774
779
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/text-escaping.md#repos-sticky-header
|
|
775
780
|
*/
|
|
776
781
|
'jsdoc/text-escaping'?: Linter.RuleEntry<JsdocTextEscaping>;
|
|
782
|
+
/**
|
|
783
|
+
* Prefers either function properties or method signatures
|
|
784
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/ts-method-signature-style.md#repos-sticky-header
|
|
785
|
+
*/
|
|
786
|
+
'jsdoc/ts-method-signature-style'?: Linter.RuleEntry<JsdocTsMethodSignatureStyle>;
|
|
787
|
+
/**
|
|
788
|
+
* Warns against use of the empty object type
|
|
789
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/ts-no-empty-object-type.md#repos-sticky-header
|
|
790
|
+
*/
|
|
791
|
+
'jsdoc/ts-no-empty-object-type'?: Linter.RuleEntry<[]>;
|
|
792
|
+
/**
|
|
793
|
+
* Catches unnecessary template expressions such as string expressions within a template literal.
|
|
794
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/ts-no-unnecessary-template-expression.md#repos-sticky-header
|
|
795
|
+
*/
|
|
796
|
+
'jsdoc/ts-no-unnecessary-template-expression'?: Linter.RuleEntry<JsdocTsNoUnnecessaryTemplateExpression>;
|
|
797
|
+
/**
|
|
798
|
+
* Prefers function types over call signatures when there are no other properties.
|
|
799
|
+
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/ts-prefer-function-type.md#repos-sticky-header
|
|
800
|
+
*/
|
|
801
|
+
'jsdoc/ts-prefer-function-type'?: Linter.RuleEntry<JsdocTsPreferFunctionType>;
|
|
777
802
|
/**
|
|
778
803
|
* Formats JSDoc type values.
|
|
779
804
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/type-formatting.md#repos-sticky-header
|
|
@@ -2724,7 +2749,7 @@ interface RuleOptions {
|
|
|
2724
2749
|
*/
|
|
2725
2750
|
'react-hooks/use-memo'?: Linter.RuleEntry<ReactHooksUseMemo>;
|
|
2726
2751
|
/**
|
|
2727
|
-
* Validates that useMemos always return a value. See [`useMemo()` docs](https://react.dev/reference/react/useMemo) for more information.
|
|
2752
|
+
* Validates that useMemos always return a value and that the result of the useMemo is used by the component/hook. See [`useMemo()` docs](https://react.dev/reference/react/useMemo) for more information.
|
|
2728
2753
|
*/
|
|
2729
2754
|
'react-hooks/void-use-memo'?: Linter.RuleEntry<ReactHooksVoidUseMemo>;
|
|
2730
2755
|
/**
|
|
@@ -2773,6 +2798,11 @@ interface RuleOptions {
|
|
|
2773
2798
|
* @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-timeout
|
|
2774
2799
|
*/
|
|
2775
2800
|
'react-web-api/no-leaked-timeout'?: Linter.RuleEntry<[]>;
|
|
2801
|
+
/**
|
|
2802
|
+
* Prevents dollar signs from being inserted as text nodes before expressions.
|
|
2803
|
+
* @see https://eslint-react.xyz/docs/rules/jsx-dollar
|
|
2804
|
+
*/
|
|
2805
|
+
'react/jsx-dollar'?: Linter.RuleEntry<[]>;
|
|
2776
2806
|
/**
|
|
2777
2807
|
* Enforces that the 'key' prop is placed before the spread prop in JSX elements.
|
|
2778
2808
|
* @see https://eslint-react.xyz/docs/rules/jsx-key-before-spread
|
|
@@ -2911,6 +2941,7 @@ interface RuleOptions {
|
|
|
2911
2941
|
/**
|
|
2912
2942
|
* Disallow certain props on components.
|
|
2913
2943
|
* @see https://eslint-react.xyz/docs/rules/no-forbidden-props
|
|
2944
|
+
* @deprecated
|
|
2914
2945
|
*/
|
|
2915
2946
|
'react/no-forbidden-props'?: Linter.RuleEntry<ReactNoForbiddenProps>;
|
|
2916
2947
|
/**
|
|
@@ -3032,7 +3063,7 @@ interface RuleOptions {
|
|
|
3032
3063
|
* Prevents using referential-type values as default props in object destructuring.
|
|
3033
3064
|
* @see https://eslint-react.xyz/docs/rules/no-unstable-default-props
|
|
3034
3065
|
*/
|
|
3035
|
-
'react/no-unstable-default-props'?: Linter.RuleEntry<
|
|
3066
|
+
'react/no-unstable-default-props'?: Linter.RuleEntry<ReactNoUnstableDefaultProps>;
|
|
3036
3067
|
/**
|
|
3037
3068
|
* Warns unused class component methods and properties.
|
|
3038
3069
|
* @see https://eslint-react.xyz/docs/rules/no-unused-class-component-members
|
|
@@ -3663,6 +3694,11 @@ interface RuleOptions {
|
|
|
3663
3694
|
* @see https://eslint.style/rules/eol-last
|
|
3664
3695
|
*/
|
|
3665
3696
|
'style/eol-last'?: Linter.RuleEntry<StyleEolLast>;
|
|
3697
|
+
/**
|
|
3698
|
+
* Enforce consistent spacing and line break styles inside brackets.
|
|
3699
|
+
* @see https://eslint.style/rules/list-style
|
|
3700
|
+
*/
|
|
3701
|
+
'style/exp-list-style'?: Linter.RuleEntry<StyleExpListStyle>;
|
|
3666
3702
|
/**
|
|
3667
3703
|
* Enforce line breaks between arguments of a function call
|
|
3668
3704
|
* @see https://eslint.style/rules/function-call-argument-newline
|
|
@@ -4093,6 +4129,11 @@ interface RuleOptions {
|
|
|
4093
4129
|
* @deprecated
|
|
4094
4130
|
*/
|
|
4095
4131
|
'template-tag-spacing'?: Linter.RuleEntry<TemplateTagSpacing>;
|
|
4132
|
+
/**
|
|
4133
|
+
* enforce using `.each` or `.for` consistently
|
|
4134
|
+
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/consistent-each-for.md
|
|
4135
|
+
*/
|
|
4136
|
+
'test/consistent-each-for'?: Linter.RuleEntry<TestConsistentEachFor>;
|
|
4096
4137
|
/**
|
|
4097
4138
|
* require test file pattern
|
|
4098
4139
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/consistent-test-filename.md
|
|
@@ -4315,7 +4356,7 @@ interface RuleOptions {
|
|
|
4315
4356
|
*/
|
|
4316
4357
|
'test/prefer-each'?: Linter.RuleEntry<[]>;
|
|
4317
4358
|
/**
|
|
4318
|
-
* enforce using the built-in
|
|
4359
|
+
* enforce using the built-in equality matchers
|
|
4319
4360
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-equality-matcher.md
|
|
4320
4361
|
*/
|
|
4321
4362
|
'test/prefer-equality-matcher'?: Linter.RuleEntry<[]>;
|
|
@@ -4424,11 +4465,21 @@ interface RuleOptions {
|
|
|
4424
4465
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-vi-mocked.md
|
|
4425
4466
|
*/
|
|
4426
4467
|
'test/prefer-vi-mocked'?: Linter.RuleEntry<[]>;
|
|
4468
|
+
/**
|
|
4469
|
+
* ensure that every `expect.poll` call is awaited
|
|
4470
|
+
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-awaited-expect-poll.md
|
|
4471
|
+
*/
|
|
4472
|
+
'test/require-awaited-expect-poll'?: Linter.RuleEntry<[]>;
|
|
4427
4473
|
/**
|
|
4428
4474
|
* require setup and teardown to be within a hook
|
|
4429
4475
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-hook.md
|
|
4430
4476
|
*/
|
|
4431
4477
|
'test/require-hook'?: Linter.RuleEntry<TestRequireHook>;
|
|
4478
|
+
/**
|
|
4479
|
+
* require usage of import in vi.mock()
|
|
4480
|
+
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-import-vi-mock.md
|
|
4481
|
+
*/
|
|
4482
|
+
'test/require-import-vi-mock'?: Linter.RuleEntry<[]>;
|
|
4432
4483
|
/**
|
|
4433
4484
|
* require local Test Context for concurrent snapshot tests
|
|
4434
4485
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-local-test-context-for-concurrent-snapshots.md
|
|
@@ -5028,6 +5079,11 @@ interface RuleOptions {
|
|
|
5028
5079
|
* @see https://typescript-eslint.io/rules/no-unused-expressions
|
|
5029
5080
|
*/
|
|
5030
5081
|
'ts/no-unused-expressions'?: Linter.RuleEntry<TsNoUnusedExpressions>;
|
|
5082
|
+
/**
|
|
5083
|
+
* Disallow unused private class members
|
|
5084
|
+
* @see https://typescript-eslint.io/rules/no-unused-private-class-members
|
|
5085
|
+
*/
|
|
5086
|
+
'ts/no-unused-private-class-members'?: Linter.RuleEntry<[]>;
|
|
5031
5087
|
/**
|
|
5032
5088
|
* Disallow unused variables
|
|
5033
5089
|
* @see https://typescript-eslint.io/rules/no-unused-vars
|
|
@@ -5254,710 +5310,725 @@ interface RuleOptions {
|
|
|
5254
5310
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
|
|
5255
5311
|
/**
|
|
5256
5312
|
* Improve regexes by making them shorter, consistent, and safer.
|
|
5257
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5313
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/better-regex.md
|
|
5258
5314
|
*/
|
|
5259
5315
|
'unicorn/better-regex'?: Linter.RuleEntry<UnicornBetterRegex>;
|
|
5260
5316
|
/**
|
|
5261
5317
|
* Enforce a specific parameter name in catch clauses.
|
|
5262
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5318
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/catch-error-name.md
|
|
5263
5319
|
*/
|
|
5264
5320
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
5265
5321
|
/**
|
|
5266
5322
|
* Enforce consistent assertion style with `node:assert`.
|
|
5267
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5323
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-assert.md
|
|
5268
5324
|
*/
|
|
5269
5325
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
5270
5326
|
/**
|
|
5271
5327
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
5272
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5328
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-date-clone.md
|
|
5273
5329
|
*/
|
|
5274
5330
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
5275
5331
|
/**
|
|
5276
5332
|
* Use destructured variables over properties.
|
|
5277
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5333
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-destructuring.md
|
|
5278
5334
|
*/
|
|
5279
5335
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
5280
5336
|
/**
|
|
5281
5337
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
5282
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5338
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-empty-array-spread.md
|
|
5283
5339
|
*/
|
|
5284
5340
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
5285
5341
|
/**
|
|
5286
5342
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
5287
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5343
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-existence-index-check.md
|
|
5288
5344
|
*/
|
|
5289
5345
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
5290
5346
|
/**
|
|
5291
5347
|
* Move function definitions to the highest possible scope.
|
|
5292
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5348
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-function-scoping.md
|
|
5293
5349
|
*/
|
|
5294
5350
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
5295
5351
|
/**
|
|
5296
5352
|
* Enforce correct `Error` subclassing.
|
|
5297
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5353
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/custom-error-definition.md
|
|
5298
5354
|
*/
|
|
5299
5355
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
5300
5356
|
/**
|
|
5301
5357
|
* Enforce no spaces between braces.
|
|
5302
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5358
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/empty-brace-spaces.md
|
|
5303
5359
|
*/
|
|
5304
5360
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
5305
5361
|
/**
|
|
5306
5362
|
* Enforce passing a `message` value when creating a built-in error.
|
|
5307
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5363
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/error-message.md
|
|
5308
5364
|
*/
|
|
5309
5365
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
5310
5366
|
/**
|
|
5311
5367
|
* Require escape sequences to use uppercase or lowercase values.
|
|
5312
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5368
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/escape-case.md
|
|
5313
5369
|
*/
|
|
5314
5370
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
5315
5371
|
/**
|
|
5316
5372
|
* Add expiration conditions to TODO comments.
|
|
5317
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5373
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/expiring-todo-comments.md
|
|
5318
5374
|
*/
|
|
5319
5375
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
5320
5376
|
/**
|
|
5321
5377
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
5322
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5378
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/explicit-length-check.md
|
|
5323
5379
|
*/
|
|
5324
5380
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
5325
5381
|
/**
|
|
5326
5382
|
* Enforce a case style for filenames.
|
|
5327
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5383
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/filename-case.md
|
|
5328
5384
|
*/
|
|
5329
5385
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
5330
5386
|
/**
|
|
5331
5387
|
* Enforce specific import styles per module.
|
|
5332
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5388
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/import-style.md
|
|
5333
5389
|
*/
|
|
5334
5390
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
5335
5391
|
/**
|
|
5336
5392
|
* Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
|
|
5337
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5393
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/new-for-builtins.md
|
|
5338
5394
|
*/
|
|
5339
5395
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
5340
5396
|
/**
|
|
5341
5397
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
5342
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5398
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
5343
5399
|
*/
|
|
5344
5400
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
5345
5401
|
/**
|
|
5346
5402
|
* Disallow recursive access to `this` within getters and setters.
|
|
5347
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5403
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-accessor-recursion.md
|
|
5348
5404
|
*/
|
|
5349
5405
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
5350
5406
|
/**
|
|
5351
5407
|
* Disallow anonymous functions and classes as the default export.
|
|
5352
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5408
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-anonymous-default-export.md
|
|
5353
5409
|
*/
|
|
5354
5410
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
5355
5411
|
/**
|
|
5356
5412
|
* Prevent passing a function reference directly to iterator methods.
|
|
5357
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5413
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-callback-reference.md
|
|
5358
5414
|
*/
|
|
5359
5415
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<[]>;
|
|
5360
5416
|
/**
|
|
5361
5417
|
* Prefer `for…of` over the `forEach` method.
|
|
5362
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5418
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-for-each.md
|
|
5363
5419
|
*/
|
|
5364
5420
|
'unicorn/no-array-for-each'?: Linter.RuleEntry<[]>;
|
|
5365
5421
|
/**
|
|
5366
5422
|
* Disallow using the `this` argument in array methods.
|
|
5367
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5423
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-method-this-argument.md
|
|
5368
5424
|
*/
|
|
5369
5425
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
5370
5426
|
/**
|
|
5371
5427
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
5372
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5428
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/deprecated-rules.md#no-array-push-push
|
|
5373
5429
|
* @deprecated
|
|
5374
5430
|
*/
|
|
5375
5431
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
5376
5432
|
/**
|
|
5377
5433
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
5378
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5434
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-reduce.md
|
|
5379
5435
|
*/
|
|
5380
5436
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
5381
5437
|
/**
|
|
5382
5438
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
5383
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5439
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-reverse.md
|
|
5384
5440
|
*/
|
|
5385
5441
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
5386
5442
|
/**
|
|
5387
5443
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
5388
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5444
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-sort.md
|
|
5389
5445
|
*/
|
|
5390
5446
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
5391
5447
|
/**
|
|
5392
5448
|
* Disallow member access from await expression.
|
|
5393
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5449
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-await-expression-member.md
|
|
5394
5450
|
*/
|
|
5395
5451
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
5396
5452
|
/**
|
|
5397
5453
|
* Disallow using `await` in `Promise` method parameters.
|
|
5398
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5454
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-await-in-promise-methods.md
|
|
5399
5455
|
*/
|
|
5400
5456
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
5401
5457
|
/**
|
|
5402
5458
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
5403
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5459
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-console-spaces.md
|
|
5404
5460
|
*/
|
|
5405
5461
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
5406
5462
|
/**
|
|
5407
5463
|
* Do not use `document.cookie` directly.
|
|
5408
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5464
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-document-cookie.md
|
|
5409
5465
|
*/
|
|
5410
5466
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
5411
5467
|
/**
|
|
5412
5468
|
* Disallow empty files.
|
|
5413
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5469
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-empty-file.md
|
|
5414
5470
|
*/
|
|
5415
5471
|
'unicorn/no-empty-file'?: Linter.RuleEntry<[]>;
|
|
5416
5472
|
/**
|
|
5417
5473
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
5418
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5474
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-for-loop.md
|
|
5419
5475
|
*/
|
|
5420
5476
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
5421
5477
|
/**
|
|
5422
5478
|
* Enforce the use of Unicode escapes instead of hexadecimal escapes.
|
|
5423
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5479
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-hex-escape.md
|
|
5424
5480
|
*/
|
|
5425
5481
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
5482
|
+
/**
|
|
5483
|
+
* Disallow immediate mutation after variable assignment.
|
|
5484
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-immediate-mutation.md
|
|
5485
|
+
*/
|
|
5486
|
+
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]>;
|
|
5426
5487
|
/**
|
|
5427
5488
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
5428
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5489
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/deprecated-rules.md#no-instanceof-array
|
|
5429
5490
|
* @deprecated
|
|
5430
5491
|
*/
|
|
5431
5492
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
5432
5493
|
/**
|
|
5433
5494
|
* Disallow `instanceof` with built-in objects
|
|
5434
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5495
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-instanceof-builtins.md
|
|
5435
5496
|
*/
|
|
5436
5497
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
5437
5498
|
/**
|
|
5438
5499
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
5439
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5500
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-invalid-fetch-options.md
|
|
5440
5501
|
*/
|
|
5441
5502
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
5442
5503
|
/**
|
|
5443
5504
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
5444
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5505
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
5445
5506
|
*/
|
|
5446
5507
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
5447
5508
|
/**
|
|
5448
5509
|
* Disallow identifiers starting with `new` or `class`.
|
|
5449
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5510
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-keyword-prefix.md
|
|
5450
5511
|
*/
|
|
5451
5512
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
5452
5513
|
/**
|
|
5453
5514
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
5454
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5515
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/deprecated-rules.md#no-length-as-slice-end
|
|
5455
5516
|
* @deprecated
|
|
5456
5517
|
*/
|
|
5457
5518
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
5458
5519
|
/**
|
|
5459
5520
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
5460
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5521
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-lonely-if.md
|
|
5461
5522
|
*/
|
|
5462
5523
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
5463
5524
|
/**
|
|
5464
5525
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
5465
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5526
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
5466
5527
|
*/
|
|
5467
5528
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
5468
5529
|
/**
|
|
5469
5530
|
* Disallow named usage of default import and export.
|
|
5470
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5531
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-named-default.md
|
|
5471
5532
|
*/
|
|
5472
5533
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
5473
5534
|
/**
|
|
5474
5535
|
* Disallow negated conditions.
|
|
5475
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5536
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-negated-condition.md
|
|
5476
5537
|
*/
|
|
5477
5538
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
5478
5539
|
/**
|
|
5479
5540
|
* Disallow negated expression in equality check.
|
|
5480
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5541
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-negation-in-equality-check.md
|
|
5481
5542
|
*/
|
|
5482
5543
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
5483
5544
|
/**
|
|
5484
5545
|
* Disallow nested ternary expressions.
|
|
5485
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5546
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-nested-ternary.md
|
|
5486
5547
|
*/
|
|
5487
5548
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
5488
5549
|
/**
|
|
5489
5550
|
* Disallow `new Array()`.
|
|
5490
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5551
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-new-array.md
|
|
5491
5552
|
*/
|
|
5492
5553
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
5493
5554
|
/**
|
|
5494
5555
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
5495
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5556
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-new-buffer.md
|
|
5496
5557
|
*/
|
|
5497
5558
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
5498
5559
|
/**
|
|
5499
5560
|
* Disallow the use of the `null` literal.
|
|
5500
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5561
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-null.md
|
|
5501
5562
|
*/
|
|
5502
5563
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
5503
5564
|
/**
|
|
5504
5565
|
* Disallow the use of objects as default parameters.
|
|
5505
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5566
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-object-as-default-parameter.md
|
|
5506
5567
|
*/
|
|
5507
5568
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
5508
5569
|
/**
|
|
5509
5570
|
* Disallow `process.exit()`.
|
|
5510
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5571
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-process-exit.md
|
|
5511
5572
|
*/
|
|
5512
5573
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
5513
5574
|
/**
|
|
5514
5575
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
5515
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5576
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
5516
5577
|
*/
|
|
5517
5578
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
5518
5579
|
/**
|
|
5519
5580
|
* Disallow classes that only have static members.
|
|
5520
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5581
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-static-only-class.md
|
|
5521
5582
|
*/
|
|
5522
5583
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
5523
5584
|
/**
|
|
5524
5585
|
* Disallow `then` property.
|
|
5525
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5586
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-thenable.md
|
|
5526
5587
|
*/
|
|
5527
5588
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
5528
5589
|
/**
|
|
5529
5590
|
* Disallow assigning `this` to a variable.
|
|
5530
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5591
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-this-assignment.md
|
|
5531
5592
|
*/
|
|
5532
5593
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
5533
5594
|
/**
|
|
5534
5595
|
* Disallow comparing `undefined` using `typeof`.
|
|
5535
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5596
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-typeof-undefined.md
|
|
5536
5597
|
*/
|
|
5537
5598
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
5538
5599
|
/**
|
|
5539
5600
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
5540
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5601
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
5541
5602
|
*/
|
|
5542
5603
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
5543
5604
|
/**
|
|
5544
5605
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
5545
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5606
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
5546
5607
|
*/
|
|
5547
5608
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
5548
5609
|
/**
|
|
5549
5610
|
* Disallow awaiting non-promise values.
|
|
5550
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5611
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-await.md
|
|
5551
5612
|
*/
|
|
5552
5613
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
5553
5614
|
/**
|
|
5554
5615
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
5555
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5616
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
5556
5617
|
*/
|
|
5557
5618
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
5558
5619
|
/**
|
|
5559
5620
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
5560
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5621
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
5561
5622
|
*/
|
|
5562
5623
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
5563
5624
|
/**
|
|
5564
5625
|
* Disallow unreadable array destructuring.
|
|
5565
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5626
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
5566
5627
|
*/
|
|
5567
5628
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<[]>;
|
|
5568
5629
|
/**
|
|
5569
5630
|
* Disallow unreadable IIFEs.
|
|
5570
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5631
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unreadable-iife.md
|
|
5571
5632
|
*/
|
|
5572
5633
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
5573
5634
|
/**
|
|
5574
5635
|
* Disallow unused object properties.
|
|
5575
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5636
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unused-properties.md
|
|
5576
5637
|
*/
|
|
5577
5638
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
5639
|
+
/**
|
|
5640
|
+
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
5641
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-collection-argument.md
|
|
5642
|
+
*/
|
|
5643
|
+
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
|
|
5578
5644
|
/**
|
|
5579
5645
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
5580
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5646
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
5581
5647
|
*/
|
|
5582
5648
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
5583
5649
|
/**
|
|
5584
5650
|
* Disallow useless fallback when spreading in object literals.
|
|
5585
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5651
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
5586
5652
|
*/
|
|
5587
5653
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
5588
5654
|
/**
|
|
5589
5655
|
* Disallow useless array length check.
|
|
5590
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5656
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-length-check.md
|
|
5591
5657
|
*/
|
|
5592
5658
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
5593
5659
|
/**
|
|
5594
5660
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
5595
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5661
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
5596
5662
|
*/
|
|
5597
5663
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
5598
5664
|
/**
|
|
5599
5665
|
* Disallow unnecessary spread.
|
|
5600
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5666
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-spread.md
|
|
5601
5667
|
*/
|
|
5602
5668
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
5603
5669
|
/**
|
|
5604
5670
|
* Disallow useless case in switch statements.
|
|
5605
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5671
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-switch-case.md
|
|
5606
5672
|
*/
|
|
5607
5673
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
5608
5674
|
/**
|
|
5609
5675
|
* Disallow useless `undefined`.
|
|
5610
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5676
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-undefined.md
|
|
5611
5677
|
*/
|
|
5612
5678
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
5613
5679
|
/**
|
|
5614
5680
|
* Disallow number literals with zero fractions or dangling dots.
|
|
5615
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5681
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-zero-fractions.md
|
|
5616
5682
|
*/
|
|
5617
5683
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
5618
5684
|
/**
|
|
5619
5685
|
* Enforce proper case for numeric literals.
|
|
5620
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5686
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/number-literal-case.md
|
|
5621
5687
|
*/
|
|
5622
5688
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
5623
5689
|
/**
|
|
5624
5690
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
5625
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5691
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/numeric-separators-style.md
|
|
5626
5692
|
*/
|
|
5627
5693
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
5628
5694
|
/**
|
|
5629
5695
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
5630
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5696
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-add-event-listener.md
|
|
5631
5697
|
*/
|
|
5632
5698
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
5633
5699
|
/**
|
|
5634
5700
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
5635
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5701
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-find.md
|
|
5636
5702
|
*/
|
|
5637
5703
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
5638
5704
|
/**
|
|
5639
5705
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
5640
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5706
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-flat.md
|
|
5641
5707
|
*/
|
|
5642
5708
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
5643
5709
|
/**
|
|
5644
5710
|
* Prefer `.flatMap(…)` over `.map(…).flat()`.
|
|
5645
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5711
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-flat-map.md
|
|
5646
5712
|
*/
|
|
5647
5713
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
5648
5714
|
/**
|
|
5649
5715
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
5650
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5716
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-index-of.md
|
|
5651
5717
|
*/
|
|
5652
5718
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
5653
5719
|
/**
|
|
5654
5720
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
5655
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5721
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-some.md
|
|
5656
5722
|
*/
|
|
5657
5723
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
5658
5724
|
/**
|
|
5659
5725
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
5660
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5726
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-at.md
|
|
5661
5727
|
*/
|
|
5662
5728
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
5663
5729
|
/**
|
|
5664
5730
|
* Prefer `BigInt` literals over the constructor.
|
|
5665
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5731
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-bigint-literals.md
|
|
5666
5732
|
*/
|
|
5667
5733
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
5668
5734
|
/**
|
|
5669
5735
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
5670
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5736
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
5671
5737
|
*/
|
|
5672
5738
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
5673
5739
|
/**
|
|
5674
5740
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
5675
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5741
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-class-fields.md
|
|
5676
5742
|
*/
|
|
5677
5743
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
5678
5744
|
/**
|
|
5679
5745
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
5680
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5746
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-classlist-toggle.md
|
|
5681
5747
|
*/
|
|
5682
5748
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
5683
5749
|
/**
|
|
5684
5750
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
5685
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5751
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-code-point.md
|
|
5686
5752
|
*/
|
|
5687
5753
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
5688
5754
|
/**
|
|
5689
5755
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
5690
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5756
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-date-now.md
|
|
5691
5757
|
*/
|
|
5692
5758
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
5693
5759
|
/**
|
|
5694
5760
|
* Prefer default parameters over reassignment.
|
|
5695
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5761
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-default-parameters.md
|
|
5696
5762
|
*/
|
|
5697
5763
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
5698
5764
|
/**
|
|
5699
5765
|
* Prefer `Node#append()` over `Node#appendChild()`.
|
|
5700
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5766
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-dom-node-append.md
|
|
5701
5767
|
*/
|
|
5702
5768
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
5703
5769
|
/**
|
|
5704
5770
|
* Prefer using `.dataset` on DOM elements over calling attribute methods.
|
|
5705
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5771
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-dom-node-dataset.md
|
|
5706
5772
|
*/
|
|
5707
5773
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
5708
5774
|
/**
|
|
5709
5775
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
5710
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5776
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-dom-node-remove.md
|
|
5711
5777
|
*/
|
|
5712
5778
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
5713
5779
|
/**
|
|
5714
5780
|
* Prefer `.textContent` over `.innerText`.
|
|
5715
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5781
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
5716
5782
|
*/
|
|
5717
5783
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
5718
5784
|
/**
|
|
5719
5785
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
5720
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5786
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-event-target.md
|
|
5721
5787
|
*/
|
|
5722
5788
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
5723
5789
|
/**
|
|
5724
5790
|
* Prefer `export…from` when re-exporting.
|
|
5725
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5791
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-export-from.md
|
|
5726
5792
|
*/
|
|
5727
5793
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
5728
5794
|
/**
|
|
5729
5795
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
5730
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5796
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-global-this.md
|
|
5731
5797
|
*/
|
|
5732
5798
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
5733
5799
|
/**
|
|
5734
5800
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
5735
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5801
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-import-meta-properties.md
|
|
5736
5802
|
*/
|
|
5737
5803
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
5738
5804
|
/**
|
|
5739
5805
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
5740
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5806
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-includes.md
|
|
5741
5807
|
*/
|
|
5742
5808
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
5743
5809
|
/**
|
|
5744
5810
|
* Prefer reading a JSON file as a buffer.
|
|
5745
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5811
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-json-parse-buffer.md
|
|
5746
5812
|
*/
|
|
5747
5813
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
5748
5814
|
/**
|
|
5749
5815
|
* Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
|
|
5750
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5816
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
5751
5817
|
*/
|
|
5752
5818
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
5753
5819
|
/**
|
|
5754
5820
|
* Prefer using a logical operator over a ternary.
|
|
5755
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5821
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
5756
5822
|
*/
|
|
5757
5823
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
5758
5824
|
/**
|
|
5759
5825
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
5760
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5826
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-math-min-max.md
|
|
5761
5827
|
*/
|
|
5762
5828
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
5763
5829
|
/**
|
|
5764
5830
|
* Enforce the use of `Math.trunc` instead of bitwise operators.
|
|
5765
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5831
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-math-trunc.md
|
|
5766
5832
|
*/
|
|
5767
5833
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
5768
5834
|
/**
|
|
5769
5835
|
* Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
|
|
5770
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5836
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
5771
5837
|
*/
|
|
5772
5838
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
5773
5839
|
/**
|
|
5774
5840
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
5775
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5841
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-modern-math-apis.md
|
|
5776
5842
|
*/
|
|
5777
5843
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
5778
5844
|
/**
|
|
5779
5845
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
5780
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5846
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-module.md
|
|
5781
5847
|
*/
|
|
5782
5848
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
5783
5849
|
/**
|
|
5784
5850
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
5785
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5851
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
5786
5852
|
*/
|
|
5787
5853
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
5788
5854
|
/**
|
|
5789
5855
|
* Prefer negative index over `.length - index` when possible.
|
|
5790
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5856
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-negative-index.md
|
|
5791
5857
|
*/
|
|
5792
5858
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
5793
5859
|
/**
|
|
5794
5860
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
5795
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5861
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-node-protocol.md
|
|
5796
5862
|
*/
|
|
5797
5863
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
5798
5864
|
/**
|
|
5799
5865
|
* Prefer `Number` static properties over global ones.
|
|
5800
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5866
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-number-properties.md
|
|
5801
5867
|
*/
|
|
5802
5868
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
5803
5869
|
/**
|
|
5804
5870
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
5805
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5871
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-object-from-entries.md
|
|
5806
5872
|
*/
|
|
5807
5873
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
5808
5874
|
/**
|
|
5809
5875
|
* Prefer omitting the `catch` binding parameter.
|
|
5810
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5876
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
5811
5877
|
*/
|
|
5812
5878
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
5813
5879
|
/**
|
|
5814
5880
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
5815
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5881
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-prototype-methods.md
|
|
5816
5882
|
*/
|
|
5817
5883
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
5818
5884
|
/**
|
|
5819
5885
|
* Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`.
|
|
5820
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5886
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-query-selector.md
|
|
5821
5887
|
*/
|
|
5822
5888
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<[]>;
|
|
5823
5889
|
/**
|
|
5824
5890
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
5825
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5891
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-reflect-apply.md
|
|
5826
5892
|
*/
|
|
5827
5893
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
5828
5894
|
/**
|
|
5829
5895
|
* Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
|
|
5830
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5896
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-regexp-test.md
|
|
5831
5897
|
*/
|
|
5832
5898
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
5899
|
+
/**
|
|
5900
|
+
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
5901
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-response-static-json.md
|
|
5902
|
+
*/
|
|
5903
|
+
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
|
|
5833
5904
|
/**
|
|
5834
5905
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
5835
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5906
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-set-has.md
|
|
5836
5907
|
*/
|
|
5837
5908
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<[]>;
|
|
5838
5909
|
/**
|
|
5839
5910
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
5840
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5911
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-set-size.md
|
|
5841
5912
|
*/
|
|
5842
5913
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
5843
5914
|
/**
|
|
5844
5915
|
* Enforce combining multiple `Array#push()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
5845
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5916
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-single-call.md
|
|
5846
5917
|
*/
|
|
5847
5918
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
5848
5919
|
/**
|
|
5849
5920
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
|
|
5850
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5921
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-spread.md
|
|
5851
5922
|
*/
|
|
5852
5923
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
5853
5924
|
/**
|
|
5854
5925
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
5855
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5926
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-raw.md
|
|
5856
5927
|
*/
|
|
5857
5928
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
5858
5929
|
/**
|
|
5859
5930
|
* Prefer `String#replaceAll()` over regex searches with the global flag.
|
|
5860
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5931
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-replace-all.md
|
|
5861
5932
|
*/
|
|
5862
5933
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
5863
5934
|
/**
|
|
5864
5935
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
5865
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5936
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-slice.md
|
|
5866
5937
|
*/
|
|
5867
5938
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
5868
5939
|
/**
|
|
5869
5940
|
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
|
|
5870
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5941
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
5871
5942
|
*/
|
|
5872
5943
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
5873
5944
|
/**
|
|
5874
5945
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
5875
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5946
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
5876
5947
|
*/
|
|
5877
5948
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
5878
5949
|
/**
|
|
5879
5950
|
* Prefer using `structuredClone` to create a deep clone.
|
|
5880
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5951
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-structured-clone.md
|
|
5881
5952
|
*/
|
|
5882
5953
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
5883
5954
|
/**
|
|
5884
5955
|
* Prefer `switch` over multiple `else-if`.
|
|
5885
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5956
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-switch.md
|
|
5886
5957
|
*/
|
|
5887
5958
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
5888
5959
|
/**
|
|
5889
5960
|
* Prefer ternary expressions over simple `if-else` statements.
|
|
5890
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5961
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-ternary.md
|
|
5891
5962
|
*/
|
|
5892
5963
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
5893
5964
|
/**
|
|
5894
5965
|
* Prefer top-level await over top-level promises and async function calls.
|
|
5895
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5966
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-top-level-await.md
|
|
5896
5967
|
*/
|
|
5897
5968
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
5898
5969
|
/**
|
|
5899
5970
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
5900
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5971
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-type-error.md
|
|
5901
5972
|
*/
|
|
5902
5973
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
5903
5974
|
/**
|
|
5904
5975
|
* Prevent abbreviations.
|
|
5905
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5976
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prevent-abbreviations.md
|
|
5906
5977
|
*/
|
|
5907
5978
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<UnicornPreventAbbreviations>;
|
|
5908
5979
|
/**
|
|
5909
5980
|
* Enforce consistent relative URL style.
|
|
5910
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5981
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/relative-url-style.md
|
|
5911
5982
|
*/
|
|
5912
5983
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
5913
5984
|
/**
|
|
5914
5985
|
* Enforce using the separator argument with `Array#join()`.
|
|
5915
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5986
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-array-join-separator.md
|
|
5916
5987
|
*/
|
|
5917
5988
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
5918
5989
|
/**
|
|
5919
5990
|
* Require non-empty module attributes for imports and exports
|
|
5920
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5991
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-module-attributes.md
|
|
5921
5992
|
*/
|
|
5922
5993
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
5923
5994
|
/**
|
|
5924
5995
|
* Require non-empty specifier list in import and export statements.
|
|
5925
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5996
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-module-specifiers.md
|
|
5926
5997
|
*/
|
|
5927
5998
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
5928
5999
|
/**
|
|
5929
6000
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
5930
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6001
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
5931
6002
|
*/
|
|
5932
6003
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
5933
6004
|
/**
|
|
5934
6005
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
5935
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6006
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-post-message-target-origin.md
|
|
5936
6007
|
*/
|
|
5937
6008
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
5938
6009
|
/**
|
|
5939
6010
|
* Enforce better string content.
|
|
5940
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6011
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/string-content.md
|
|
5941
6012
|
*/
|
|
5942
6013
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
5943
6014
|
/**
|
|
5944
6015
|
* Enforce consistent brace style for `case` clauses.
|
|
5945
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6016
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/switch-case-braces.md
|
|
5946
6017
|
*/
|
|
5947
6018
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
5948
6019
|
/**
|
|
5949
6020
|
* Fix whitespace-insensitive template indentation.
|
|
5950
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6021
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/template-indent.md
|
|
5951
6022
|
*/
|
|
5952
6023
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
5953
6024
|
/**
|
|
5954
6025
|
* Enforce consistent case for text encoding identifiers.
|
|
5955
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6026
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/text-encoding-identifier-case.md
|
|
5956
6027
|
*/
|
|
5957
|
-
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<
|
|
6028
|
+
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
5958
6029
|
/**
|
|
5959
6030
|
* Require `new` when creating an error.
|
|
5960
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6031
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/throw-new-error.md
|
|
5961
6032
|
*/
|
|
5962
6033
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
5963
6034
|
/**
|
|
@@ -6460,6 +6531,11 @@ interface RuleOptions {
|
|
|
6460
6531
|
* @see https://eslint.vuejs.org/rules/no-duplicate-attributes.html
|
|
6461
6532
|
*/
|
|
6462
6533
|
'vue/no-duplicate-attributes'?: Linter.RuleEntry<VueNoDuplicateAttributes>;
|
|
6534
|
+
/**
|
|
6535
|
+
* disallow duplication of class names in class attributes
|
|
6536
|
+
* @see https://eslint.vuejs.org/rules/no-duplicate-class-names.html
|
|
6537
|
+
*/
|
|
6538
|
+
'vue/no-duplicate-class-names'?: Linter.RuleEntry<[]>;
|
|
6463
6539
|
/**
|
|
6464
6540
|
* disallow the `<template>` `<script>` `<style>` block to be empty
|
|
6465
6541
|
* @see https://eslint.vuejs.org/rules/no-empty-component-block.html
|
|
@@ -7795,6 +7871,7 @@ type JsdocCheckExamples = [] | [{
|
|
|
7795
7871
|
}];
|
|
7796
7872
|
// ----- jsdoc/check-indentation -----
|
|
7797
7873
|
type JsdocCheckIndentation = [] | [{
|
|
7874
|
+
allowIndentedSections?: boolean;
|
|
7798
7875
|
excludeTags?: string[];
|
|
7799
7876
|
}];
|
|
7800
7877
|
// ----- jsdoc/check-line-alignment -----
|
|
@@ -8141,6 +8218,14 @@ type JsdocRequireParamType = [] | [{
|
|
|
8141
8218
|
defaultDestructuredRootType?: string;
|
|
8142
8219
|
setDefaultDestructuredRootType?: boolean;
|
|
8143
8220
|
}];
|
|
8221
|
+
// ----- jsdoc/require-rejects -----
|
|
8222
|
+
type JsdocRequireRejects = [] | [{
|
|
8223
|
+
contexts?: (string | {
|
|
8224
|
+
comment?: string;
|
|
8225
|
+
context?: string;
|
|
8226
|
+
})[];
|
|
8227
|
+
exemptedBy?: string[];
|
|
8228
|
+
}];
|
|
8144
8229
|
// ----- jsdoc/require-returns -----
|
|
8145
8230
|
type JsdocRequireReturns = [] | [{
|
|
8146
8231
|
checkConstructors?: boolean;
|
|
@@ -8231,6 +8316,9 @@ type JsdocSortTags = [] | [{
|
|
|
8231
8316
|
linesBetween?: number;
|
|
8232
8317
|
reportIntraTagGroupSpacing?: boolean;
|
|
8233
8318
|
reportTagGroupSpacing?: boolean;
|
|
8319
|
+
tagExceptions?: {
|
|
8320
|
+
[k: string]: number;
|
|
8321
|
+
};
|
|
8234
8322
|
tagSequence?: {
|
|
8235
8323
|
tags?: string[];
|
|
8236
8324
|
}[];
|
|
@@ -8254,16 +8342,44 @@ type JsdocTextEscaping = [] | [{
|
|
|
8254
8342
|
escapeHTML?: boolean;
|
|
8255
8343
|
escapeMarkdown?: boolean;
|
|
8256
8344
|
}];
|
|
8345
|
+
// ----- jsdoc/ts-method-signature-style -----
|
|
8346
|
+
type JsdocTsMethodSignatureStyle = [] | [("method" | "property")] | [("method" | "property"), {
|
|
8347
|
+
enableFixer?: boolean;
|
|
8348
|
+
}];
|
|
8349
|
+
// ----- jsdoc/ts-no-unnecessary-template-expression -----
|
|
8350
|
+
type JsdocTsNoUnnecessaryTemplateExpression = [] | [{
|
|
8351
|
+
enableFixer?: boolean;
|
|
8352
|
+
}];
|
|
8353
|
+
// ----- jsdoc/ts-prefer-function-type -----
|
|
8354
|
+
type JsdocTsPreferFunctionType = [] | [{
|
|
8355
|
+
enableFixer?: boolean;
|
|
8356
|
+
}];
|
|
8257
8357
|
// ----- jsdoc/type-formatting -----
|
|
8258
8358
|
type JsdocTypeFormatting = [] | [{
|
|
8259
8359
|
arrayBrackets?: ("angle" | "square");
|
|
8360
|
+
arrowFunctionPostReturnMarkerSpacing?: string;
|
|
8361
|
+
arrowFunctionPreReturnMarkerSpacing?: string;
|
|
8260
8362
|
enableFixer?: boolean;
|
|
8363
|
+
functionOrClassParameterSpacing?: string;
|
|
8364
|
+
functionOrClassPostGenericSpacing?: string;
|
|
8365
|
+
functionOrClassPostReturnMarkerSpacing?: string;
|
|
8366
|
+
functionOrClassPreReturnMarkerSpacing?: string;
|
|
8367
|
+
functionOrClassTypeParameterSpacing?: string;
|
|
8368
|
+
genericAndTupleElementSpacing?: string;
|
|
8261
8369
|
genericDot?: boolean;
|
|
8370
|
+
keyValuePostColonSpacing?: string;
|
|
8371
|
+
keyValuePostKeySpacing?: string;
|
|
8372
|
+
keyValuePostOptionalSpacing?: string;
|
|
8373
|
+
keyValuePostVariadicSpacing?: string;
|
|
8374
|
+
methodQuotes?: ("double" | "single");
|
|
8262
8375
|
objectFieldIndent?: string;
|
|
8263
8376
|
objectFieldQuote?: ("double" | "single" | null);
|
|
8264
8377
|
objectFieldSeparator?: ("comma" | "comma-and-linebreak" | "linebreak" | "semicolon" | "semicolon-and-linebreak");
|
|
8265
8378
|
objectFieldSeparatorOptionalLinebreak?: boolean;
|
|
8266
8379
|
objectFieldSeparatorTrailingPunctuation?: boolean;
|
|
8380
|
+
parameterDefaultValueSpacing?: string;
|
|
8381
|
+
postMethodNameSpacing?: string;
|
|
8382
|
+
postNewSpacing?: string;
|
|
8267
8383
|
separatorForSingleObjectField?: boolean;
|
|
8268
8384
|
stringQuotes?: ("double" | "single");
|
|
8269
8385
|
typeBracketSpacing?: string;
|
|
@@ -11814,8 +11930,13 @@ type ReactNoForbiddenProps = [] | [{
|
|
|
11814
11930
|
prop: string;
|
|
11815
11931
|
})[];
|
|
11816
11932
|
}];
|
|
11933
|
+
// ----- react/no-unstable-default-props -----
|
|
11934
|
+
type ReactNoUnstableDefaultProps = [] | [{
|
|
11935
|
+
safeDefaultProps?: string[];
|
|
11936
|
+
}];
|
|
11817
11937
|
// ----- react/no-useless-fragment -----
|
|
11818
11938
|
type ReactNoUselessFragment = [] | [{
|
|
11939
|
+
allowEmptyFragment?: boolean;
|
|
11819
11940
|
allowExpressions?: boolean;
|
|
11820
11941
|
}];
|
|
11821
11942
|
// ----- regexp/hexadecimal-escape -----
|
|
@@ -12208,6 +12329,50 @@ type StyleCurlyNewline = [] | [(("always" | "never") | {
|
|
|
12208
12329
|
type StyleDotLocation = [] | [("object" | "property")];
|
|
12209
12330
|
// ----- style/eol-last -----
|
|
12210
12331
|
type StyleEolLast = [] | [("always" | "never" | "unix" | "windows")];
|
|
12332
|
+
// ----- style/exp-list-style -----
|
|
12333
|
+
type StyleExpListStyle = [] | [{
|
|
12334
|
+
singleLine?: _StyleExpListStyle_SingleLineConfig;
|
|
12335
|
+
multiLine?: _StyleExpListStyle_MultiLineConfig;
|
|
12336
|
+
overrides?: {
|
|
12337
|
+
"[]"?: _StyleExpListStyle_BaseConfig;
|
|
12338
|
+
"{}"?: _StyleExpListStyle_BaseConfig;
|
|
12339
|
+
"<>"?: _StyleExpListStyle_BaseConfig;
|
|
12340
|
+
"()"?: _StyleExpListStyle_BaseConfig;
|
|
12341
|
+
ArrayExpression?: _StyleExpListStyle_BaseConfig;
|
|
12342
|
+
ArrayPattern?: _StyleExpListStyle_BaseConfig;
|
|
12343
|
+
ArrowFunctionExpression?: _StyleExpListStyle_BaseConfig;
|
|
12344
|
+
CallExpression?: _StyleExpListStyle_BaseConfig;
|
|
12345
|
+
ExportNamedDeclaration?: _StyleExpListStyle_BaseConfig;
|
|
12346
|
+
FunctionDeclaration?: _StyleExpListStyle_BaseConfig;
|
|
12347
|
+
FunctionExpression?: _StyleExpListStyle_BaseConfig;
|
|
12348
|
+
ImportDeclaration?: _StyleExpListStyle_BaseConfig;
|
|
12349
|
+
ImportAttributes?: _StyleExpListStyle_BaseConfig;
|
|
12350
|
+
NewExpression?: _StyleExpListStyle_BaseConfig;
|
|
12351
|
+
ObjectExpression?: _StyleExpListStyle_BaseConfig;
|
|
12352
|
+
ObjectPattern?: _StyleExpListStyle_BaseConfig;
|
|
12353
|
+
TSDeclareFunction?: _StyleExpListStyle_BaseConfig;
|
|
12354
|
+
TSFunctionType?: _StyleExpListStyle_BaseConfig;
|
|
12355
|
+
TSInterfaceBody?: _StyleExpListStyle_BaseConfig;
|
|
12356
|
+
TSEnumBody?: _StyleExpListStyle_BaseConfig;
|
|
12357
|
+
TSTupleType?: _StyleExpListStyle_BaseConfig;
|
|
12358
|
+
TSTypeLiteral?: _StyleExpListStyle_BaseConfig;
|
|
12359
|
+
TSTypeParameterDeclaration?: _StyleExpListStyle_BaseConfig;
|
|
12360
|
+
TSTypeParameterInstantiation?: _StyleExpListStyle_BaseConfig;
|
|
12361
|
+
JSONArrayExpression?: _StyleExpListStyle_BaseConfig;
|
|
12362
|
+
JSONObjectExpression?: _StyleExpListStyle_BaseConfig;
|
|
12363
|
+
};
|
|
12364
|
+
}];
|
|
12365
|
+
interface _StyleExpListStyle_SingleLineConfig {
|
|
12366
|
+
spacing?: ("always" | "never");
|
|
12367
|
+
maxItems?: number;
|
|
12368
|
+
}
|
|
12369
|
+
interface _StyleExpListStyle_MultiLineConfig {
|
|
12370
|
+
minItems?: number;
|
|
12371
|
+
}
|
|
12372
|
+
interface _StyleExpListStyle_BaseConfig {
|
|
12373
|
+
singleLine?: _StyleExpListStyle_SingleLineConfig;
|
|
12374
|
+
multiline?: _StyleExpListStyle_MultiLineConfig;
|
|
12375
|
+
}
|
|
12211
12376
|
// ----- style/function-call-argument-newline -----
|
|
12212
12377
|
type StyleFunctionCallArgumentNewline = [] | [("always" | "never" | "consistent")];
|
|
12213
12378
|
// ----- style/function-call-spacing -----
|
|
@@ -12277,7 +12442,11 @@ type StyleIndent = [] | [("tab" | number)] | [("tab" | number), {
|
|
|
12277
12442
|
ObjectExpression?: (number | ("first" | "off"));
|
|
12278
12443
|
ImportDeclaration?: (number | ("first" | "off"));
|
|
12279
12444
|
flatTernaryExpressions?: boolean;
|
|
12280
|
-
offsetTernaryExpressions?: boolean
|
|
12445
|
+
offsetTernaryExpressions?: (boolean | {
|
|
12446
|
+
CallExpression?: boolean;
|
|
12447
|
+
AwaitExpression?: boolean;
|
|
12448
|
+
NewExpression?: boolean;
|
|
12449
|
+
});
|
|
12281
12450
|
offsetTernaryExpressionsOffsetCallExpressions?: boolean;
|
|
12282
12451
|
ignoredNodes?: string[];
|
|
12283
12452
|
ignoreComments?: boolean;
|
|
@@ -13078,6 +13247,7 @@ type StyleObjectCurlySpacing = [] | [("always" | "never")] | [("always" | "never
|
|
|
13078
13247
|
TSInterfaceBody?: ("always" | "never");
|
|
13079
13248
|
TSEnumBody?: ("always" | "never");
|
|
13080
13249
|
};
|
|
13250
|
+
emptyObjects?: ("ignore" | "always" | "never");
|
|
13081
13251
|
}];
|
|
13082
13252
|
// ----- style/object-property-newline -----
|
|
13083
13253
|
type StyleObjectPropertyNewline = [] | [{
|
|
@@ -13229,6 +13399,13 @@ type SwitchColonSpacing = [] | [{
|
|
|
13229
13399
|
type TemplateCurlySpacing = [] | [("always" | "never")];
|
|
13230
13400
|
// ----- template-tag-spacing -----
|
|
13231
13401
|
type TemplateTagSpacing = [] | [("always" | "never")];
|
|
13402
|
+
// ----- test/consistent-each-for -----
|
|
13403
|
+
type TestConsistentEachFor = [] | [{
|
|
13404
|
+
test?: ("each" | "for");
|
|
13405
|
+
it?: ("each" | "for");
|
|
13406
|
+
describe?: ("each" | "for");
|
|
13407
|
+
suite?: ("each" | "for");
|
|
13408
|
+
}];
|
|
13232
13409
|
// ----- test/consistent-test-filename -----
|
|
13233
13410
|
type TestConsistentTestFilename = [] | [{
|
|
13234
13411
|
pattern?: string;
|
|
@@ -13262,7 +13439,7 @@ type TestNoFocusedTests = [] | [{
|
|
|
13262
13439
|
}];
|
|
13263
13440
|
// ----- test/no-hooks -----
|
|
13264
13441
|
type TestNoHooks = [] | [{
|
|
13265
|
-
allow?:
|
|
13442
|
+
allow?: ("beforeAll" | "beforeEach" | "afterAll" | "afterEach")[];
|
|
13266
13443
|
}];
|
|
13267
13444
|
// ----- test/no-large-snapshots -----
|
|
13268
13445
|
type TestNoLargeSnapshots = [] | [{
|
|
@@ -14627,6 +14804,10 @@ type UnicornTemplateIndent = [] | [{
|
|
|
14627
14804
|
selectors?: string[];
|
|
14628
14805
|
comments?: string[];
|
|
14629
14806
|
}];
|
|
14807
|
+
// ----- unicorn/text-encoding-identifier-case -----
|
|
14808
|
+
type UnicornTextEncodingIdentifierCase = [] | [{
|
|
14809
|
+
withDash?: boolean;
|
|
14810
|
+
}];
|
|
14630
14811
|
// ----- unocss/enforce-class-compile -----
|
|
14631
14812
|
type UnocssEnforceClassCompile = [] | [{
|
|
14632
14813
|
prefix?: string;
|
|
@@ -16672,7 +16853,7 @@ declare function node(options?: OptionsOverrides): Promise<TypedFlatConfigItem[]
|
|
|
16672
16853
|
declare function perfectionist(options?: OptionsOverrides): Promise<TypedFlatConfigItem[]>;
|
|
16673
16854
|
//#endregion
|
|
16674
16855
|
//#region src/configs/pnpm.d.ts
|
|
16675
|
-
declare function pnpm(): Promise<TypedFlatConfigItem[]>;
|
|
16856
|
+
declare function pnpm(options?: OptionsIsInEditor): Promise<TypedFlatConfigItem[]>;
|
|
16676
16857
|
//#endregion
|
|
16677
16858
|
//#region src/configs/react.d.ts
|
|
16678
16859
|
declare function react(options?: OptionsTypeScriptParserOptions & OptionsTypeScriptWithTypes & OptionsOverrides & OptionsFiles): Promise<TypedFlatConfigItem[]>;
|
|
@@ -16792,4 +16973,4 @@ declare function ensurePackages(packages: (string | undefined)[]): Promise<void>
|
|
|
16792
16973
|
declare function isInEditorEnv(): boolean;
|
|
16793
16974
|
declare function isInGitHooksOrLintStaged(): boolean;
|
|
16794
16975
|
//#endregion
|
|
16795
|
-
export { Awaitable, type ConfigNames, GLOB_ALL_SRC, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVELTE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, OptionsComponentExts, OptionsConfig, OptionsFiles, OptionsFormatters, OptionsHasTypeScript, OptionsIgnores, OptionsIsInEditor, OptionsOverrides, OptionsProjectType, OptionsRegExp, OptionsStylistic, OptionsTypeScriptErasableOnly, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, OptionsUnicorn, OptionsUnoCSS, OptionsVue, ResolvedOptions, Rules, StylisticConfig, StylisticConfigDefaults, TypedFlatConfigItem, combine, comments, lincy as default, defaultPluginRenaming, disables, ensurePackages, formatters, getOverrides, ignores, imports, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, javascript, jsdoc, jsonc, jsx,
|
|
16976
|
+
export { Awaitable, type ConfigNames, GLOB_ALL_SRC, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_POSTCSS, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_SVELTE, GLOB_SVG, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSX, GLOB_VUE, GLOB_XML, GLOB_YAML, OptionsComponentExts, OptionsConfig, OptionsFiles, OptionsFormatters, OptionsHasTypeScript, OptionsIgnores, OptionsIsInEditor, OptionsOverrides, OptionsProjectType, OptionsRegExp, OptionsStylistic, OptionsTypeScriptErasableOnly, OptionsTypeScriptParserOptions, OptionsTypeScriptWithTypes, OptionsTypescript, OptionsUnicorn, OptionsUnoCSS, OptionsVue, ResolvedOptions, Rules, StylisticConfig, StylisticConfigDefaults, TypedFlatConfigItem, combine, comments, lincy as default, lincy, defaultPluginRenaming, disables, ensurePackages, formatters, getOverrides, ignores, imports, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, javascript, jsdoc, jsonc, jsx, markdown, nextjs, node, parserPlain, perfectionist, pnpm, react, regexp, renamePluginInConfigs, renameRules, resolveSubOptions, sortPackageJson, sortTsconfig, stylistic, test, toArray, toml, typescript, unicorn, unocss, vue, yaml };
|