@kitschpatrol/eslint-config 8.6.0 → 8.8.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/bin/cli.js +1 -1
- package/dist/index.d.ts +633 -444
- package/dist/index.js +1 -1
- package/package.json +30 -30
package/dist/index.d.ts
CHANGED
|
@@ -505,7 +505,6 @@ interface RuleOptions {
|
|
|
505
505
|
curly?: Linter.RuleEntry<Curly>;
|
|
506
506
|
/**
|
|
507
507
|
* Transforms the negation of a conjunction !(A && B) into the equivalent !A
|
|
508
|
-
*
|
|
509
508
|
* || !B according to De Morgan’s law
|
|
510
509
|
*
|
|
511
510
|
* @see https://github.com/azat-io/eslint-plugin-de-morgan/blob/main/docs/no-negated-conjunction.md
|
|
@@ -1786,6 +1785,11 @@ interface RuleOptions {
|
|
|
1786
1785
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/no-undefined-types.md#repos-sticky-header
|
|
1787
1786
|
*/
|
|
1788
1787
|
'jsdoc/no-undefined-types'?: Linter.RuleEntry<JsdocNoUndefinedTypes>;
|
|
1788
|
+
/**
|
|
1789
|
+
* Reports redundant @type tags that match or broaden the naturally inferred
|
|
1790
|
+
* TypeScript type.
|
|
1791
|
+
*/
|
|
1792
|
+
'jsdoc/no-unnecessary-type-assertion'?: Linter.RuleEntry<JsdocNoUnnecessaryTypeAssertion>;
|
|
1789
1793
|
/**
|
|
1790
1794
|
* Normalizes labeled links in `@see` tags to a canonical `{@link}` form.
|
|
1791
1795
|
*
|
|
@@ -2116,6 +2120,13 @@ interface RuleOptions {
|
|
|
2116
2120
|
* @see https://eslint-plugin-package-json.dev/rules/order-properties
|
|
2117
2121
|
*/
|
|
2118
2122
|
'json-package/order-properties'?: Linter.RuleEntry<JsonPackageOrderProperties>;
|
|
2123
|
+
/**
|
|
2124
|
+
* Require that dependencies declared with workspace protocol use a rolling
|
|
2125
|
+
* workspace spec instead of a specific semver range.
|
|
2126
|
+
*
|
|
2127
|
+
* @see https://eslint-plugin-package-json.dev/rules/prefer-rolling-workspace-spec
|
|
2128
|
+
*/
|
|
2129
|
+
'json-package/prefer-rolling-workspace-spec'?: Linter.RuleEntry<JsonPackagePreferRollingWorkspaceSpec>;
|
|
2119
2130
|
/**
|
|
2120
2131
|
* Enforce either object or shorthand declaration for repository.
|
|
2121
2132
|
*
|
|
@@ -2389,7 +2400,7 @@ interface RuleOptions {
|
|
|
2389
2400
|
*
|
|
2390
2401
|
* @see https://eslint-plugin-package-json.dev/rules/scripts-name-casing
|
|
2391
2402
|
*/
|
|
2392
|
-
'json-package/scripts-name-casing'?: Linter.RuleEntry<
|
|
2403
|
+
'json-package/scripts-name-casing'?: Linter.RuleEntry<JsonPackageScriptsNameCasing>;
|
|
2393
2404
|
/**
|
|
2394
2405
|
* Selected collections must be in a consistent order (lexicographical for
|
|
2395
2406
|
* most; lifecycle-aware for scripts).
|
|
@@ -4329,7 +4340,7 @@ interface RuleOptions {
|
|
|
4329
4340
|
*
|
|
4330
4341
|
* @see https://eslint.org/docs/latest/rules/no-unmodified-loop-condition
|
|
4331
4342
|
*/
|
|
4332
|
-
'no-unmodified-loop-condition'?: Linter.RuleEntry<
|
|
4343
|
+
'no-unmodified-loop-condition'?: Linter.RuleEntry<NoUnmodifiedLoopCondition>;
|
|
4333
4344
|
/**
|
|
4334
4345
|
* Disallow ternary operators when simpler alternatives exist
|
|
4335
4346
|
*
|
|
@@ -4588,7 +4599,8 @@ interface RuleOptions {
|
|
|
4588
4599
|
*/
|
|
4589
4600
|
'node/no-new-require'?: Linter.RuleEntry<[]>;
|
|
4590
4601
|
/**
|
|
4591
|
-
* Disallow string concatenation with `__dirname` and
|
|
4602
|
+
* Disallow string concatenation with `__dirname`, `__filename`, and
|
|
4603
|
+
* `import.meta` paths
|
|
4592
4604
|
*
|
|
4593
4605
|
* @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-path-concat.md
|
|
4594
4606
|
*/
|
|
@@ -4719,12 +4731,24 @@ interface RuleOptions {
|
|
|
4719
4731
|
* @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/url-search-params.md
|
|
4720
4732
|
*/
|
|
4721
4733
|
'node/prefer-global/url-search-params'?: Linter.RuleEntry<NodePreferGlobalUrlSearchParams>;
|
|
4734
|
+
/**
|
|
4735
|
+
* Enforce using `node:assert/strict` instead of `node:assert`.
|
|
4736
|
+
*
|
|
4737
|
+
* @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-import/assert-strict.md
|
|
4738
|
+
*/
|
|
4739
|
+
'node/prefer-import/assert-strict'?: Linter.RuleEntry<[]>;
|
|
4722
4740
|
/**
|
|
4723
4741
|
* Enforce using the `node:` protocol when importing Node.js builtin modules.
|
|
4724
4742
|
*
|
|
4725
4743
|
* @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-node-protocol.md
|
|
4726
4744
|
*/
|
|
4727
4745
|
'node/prefer-node-protocol'?: Linter.RuleEntry<NodePreferNodeProtocol>;
|
|
4746
|
+
/**
|
|
4747
|
+
* Enforce using `process.getBuiltinModule()` to load Node.js built-in modules
|
|
4748
|
+
*
|
|
4749
|
+
* @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-process-get-builtin-module.md
|
|
4750
|
+
*/
|
|
4751
|
+
'node/prefer-process-get-builtin-module'?: Linter.RuleEntry<NodePreferProcessGetBuiltinModule>;
|
|
4728
4752
|
/**
|
|
4729
4753
|
* Enforce `require("dns").promises`
|
|
4730
4754
|
*
|
|
@@ -5198,9 +5222,9 @@ interface RuleOptions {
|
|
|
5198
5222
|
*/
|
|
5199
5223
|
'react/globals'?: Linter.RuleEntry<[]>;
|
|
5200
5224
|
/**
|
|
5201
|
-
* Validates against
|
|
5202
|
-
* into frozen contexts such as JSX props,
|
|
5203
|
-
* values.
|
|
5225
|
+
* Validates against mutating props, state, and other immutable values,
|
|
5226
|
+
* including through functions passed into frozen contexts such as JSX props,
|
|
5227
|
+
* hook arguments, and hook return values.
|
|
5204
5228
|
*
|
|
5205
5229
|
* @see https://eslint-react.xyz/docs/rules/immutability
|
|
5206
5230
|
*/
|
|
@@ -5661,9 +5685,9 @@ interface RuleOptions {
|
|
|
5661
5685
|
*/
|
|
5662
5686
|
'react/x-globals'?: Linter.RuleEntry<[]>;
|
|
5663
5687
|
/**
|
|
5664
|
-
* Validates against
|
|
5665
|
-
* into frozen contexts such as JSX props,
|
|
5666
|
-
* values.
|
|
5688
|
+
* Validates against mutating props, state, and other immutable values,
|
|
5689
|
+
* including through functions passed into frozen contexts such as JSX props,
|
|
5690
|
+
* hook arguments, and hook return values.
|
|
5667
5691
|
*
|
|
5668
5692
|
* @see https://eslint-react.xyz/docs/rules/immutability
|
|
5669
5693
|
*/
|
|
@@ -7577,6 +7601,12 @@ interface RuleOptions {
|
|
|
7577
7601
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-useless-mustaches/
|
|
7578
7602
|
*/
|
|
7579
7603
|
'svelte/no-useless-mustaches'?: Linter.RuleEntry<SvelteNoUselessMustaches>;
|
|
7604
|
+
/**
|
|
7605
|
+
* Require attribute interpolation instead of template literals
|
|
7606
|
+
*
|
|
7607
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/prefer-attribute-interpolation/
|
|
7608
|
+
*/
|
|
7609
|
+
'svelte/prefer-attribute-interpolation'?: Linter.RuleEntry<[]>;
|
|
7580
7610
|
/**
|
|
7581
7611
|
* Require class directives instead of ternary expressions
|
|
7582
7612
|
*
|
|
@@ -8651,6 +8681,12 @@ interface RuleOptions {
|
|
|
8651
8681
|
* @see https://typescript-eslint.io/rules/no-for-in-array
|
|
8652
8682
|
*/
|
|
8653
8683
|
'ts/no-for-in-array'?: Linter.RuleEntry<[]>;
|
|
8684
|
+
/**
|
|
8685
|
+
* Disallow type operations that resolve to the "empty object" type
|
|
8686
|
+
*
|
|
8687
|
+
* @see https://typescript-eslint.io/rules/no-generated-empty-object-type
|
|
8688
|
+
*/
|
|
8689
|
+
'ts/no-generated-empty-object-type'?: Linter.RuleEntry<[]>;
|
|
8654
8690
|
/**
|
|
8655
8691
|
* Disallow the use of `eval()`-like functions
|
|
8656
8692
|
*
|
|
@@ -9244,501 +9280,519 @@ interface RuleOptions {
|
|
|
9244
9280
|
/**
|
|
9245
9281
|
* Prefer better DOM traversal APIs.
|
|
9246
9282
|
*
|
|
9247
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9283
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/better-dom-traversing.md
|
|
9248
9284
|
*/
|
|
9249
9285
|
'unicorn/better-dom-traversing'?: Linter.RuleEntry<[]>;
|
|
9250
9286
|
/**
|
|
9251
9287
|
* Removed. Prefer `eslint-plugin-regexp`
|
|
9252
9288
|
*
|
|
9253
9289
|
* @deprecated
|
|
9254
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9290
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/deleted-and-deprecated-rules.md#better-regex
|
|
9255
9291
|
*/
|
|
9256
9292
|
'unicorn/better-regex'?: Linter.RuleEntry<[]>;
|
|
9257
9293
|
/**
|
|
9258
9294
|
* Enforce a specific parameter name in catch clauses.
|
|
9259
9295
|
*
|
|
9260
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9296
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/catch-error-name.md
|
|
9261
9297
|
*/
|
|
9262
9298
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
9263
9299
|
/**
|
|
9264
9300
|
* Enforce consistent class references in static methods.
|
|
9265
9301
|
*
|
|
9266
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9302
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/class-reference-in-static-methods.md
|
|
9267
9303
|
*/
|
|
9268
9304
|
'unicorn/class-reference-in-static-methods'?: Linter.RuleEntry<UnicornClassReferenceInStaticMethods>;
|
|
9269
9305
|
/**
|
|
9270
9306
|
* Enforce better comment content.
|
|
9271
9307
|
*
|
|
9272
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9308
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/comment-content.md
|
|
9273
9309
|
*/
|
|
9274
9310
|
'unicorn/comment-content'?: Linter.RuleEntry<UnicornCommentContent>;
|
|
9311
|
+
/**
|
|
9312
|
+
* Enforce a consistent return style for multiline arrow function bodies.
|
|
9313
|
+
*
|
|
9314
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-arrow-return-style.md
|
|
9315
|
+
*/
|
|
9316
|
+
'unicorn/consistent-arrow-return-style'?: Linter.RuleEntry<[]>;
|
|
9275
9317
|
/**
|
|
9276
9318
|
* Enforce consistent assertion style with `node:assert`.
|
|
9277
9319
|
*
|
|
9278
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9320
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-assert.md
|
|
9279
9321
|
*/
|
|
9280
9322
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
9281
9323
|
/**
|
|
9282
9324
|
* Enforce consistent naming for boolean names.
|
|
9283
9325
|
*
|
|
9284
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9326
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-boolean-name.md
|
|
9285
9327
|
*/
|
|
9286
9328
|
'unicorn/consistent-boolean-name'?: Linter.RuleEntry<UnicornConsistentBooleanName>;
|
|
9287
9329
|
/**
|
|
9288
9330
|
* Enforce consistent class member order.
|
|
9289
9331
|
*
|
|
9290
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9332
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-class-member-order.md
|
|
9291
9333
|
*/
|
|
9292
9334
|
'unicorn/consistent-class-member-order'?: Linter.RuleEntry<UnicornConsistentClassMemberOrder>;
|
|
9293
9335
|
/**
|
|
9294
9336
|
* Enforce consistent spelling of compound words in identifiers.
|
|
9295
9337
|
*
|
|
9296
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9338
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-compound-words.md
|
|
9297
9339
|
*/
|
|
9298
9340
|
'unicorn/consistent-compound-words'?: Linter.RuleEntry<UnicornConsistentCompoundWords>;
|
|
9299
9341
|
/**
|
|
9300
9342
|
* Enforce consistent conditional object spread style.
|
|
9301
9343
|
*
|
|
9302
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9344
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-conditional-object-spread.md
|
|
9303
9345
|
*/
|
|
9304
9346
|
'unicorn/consistent-conditional-object-spread'?: Linter.RuleEntry<UnicornConsistentConditionalObjectSpread>;
|
|
9305
9347
|
/**
|
|
9306
9348
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
9307
9349
|
*
|
|
9308
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9350
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-date-clone.md
|
|
9309
9351
|
*/
|
|
9310
9352
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
9311
9353
|
/**
|
|
9312
9354
|
* Use destructured variables over properties.
|
|
9313
9355
|
*
|
|
9314
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9356
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-destructuring.md
|
|
9315
9357
|
*/
|
|
9316
9358
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
9317
9359
|
/**
|
|
9318
9360
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
9319
9361
|
*
|
|
9320
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9362
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-empty-array-spread.md
|
|
9321
9363
|
*/
|
|
9322
9364
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
9323
9365
|
/**
|
|
9324
9366
|
* Enforce consistent style for element existence checks with `indexOf()`,
|
|
9325
9367
|
* `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
9326
9368
|
*
|
|
9327
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9369
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-existence-index-check.md
|
|
9328
9370
|
*/
|
|
9329
9371
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
9330
9372
|
/**
|
|
9331
9373
|
* Enforce consistent decorator position on exported classes.
|
|
9332
9374
|
*
|
|
9333
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9375
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-export-decorator-position.md
|
|
9334
9376
|
*/
|
|
9335
9377
|
'unicorn/consistent-export-decorator-position'?: Linter.RuleEntry<UnicornConsistentExportDecoratorPosition>;
|
|
9336
9378
|
/**
|
|
9337
9379
|
* Move function definitions to the highest possible scope.
|
|
9338
9380
|
*
|
|
9339
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9381
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-function-scoping.md
|
|
9340
9382
|
*/
|
|
9341
9383
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
9342
9384
|
/**
|
|
9343
9385
|
* Enforce function syntax by role.
|
|
9344
9386
|
*
|
|
9345
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9387
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-function-style.md
|
|
9346
9388
|
*/
|
|
9347
9389
|
'unicorn/consistent-function-style'?: Linter.RuleEntry<UnicornConsistentFunctionStyle>;
|
|
9348
9390
|
/**
|
|
9349
9391
|
* Enforce consistent JSON file reads before `JSON.parse()`.
|
|
9350
9392
|
*
|
|
9351
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9393
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-json-file-read.md
|
|
9352
9394
|
*/
|
|
9353
9395
|
'unicorn/consistent-json-file-read'?: Linter.RuleEntry<UnicornConsistentJsonFileRead>;
|
|
9354
9396
|
/**
|
|
9355
9397
|
* Enforce consistent optional chaining for same-base member access.
|
|
9356
9398
|
*
|
|
9357
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9399
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-optional-chaining.md
|
|
9358
9400
|
*/
|
|
9359
9401
|
'unicorn/consistent-optional-chaining'?: Linter.RuleEntry<[]>;
|
|
9360
9402
|
/**
|
|
9361
9403
|
* Enforce consistent style for escaping `${` in template literals.
|
|
9362
9404
|
*
|
|
9363
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9405
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-template-literal-escape.md
|
|
9364
9406
|
*/
|
|
9365
9407
|
'unicorn/consistent-template-literal-escape'?: Linter.RuleEntry<[]>;
|
|
9366
9408
|
/**
|
|
9367
9409
|
* Enforce consistent labels on tuple type elements.
|
|
9368
9410
|
*
|
|
9369
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9411
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/consistent-tuple-labels.md
|
|
9370
9412
|
*/
|
|
9371
9413
|
'unicorn/consistent-tuple-labels'?: Linter.RuleEntry<[]>;
|
|
9372
9414
|
/**
|
|
9373
9415
|
* Enforce correct `Error` subclassing.
|
|
9374
9416
|
*
|
|
9375
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9417
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/custom-error-definition.md
|
|
9376
9418
|
*/
|
|
9377
9419
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
9378
9420
|
/**
|
|
9379
9421
|
* Enforce consistent default export declarations.
|
|
9380
9422
|
*
|
|
9381
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9423
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/default-export-style.md
|
|
9382
9424
|
*/
|
|
9383
9425
|
'unicorn/default-export-style'?: Linter.RuleEntry<UnicornDefaultExportStyle>;
|
|
9384
9426
|
/**
|
|
9385
9427
|
* Enforce consistent style for DOM element dataset access.
|
|
9386
9428
|
*
|
|
9387
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9429
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/dom-node-dataset.md
|
|
9388
9430
|
*/
|
|
9389
9431
|
'unicorn/dom-node-dataset'?: Linter.RuleEntry<UnicornDomNodeDataset>;
|
|
9390
9432
|
/**
|
|
9391
9433
|
* Enforce no spaces between braces.
|
|
9392
9434
|
*
|
|
9393
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9435
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/empty-brace-spaces.md
|
|
9394
9436
|
*/
|
|
9395
9437
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
9396
9438
|
/**
|
|
9397
9439
|
* Enforce passing a `message` value when creating a built-in error.
|
|
9398
9440
|
*
|
|
9399
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9441
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/error-message.md
|
|
9400
9442
|
*/
|
|
9401
9443
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
9402
9444
|
/**
|
|
9403
9445
|
* Require escape sequences to use uppercase or lowercase values.
|
|
9404
9446
|
*
|
|
9405
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9447
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/escape-case.md
|
|
9406
9448
|
*/
|
|
9407
9449
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
9408
9450
|
/**
|
|
9409
9451
|
* Add expiration conditions to TODO comments.
|
|
9410
9452
|
*
|
|
9411
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9453
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/expiring-todo-comments.md
|
|
9412
9454
|
*/
|
|
9413
9455
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
9414
9456
|
/**
|
|
9415
9457
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
9416
9458
|
*
|
|
9417
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9459
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/explicit-length-check.md
|
|
9418
9460
|
*/
|
|
9419
9461
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
9420
9462
|
/**
|
|
9421
9463
|
* Enforce or disallow explicit `delay` argument for `setTimeout()` and
|
|
9422
9464
|
* `setInterval()`.
|
|
9423
9465
|
*
|
|
9424
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9466
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/explicit-timer-delay.md
|
|
9425
9467
|
*/
|
|
9426
9468
|
'unicorn/explicit-timer-delay'?: Linter.RuleEntry<UnicornExplicitTimerDelay>;
|
|
9427
9469
|
/**
|
|
9428
9470
|
* Enforce a case style for filenames and directory names.
|
|
9429
9471
|
*
|
|
9430
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9472
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/filename-case.md
|
|
9431
9473
|
*/
|
|
9432
9474
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
9433
9475
|
/**
|
|
9434
9476
|
* Require identifiers to match a specified regular expression.
|
|
9435
9477
|
*
|
|
9436
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9478
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/id-match.md
|
|
9437
9479
|
*/
|
|
9438
9480
|
'unicorn/id-match'?: Linter.RuleEntry<UnicornIdMatch>;
|
|
9439
9481
|
/**
|
|
9440
9482
|
* Enforce specific import styles per module.
|
|
9441
9483
|
*
|
|
9442
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9484
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/import-style.md
|
|
9443
9485
|
*/
|
|
9444
9486
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
9445
9487
|
/**
|
|
9446
9488
|
* Prevent usage of variables from outside the scope of isolated functions.
|
|
9447
9489
|
*
|
|
9448
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9490
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/isolated-functions.md
|
|
9449
9491
|
*/
|
|
9450
9492
|
'unicorn/isolated-functions'?: Linter.RuleEntry<UnicornIsolatedFunctions>;
|
|
9493
|
+
/**
|
|
9494
|
+
* Enforce a consistent style for optional loop sources.
|
|
9495
|
+
*
|
|
9496
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/iteration-fallback-style.md
|
|
9497
|
+
*/
|
|
9498
|
+
'unicorn/iteration-fallback-style'?: Linter.RuleEntry<UnicornIterationFallbackStyle>;
|
|
9451
9499
|
/**
|
|
9452
9500
|
* Require or disallow logical assignment operator shorthand
|
|
9453
9501
|
*
|
|
9454
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9502
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/logical-assignment-operators.md
|
|
9455
9503
|
*/
|
|
9456
9504
|
'unicorn/logical-assignment-operators'?: Linter.RuleEntry<UnicornLogicalAssignmentOperators>;
|
|
9457
9505
|
/**
|
|
9458
9506
|
* Limit the depth of nested calls.
|
|
9459
9507
|
*
|
|
9460
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9508
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/max-nested-calls.md
|
|
9461
9509
|
*/
|
|
9462
9510
|
'unicorn/max-nested-calls'?: Linter.RuleEntry<UnicornMaxNestedCalls>;
|
|
9463
9511
|
/**
|
|
9464
9512
|
* Enforce replacements for variable, property, and filenames.
|
|
9465
9513
|
*
|
|
9466
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9514
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/name-replacements.md
|
|
9467
9515
|
*/
|
|
9468
9516
|
'unicorn/name-replacements'?: Linter.RuleEntry<UnicornNameReplacements>;
|
|
9469
9517
|
/**
|
|
9470
9518
|
* Enforce correct use of `new` for builtin constructors.
|
|
9471
9519
|
*
|
|
9472
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9520
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/new-for-builtins.md
|
|
9473
9521
|
*/
|
|
9474
9522
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
9475
9523
|
/**
|
|
9476
9524
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
9477
9525
|
*
|
|
9478
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9526
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
9479
9527
|
*/
|
|
9480
9528
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
9481
9529
|
/**
|
|
9482
9530
|
* Disallow recursive access to `this` within getters and setters.
|
|
9483
9531
|
*
|
|
9484
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9532
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-accessor-recursion.md
|
|
9485
9533
|
*/
|
|
9486
9534
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
9487
9535
|
/**
|
|
9488
9536
|
* Disallow bitwise operators where a logical operator was likely intended.
|
|
9489
9537
|
*
|
|
9490
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9538
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-accidental-bitwise-operator.md
|
|
9491
9539
|
*/
|
|
9492
9540
|
'unicorn/no-accidental-bitwise-operator'?: Linter.RuleEntry<[]>;
|
|
9493
9541
|
/**
|
|
9494
9542
|
* Disallow anonymous functions and classes as the default export.
|
|
9495
9543
|
*
|
|
9496
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9544
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-anonymous-default-export.md
|
|
9497
9545
|
*/
|
|
9498
9546
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
9499
9547
|
/**
|
|
9500
9548
|
* Prevent passing a function reference directly to iterator methods.
|
|
9501
9549
|
*
|
|
9502
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9550
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-array-callback-reference.md
|
|
9503
9551
|
*/
|
|
9504
9552
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<UnicornNoArrayCallbackReference>;
|
|
9505
9553
|
/**
|
|
9506
9554
|
* Disallow array accumulation with `Array#concat()` in loops.
|
|
9507
9555
|
*
|
|
9508
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9556
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-array-concat-in-loop.md
|
|
9509
9557
|
*/
|
|
9510
9558
|
'unicorn/no-array-concat-in-loop'?: Linter.RuleEntry<[]>;
|
|
9511
9559
|
/**
|
|
9512
9560
|
* Disallow using reference values as `Array#fill()` values.
|
|
9513
9561
|
*
|
|
9514
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9562
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-array-fill-with-reference-type.md
|
|
9515
9563
|
*/
|
|
9516
9564
|
'unicorn/no-array-fill-with-reference-type'?: Linter.RuleEntry<[]>;
|
|
9517
9565
|
/**
|
|
9518
9566
|
* Disallow `.fill()` after `Array.from({length: …})`.
|
|
9519
9567
|
*
|
|
9520
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9568
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-array-from-fill.md
|
|
9521
9569
|
*/
|
|
9522
9570
|
'unicorn/no-array-from-fill'?: Linter.RuleEntry<[]>;
|
|
9523
9571
|
/**
|
|
9524
9572
|
* Disallow front-of-array mutation.
|
|
9525
9573
|
*
|
|
9526
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9574
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-array-front-mutation.md
|
|
9527
9575
|
*/
|
|
9528
9576
|
'unicorn/no-array-front-mutation'?: Linter.RuleEntry<[]>;
|
|
9529
9577
|
/**
|
|
9530
9578
|
* Disallow using the `this` argument in array methods.
|
|
9531
9579
|
*
|
|
9532
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9580
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-array-method-this-argument.md
|
|
9533
9581
|
*/
|
|
9534
9582
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
9535
9583
|
/**
|
|
9536
9584
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
9537
9585
|
*
|
|
9538
9586
|
* @deprecated
|
|
9539
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9587
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/deleted-and-deprecated-rules.md#no-array-push-push
|
|
9540
9588
|
*/
|
|
9541
9589
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
9542
9590
|
/**
|
|
9543
9591
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
9544
9592
|
*
|
|
9545
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9593
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-array-reduce.md
|
|
9546
9594
|
*/
|
|
9547
9595
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
9548
9596
|
/**
|
|
9549
9597
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
9550
9598
|
*
|
|
9551
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9599
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-array-reverse.md
|
|
9552
9600
|
*/
|
|
9553
9601
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
9554
9602
|
/**
|
|
9555
9603
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
9556
9604
|
*
|
|
9557
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9605
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-array-sort.md
|
|
9558
9606
|
*/
|
|
9559
9607
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
9560
9608
|
/**
|
|
9561
9609
|
* Disallow sorting arrays to get the minimum or maximum value.
|
|
9562
9610
|
*
|
|
9563
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9611
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-array-sort-for-min-max.md
|
|
9564
9612
|
*/
|
|
9565
9613
|
'unicorn/no-array-sort-for-min-max'?: Linter.RuleEntry<[]>;
|
|
9566
9614
|
/**
|
|
9567
9615
|
* Prefer `Array#toSpliced()` over `Array#splice()`.
|
|
9568
9616
|
*
|
|
9569
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9617
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-array-splice.md
|
|
9570
9618
|
*/
|
|
9571
9619
|
'unicorn/no-array-splice'?: Linter.RuleEntry<[]>;
|
|
9572
9620
|
/**
|
|
9573
9621
|
* Disallow asterisk prefixes in documentation comments.
|
|
9574
9622
|
*
|
|
9575
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9623
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-asterisk-prefix-in-documentation-comments.md
|
|
9576
9624
|
*/
|
|
9577
9625
|
'unicorn/no-asterisk-prefix-in-documentation-comments'?: Linter.RuleEntry<[]>;
|
|
9578
9626
|
/**
|
|
9579
9627
|
* Disallow async functions as `Promise#finally()` callbacks.
|
|
9580
9628
|
*
|
|
9581
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9629
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-async-promise-finally.md
|
|
9582
9630
|
*/
|
|
9583
9631
|
'unicorn/no-async-promise-finally'?: Linter.RuleEntry<[]>;
|
|
9584
9632
|
/**
|
|
9585
9633
|
* Disallow member access from await expression.
|
|
9586
9634
|
*
|
|
9587
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9635
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-await-expression-member.md
|
|
9588
9636
|
*/
|
|
9589
9637
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
9590
9638
|
/**
|
|
9591
9639
|
* Disallow using `await` in `Promise` method parameters.
|
|
9592
9640
|
*
|
|
9593
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9641
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-await-in-promise-methods.md
|
|
9594
9642
|
*/
|
|
9595
9643
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
9644
|
+
/**
|
|
9645
|
+
* Disallow barrel files.
|
|
9646
|
+
*
|
|
9647
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-barrel-files.md
|
|
9648
|
+
*/
|
|
9649
|
+
'unicorn/no-barrel-files'?: Linter.RuleEntry<[]>;
|
|
9596
9650
|
/**
|
|
9597
9651
|
* Disallow unnecessary `Blob` to `File` conversion.
|
|
9598
9652
|
*
|
|
9599
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9653
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-blob-to-file.md
|
|
9600
9654
|
*/
|
|
9601
9655
|
'unicorn/no-blob-to-file'?: Linter.RuleEntry<[]>;
|
|
9602
9656
|
/**
|
|
9603
9657
|
* Disallow boolean-returning sort comparators.
|
|
9604
9658
|
*
|
|
9605
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9659
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-boolean-sort-comparator.md
|
|
9606
9660
|
*/
|
|
9607
9661
|
'unicorn/no-boolean-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
9608
9662
|
/**
|
|
9609
9663
|
* Disallow `break` and `continue` in nested loops and switches inside loops.
|
|
9610
9664
|
*
|
|
9611
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9665
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-break-in-nested-loop.md
|
|
9612
9666
|
*/
|
|
9613
9667
|
'unicorn/no-break-in-nested-loop'?: Linter.RuleEntry<[]>;
|
|
9614
9668
|
/**
|
|
9615
9669
|
* Prefer drawing canvases directly instead of converting them to images.
|
|
9616
9670
|
*
|
|
9617
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9671
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-canvas-to-image.md
|
|
9618
9672
|
*/
|
|
9619
9673
|
'unicorn/no-canvas-to-image'?: Linter.RuleEntry<[]>;
|
|
9620
9674
|
/**
|
|
9621
9675
|
* Disallow chained comparisons such as `a < b < c`.
|
|
9622
9676
|
*
|
|
9623
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9677
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-chained-comparison.md
|
|
9624
9678
|
*/
|
|
9625
9679
|
'unicorn/no-chained-comparison'?: Linter.RuleEntry<[]>;
|
|
9626
9680
|
/**
|
|
9627
9681
|
* Disallow accessing `Map`, `Set`, `WeakMap`, and `WeakSet` entries with
|
|
9628
9682
|
* bracket notation.
|
|
9629
9683
|
*
|
|
9630
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9684
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-collection-bracket-access.md
|
|
9631
9685
|
*/
|
|
9632
9686
|
'unicorn/no-collection-bracket-access'?: Linter.RuleEntry<[]>;
|
|
9633
9687
|
/**
|
|
9634
9688
|
* Disallow dynamic object property existence checks.
|
|
9635
9689
|
*
|
|
9636
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9690
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-computed-property-existence-check.md
|
|
9637
9691
|
*/
|
|
9638
9692
|
'unicorn/no-computed-property-existence-check'?: Linter.RuleEntry<[]>;
|
|
9639
9693
|
/**
|
|
9640
9694
|
* Disallow confusing uses of `Array#{splice,toSpliced}()`.
|
|
9641
9695
|
*
|
|
9642
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9696
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-confusing-array-splice.md
|
|
9643
9697
|
*/
|
|
9644
9698
|
'unicorn/no-confusing-array-splice'?: Linter.RuleEntry<[]>;
|
|
9645
9699
|
/**
|
|
9646
9700
|
* Disallow confusing uses of `Array#with()`.
|
|
9647
9701
|
*
|
|
9648
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9702
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-confusing-array-with.md
|
|
9649
9703
|
*/
|
|
9650
9704
|
'unicorn/no-confusing-array-with'?: Linter.RuleEntry<[]>;
|
|
9651
9705
|
/**
|
|
9652
9706
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
9653
9707
|
*
|
|
9654
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9708
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-console-spaces.md
|
|
9655
9709
|
*/
|
|
9656
9710
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
9657
9711
|
/**
|
|
9658
9712
|
* Disallow arithmetic and bitwise operations that always evaluate to `0`.
|
|
9659
9713
|
*
|
|
9660
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9714
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-constant-zero-expression.md
|
|
9661
9715
|
*/
|
|
9662
9716
|
'unicorn/no-constant-zero-expression'?: Linter.RuleEntry<[]>;
|
|
9663
9717
|
/**
|
|
9664
9718
|
* Disallow declarations before conditional early exits when they are only
|
|
9665
9719
|
* used after the exit.
|
|
9666
9720
|
*
|
|
9667
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9721
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-declarations-before-early-exit.md
|
|
9668
9722
|
*/
|
|
9669
9723
|
'unicorn/no-declarations-before-early-exit'?: Linter.RuleEntry<[]>;
|
|
9670
9724
|
/**
|
|
9671
9725
|
* Do not use `document.cookie` directly.
|
|
9672
9726
|
*
|
|
9673
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9727
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-document-cookie.md
|
|
9674
9728
|
*/
|
|
9675
9729
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
9676
9730
|
/**
|
|
9677
9731
|
* Disallow two comparisons of the same operands that can be combined into
|
|
9678
9732
|
* one.
|
|
9679
9733
|
*
|
|
9680
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9734
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-double-comparison.md
|
|
9681
9735
|
*/
|
|
9682
9736
|
'unicorn/no-double-comparison'?: Linter.RuleEntry<[]>;
|
|
9683
9737
|
/**
|
|
9684
9738
|
* Disallow duplicate adjacent branches in if chains.
|
|
9685
9739
|
*
|
|
9686
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9740
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-duplicate-if-branches.md
|
|
9687
9741
|
*/
|
|
9688
9742
|
'unicorn/no-duplicate-if-branches'?: Linter.RuleEntry<[]>;
|
|
9689
9743
|
/**
|
|
9690
9744
|
* Disallow adjacent duplicate operands in logical expressions.
|
|
9691
9745
|
*
|
|
9692
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9746
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-duplicate-logical-operands.md
|
|
9693
9747
|
*/
|
|
9694
9748
|
'unicorn/no-duplicate-logical-operands'?: Linter.RuleEntry<[]>;
|
|
9695
9749
|
/**
|
|
9696
9750
|
* Disallow `.map()` and `.filter()` in `for…of` and `for await…of` loop
|
|
9697
9751
|
* headers.
|
|
9698
9752
|
*
|
|
9699
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9753
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-duplicate-loops.md
|
|
9700
9754
|
*/
|
|
9701
9755
|
'unicorn/no-duplicate-loops'?: Linter.RuleEntry<[]>;
|
|
9702
9756
|
/**
|
|
9703
9757
|
* Disallow duplicate values in `Set` constructor array literals.
|
|
9704
9758
|
*
|
|
9705
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9759
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-duplicate-set-values.md
|
|
9706
9760
|
*/
|
|
9707
9761
|
'unicorn/no-duplicate-set-values'?: Linter.RuleEntry<[]>;
|
|
9708
9762
|
/**
|
|
9709
9763
|
* Disallow empty files.
|
|
9710
9764
|
*
|
|
9711
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9765
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-empty-file.md
|
|
9712
9766
|
*/
|
|
9713
9767
|
'unicorn/no-empty-file'?: Linter.RuleEntry<UnicornNoEmptyFile>;
|
|
9714
9768
|
/**
|
|
9715
9769
|
* Disallow assigning to built-in error properties.
|
|
9716
9770
|
*
|
|
9717
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9771
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-error-property-assignment.md
|
|
9718
9772
|
*/
|
|
9719
9773
|
'unicorn/no-error-property-assignment'?: Linter.RuleEntry<[]>;
|
|
9720
9774
|
/**
|
|
9721
9775
|
* Disallow exports in scripts.
|
|
9722
9776
|
*
|
|
9723
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9777
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-exports-in-scripts.md
|
|
9724
9778
|
*/
|
|
9725
9779
|
'unicorn/no-exports-in-scripts'?: Linter.RuleEntry<[]>;
|
|
9726
9780
|
/**
|
|
9727
9781
|
* Prefer `for…of` over the `forEach` method.
|
|
9728
9782
|
*
|
|
9729
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9783
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-for-each.md
|
|
9730
9784
|
*/
|
|
9731
9785
|
'unicorn/no-for-each'?: Linter.RuleEntry<[]>;
|
|
9732
9786
|
/**
|
|
9733
9787
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
9734
9788
|
*
|
|
9735
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9789
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-for-loop.md
|
|
9736
9790
|
*/
|
|
9737
9791
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
9738
9792
|
/**
|
|
9739
9793
|
* Disallow assigning properties on the global object.
|
|
9740
9794
|
*
|
|
9741
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9795
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-global-object-property-assignment.md
|
|
9742
9796
|
*/
|
|
9743
9797
|
'unicorn/no-global-object-property-assignment'?: Linter.RuleEntry<[]>;
|
|
9744
9798
|
/**
|
|
@@ -9746,1622 +9800,1635 @@ interface RuleOptions {
|
|
|
9746
9800
|
* cases.
|
|
9747
9801
|
*
|
|
9748
9802
|
* @deprecated
|
|
9749
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9803
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/deleted-and-deprecated-rules.md#no-hex-escape
|
|
9750
9804
|
*/
|
|
9751
9805
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
9752
9806
|
/**
|
|
9753
9807
|
* Disallow immediate mutation after variable assignment.
|
|
9754
9808
|
*
|
|
9755
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9809
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-immediate-mutation.md
|
|
9756
9810
|
*/
|
|
9757
9811
|
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]>;
|
|
9758
9812
|
/**
|
|
9759
9813
|
* Disallow impossible comparisons against `.length` or `.size`.
|
|
9760
9814
|
*
|
|
9761
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9815
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-impossible-length-comparison.md
|
|
9762
9816
|
*/
|
|
9763
9817
|
'unicorn/no-impossible-length-comparison'?: Linter.RuleEntry<[]>;
|
|
9764
9818
|
/**
|
|
9765
9819
|
* Disallow incorrect `querySelector()` and `querySelectorAll()` usage.
|
|
9766
9820
|
*
|
|
9767
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9821
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-incorrect-query-selector.md
|
|
9768
9822
|
*/
|
|
9769
9823
|
'unicorn/no-incorrect-query-selector'?: Linter.RuleEntry<[]>;
|
|
9770
9824
|
/**
|
|
9771
9825
|
* Disallow incorrect template literal interpolation syntax.
|
|
9772
9826
|
*
|
|
9773
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9827
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-incorrect-template-string-interpolation.md
|
|
9774
9828
|
*/
|
|
9775
9829
|
'unicorn/no-incorrect-template-string-interpolation'?: Linter.RuleEntry<[]>;
|
|
9776
9830
|
/**
|
|
9777
9831
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
9778
9832
|
*
|
|
9779
9833
|
* @deprecated
|
|
9780
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9834
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array
|
|
9781
9835
|
*/
|
|
9782
9836
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
9783
9837
|
/**
|
|
9784
9838
|
* Disallow `instanceof` with built-in objects
|
|
9785
9839
|
*
|
|
9786
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9840
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-instanceof-builtins.md
|
|
9787
9841
|
*/
|
|
9788
9842
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
9789
9843
|
/**
|
|
9790
9844
|
* Disallow calling functions and constructors with an invalid number of
|
|
9791
9845
|
* arguments.
|
|
9792
9846
|
*
|
|
9793
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9847
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-invalid-argument-count.md
|
|
9794
9848
|
*/
|
|
9795
9849
|
'unicorn/no-invalid-argument-count'?: Linter.RuleEntry<UnicornNoInvalidArgumentCount>;
|
|
9796
9850
|
/**
|
|
9797
9851
|
* Disallow comparing a single character from a string to a multi-character
|
|
9798
9852
|
* string.
|
|
9799
9853
|
*
|
|
9800
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9854
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-invalid-character-comparison.md
|
|
9801
9855
|
*/
|
|
9802
9856
|
'unicorn/no-invalid-character-comparison'?: Linter.RuleEntry<[]>;
|
|
9803
9857
|
/**
|
|
9804
9858
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
9805
9859
|
*
|
|
9806
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9860
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-invalid-fetch-options.md
|
|
9807
9861
|
*/
|
|
9808
9862
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
9809
9863
|
/**
|
|
9810
9864
|
* Disallow invalid `accept` values on file inputs.
|
|
9811
9865
|
*
|
|
9812
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9866
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-invalid-file-input-accept.md
|
|
9813
9867
|
*/
|
|
9814
9868
|
'unicorn/no-invalid-file-input-accept'?: Linter.RuleEntry<[]>;
|
|
9815
9869
|
/**
|
|
9816
9870
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an
|
|
9817
9871
|
* expression.
|
|
9818
9872
|
*
|
|
9819
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9873
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
9820
9874
|
*/
|
|
9821
9875
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
9822
9876
|
/**
|
|
9823
9877
|
* Disallow invalid implementations of well-known symbol methods.
|
|
9824
9878
|
*
|
|
9825
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9879
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-invalid-well-known-symbol-methods.md
|
|
9826
9880
|
*/
|
|
9827
9881
|
'unicorn/no-invalid-well-known-symbol-methods'?: Linter.RuleEntry<[]>;
|
|
9828
9882
|
/**
|
|
9829
9883
|
* Disallow identifiers starting with `new` or `class`.
|
|
9830
9884
|
*
|
|
9831
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9885
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-keyword-prefix.md
|
|
9832
9886
|
*/
|
|
9833
9887
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
9834
9888
|
/**
|
|
9835
9889
|
* Disallow accessing `event.currentTarget` after the synchronous event
|
|
9836
9890
|
* dispatch has finished.
|
|
9837
9891
|
*
|
|
9838
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9892
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-late-current-target-access.md
|
|
9839
9893
|
*/
|
|
9840
9894
|
'unicorn/no-late-current-target-access'?: Linter.RuleEntry<[]>;
|
|
9841
9895
|
/**
|
|
9842
9896
|
* Disallow event-control method calls after the synchronous event dispatch
|
|
9843
9897
|
* has finished.
|
|
9844
9898
|
*
|
|
9845
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9899
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-late-event-control.md
|
|
9846
9900
|
*/
|
|
9847
9901
|
'unicorn/no-late-event-control'?: Linter.RuleEntry<[]>;
|
|
9848
9902
|
/**
|
|
9849
9903
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
9850
9904
|
*
|
|
9851
9905
|
* @deprecated
|
|
9852
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9906
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
|
|
9853
9907
|
*/
|
|
9854
9908
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
9855
9909
|
/**
|
|
9856
9910
|
* Disallow `if` statements as the only statement in `if` blocks without
|
|
9857
9911
|
* `else`.
|
|
9858
9912
|
*
|
|
9859
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9913
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-lonely-if.md
|
|
9860
9914
|
*/
|
|
9861
9915
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
9862
9916
|
/**
|
|
9863
9917
|
* Disallow mutating a loop iterable during iteration.
|
|
9864
9918
|
*
|
|
9865
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9919
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-loop-iterable-mutation.md
|
|
9866
9920
|
*/
|
|
9867
9921
|
'unicorn/no-loop-iterable-mutation'?: Linter.RuleEntry<[]>;
|
|
9868
9922
|
/**
|
|
9869
9923
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
9870
9924
|
*
|
|
9871
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9925
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
9872
9926
|
*/
|
|
9873
9927
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
9874
9928
|
/**
|
|
9875
9929
|
* Disallow manually wrapped comments.
|
|
9876
9930
|
*
|
|
9877
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9931
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-manually-wrapped-comments.md
|
|
9878
9932
|
*/
|
|
9879
9933
|
'unicorn/no-manually-wrapped-comments'?: Linter.RuleEntry<[]>;
|
|
9880
9934
|
/**
|
|
9881
9935
|
* Disallow checking a Map key before accessing a different key.
|
|
9882
9936
|
*
|
|
9883
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9937
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-mismatched-map-key.md
|
|
9884
9938
|
*/
|
|
9885
9939
|
'unicorn/no-mismatched-map-key'?: Linter.RuleEntry<[]>;
|
|
9886
9940
|
/**
|
|
9887
9941
|
* Disallow misrefactored compound assignments where the target is duplicated
|
|
9888
9942
|
* in the right-hand side.
|
|
9889
9943
|
*
|
|
9890
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9944
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-misrefactored-assignment.md
|
|
9891
9945
|
*/
|
|
9892
9946
|
'unicorn/no-misrefactored-assignment'?: Linter.RuleEntry<[]>;
|
|
9893
9947
|
/**
|
|
9894
9948
|
* Disallow references to missing local resources.
|
|
9895
9949
|
*
|
|
9896
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9950
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-missing-local-resource.md
|
|
9897
9951
|
*/
|
|
9898
9952
|
'unicorn/no-missing-local-resource'?: Linter.RuleEntry<[]>;
|
|
9899
9953
|
/**
|
|
9900
9954
|
* Disallow calling Promise executor resolver functions more than once on the
|
|
9901
9955
|
* same execution path.
|
|
9902
9956
|
*
|
|
9903
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9957
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-multiple-promise-resolver-calls.md
|
|
9904
9958
|
*/
|
|
9905
9959
|
'unicorn/no-multiple-promise-resolver-calls'?: Linter.RuleEntry<[]>;
|
|
9906
9960
|
/**
|
|
9907
9961
|
* Disallow named usage of default import and export.
|
|
9908
9962
|
*
|
|
9909
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9963
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-named-default.md
|
|
9910
9964
|
*/
|
|
9911
9965
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
9912
9966
|
/**
|
|
9913
9967
|
* Disallow negated array predicate calls.
|
|
9914
9968
|
*
|
|
9915
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9969
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-negated-array-predicate.md
|
|
9916
9970
|
*/
|
|
9917
9971
|
'unicorn/no-negated-array-predicate'?: Linter.RuleEntry<[]>;
|
|
9918
9972
|
/**
|
|
9919
9973
|
* Disallow negated comparisons.
|
|
9920
9974
|
*
|
|
9921
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9975
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-negated-comparison.md
|
|
9922
9976
|
*/
|
|
9923
9977
|
'unicorn/no-negated-comparison'?: Linter.RuleEntry<UnicornNoNegatedComparison>;
|
|
9924
9978
|
/**
|
|
9925
9979
|
* Disallow negated conditions.
|
|
9926
9980
|
*
|
|
9927
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9981
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-negated-condition.md
|
|
9928
9982
|
*/
|
|
9929
9983
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
9930
9984
|
/**
|
|
9931
9985
|
* Disallow negated expression in equality check.
|
|
9932
9986
|
*
|
|
9933
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9987
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-negation-in-equality-check.md
|
|
9934
9988
|
*/
|
|
9935
9989
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
9936
9990
|
/**
|
|
9937
9991
|
* Disallow nested ternary expressions.
|
|
9938
9992
|
*
|
|
9939
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9993
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-nested-ternary.md
|
|
9940
9994
|
*/
|
|
9941
9995
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
9942
9996
|
/**
|
|
9943
9997
|
* Disallow `new Array()`.
|
|
9944
9998
|
*
|
|
9945
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9999
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-new-array.md
|
|
9946
10000
|
*/
|
|
9947
10001
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
9948
10002
|
/**
|
|
9949
10003
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the
|
|
9950
10004
|
* deprecated `new Buffer()`.
|
|
9951
10005
|
*
|
|
9952
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10006
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-new-buffer.md
|
|
9953
10007
|
*/
|
|
9954
10008
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
9955
10009
|
/**
|
|
9956
10010
|
* Disallow non-function values with function-style verb prefixes.
|
|
9957
10011
|
*
|
|
9958
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10012
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-non-function-verb-prefix.md
|
|
9959
10013
|
*/
|
|
9960
10014
|
'unicorn/no-non-function-verb-prefix'?: Linter.RuleEntry<UnicornNoNonFunctionVerbPrefix>;
|
|
9961
10015
|
/**
|
|
9962
10016
|
* Disallow non-standard properties on built-in objects.
|
|
9963
10017
|
*
|
|
9964
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10018
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-nonstandard-builtin-properties.md
|
|
9965
10019
|
*/
|
|
9966
10020
|
'unicorn/no-nonstandard-builtin-properties'?: Linter.RuleEntry<[]>;
|
|
9967
10021
|
/**
|
|
9968
10022
|
* Disallow the use of the `null` literal.
|
|
9969
10023
|
*
|
|
9970
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10024
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-null.md
|
|
9971
10025
|
*/
|
|
9972
10026
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
9973
10027
|
/**
|
|
9974
10028
|
* Disallow the use of objects as default parameters.
|
|
9975
10029
|
*
|
|
9976
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10030
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-object-as-default-parameter.md
|
|
9977
10031
|
*/
|
|
9978
10032
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
9979
10033
|
/**
|
|
9980
10034
|
* Disallow `Object` methods with `Map` or `Set`.
|
|
9981
10035
|
*
|
|
9982
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10036
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-object-methods-with-collections.md
|
|
9983
10037
|
*/
|
|
9984
10038
|
'unicorn/no-object-methods-with-collections'?: Linter.RuleEntry<[]>;
|
|
9985
10039
|
/**
|
|
9986
10040
|
* Disallow optional chaining on undeclared variables.
|
|
9987
10041
|
*
|
|
9988
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10042
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-optional-chaining-on-undeclared-variable.md
|
|
9989
10043
|
*/
|
|
9990
10044
|
'unicorn/no-optional-chaining-on-undeclared-variable'?: Linter.RuleEntry<[]>;
|
|
9991
10045
|
/**
|
|
9992
10046
|
* Disallow `process.exit()`.
|
|
9993
10047
|
*
|
|
9994
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10048
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-process-exit.md
|
|
9995
10049
|
*/
|
|
9996
10050
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
9997
10051
|
/**
|
|
9998
10052
|
* Disallow comparisons made redundant by an equality check in the same
|
|
9999
10053
|
* logical AND.
|
|
10000
10054
|
*
|
|
10001
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10055
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-redundant-comparison.md
|
|
10002
10056
|
*/
|
|
10003
10057
|
'unicorn/no-redundant-comparison'?: Linter.RuleEntry<[]>;
|
|
10004
10058
|
/**
|
|
10005
10059
|
* Disallow using the return value of `Array#push()` and `Array#unshift()`.
|
|
10006
10060
|
*
|
|
10007
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10061
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-return-array-push.md
|
|
10008
10062
|
*/
|
|
10009
10063
|
'unicorn/no-return-array-push'?: Linter.RuleEntry<[]>;
|
|
10010
10064
|
/**
|
|
10011
10065
|
* Disallow selector syntax in DOM names.
|
|
10012
10066
|
*
|
|
10013
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10067
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-selector-as-dom-name.md
|
|
10014
10068
|
*/
|
|
10015
10069
|
'unicorn/no-selector-as-dom-name'?: Linter.RuleEntry<[]>;
|
|
10016
10070
|
/**
|
|
10017
10071
|
* Disallow shorthand properties that override related longhand properties.
|
|
10018
10072
|
*
|
|
10019
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10073
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-shorthand-property-overrides.md
|
|
10020
10074
|
*/
|
|
10021
10075
|
'unicorn/no-shorthand-property-overrides'?: Linter.RuleEntry<[]>;
|
|
10022
10076
|
/**
|
|
10023
10077
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
10024
10078
|
*
|
|
10025
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10079
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
10026
10080
|
*/
|
|
10027
10081
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
10028
10082
|
/**
|
|
10029
10083
|
* Disallow classes that only have static members.
|
|
10030
10084
|
*
|
|
10031
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10085
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-static-only-class.md
|
|
10032
10086
|
*/
|
|
10033
10087
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
10034
10088
|
/**
|
|
10035
10089
|
* Prefer comparing values directly over subtracting and comparing to `0`.
|
|
10036
10090
|
*
|
|
10037
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10091
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-subtraction-comparison.md
|
|
10038
10092
|
*/
|
|
10039
10093
|
'unicorn/no-subtraction-comparison'?: Linter.RuleEntry<[]>;
|
|
10040
10094
|
/**
|
|
10041
10095
|
* Disallow `then` property.
|
|
10042
10096
|
*
|
|
10043
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10097
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-thenable.md
|
|
10044
10098
|
*/
|
|
10045
10099
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
10046
10100
|
/**
|
|
10047
10101
|
* Disallow assigning `this` to a variable.
|
|
10048
10102
|
*
|
|
10049
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10103
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-this-assignment.md
|
|
10050
10104
|
*/
|
|
10051
10105
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
10052
10106
|
/**
|
|
10053
10107
|
* Disallow `this` outside of classes.
|
|
10054
10108
|
*
|
|
10055
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10109
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-this-outside-of-class.md
|
|
10056
10110
|
*/
|
|
10057
10111
|
'unicorn/no-this-outside-of-class'?: Linter.RuleEntry<[]>;
|
|
10058
10112
|
/**
|
|
10059
10113
|
* Disallow assigning to top-level variables from inside functions.
|
|
10060
10114
|
*
|
|
10061
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10115
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-top-level-assignment-in-function.md
|
|
10062
10116
|
*/
|
|
10063
10117
|
'unicorn/no-top-level-assignment-in-function'?: Linter.RuleEntry<[]>;
|
|
10064
10118
|
/**
|
|
10065
10119
|
* Disallow top-level side effects in exported modules.
|
|
10066
10120
|
*
|
|
10067
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10121
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-top-level-side-effects.md
|
|
10068
10122
|
*/
|
|
10069
10123
|
'unicorn/no-top-level-side-effects'?: Linter.RuleEntry<[]>;
|
|
10070
10124
|
/**
|
|
10071
10125
|
* Disallow `all` as a transition property.
|
|
10072
10126
|
*
|
|
10073
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10127
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-transition-all.md
|
|
10074
10128
|
*/
|
|
10075
10129
|
'unicorn/no-transition-all'?: Linter.RuleEntry<[]>;
|
|
10076
10130
|
/**
|
|
10077
10131
|
* Disallow comparing `undefined` using `typeof`.
|
|
10078
10132
|
*
|
|
10079
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10133
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-typeof-undefined.md
|
|
10080
10134
|
*/
|
|
10081
10135
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
10082
10136
|
/**
|
|
10083
10137
|
* Disallow referencing methods without calling them.
|
|
10084
10138
|
*
|
|
10085
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10139
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-uncalled-method.md
|
|
10086
10140
|
*/
|
|
10087
10141
|
'unicorn/no-uncalled-method'?: Linter.RuleEntry<[]>;
|
|
10088
10142
|
/**
|
|
10089
10143
|
* Require class members to be declared.
|
|
10090
10144
|
*
|
|
10091
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10145
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-undeclared-class-members.md
|
|
10092
10146
|
*/
|
|
10093
10147
|
'unicorn/no-undeclared-class-members'?: Linter.RuleEntry<[]>;
|
|
10094
10148
|
/**
|
|
10095
10149
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
10096
10150
|
*
|
|
10097
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10151
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
10098
10152
|
*/
|
|
10099
10153
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
10100
10154
|
/**
|
|
10101
10155
|
* Disallow `Array#flatMap()` callbacks that only wrap a single item.
|
|
10102
10156
|
*
|
|
10103
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10157
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-array-flat-map.md
|
|
10104
10158
|
*/
|
|
10105
10159
|
'unicorn/no-unnecessary-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
10106
10160
|
/**
|
|
10107
10161
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount`
|
|
10108
10162
|
* argument of `Array#{splice,toSpliced}()`.
|
|
10109
10163
|
*
|
|
10110
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10164
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
10111
10165
|
*/
|
|
10112
10166
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
10113
10167
|
/**
|
|
10114
10168
|
* Disallow awaiting non-promise values.
|
|
10115
10169
|
*
|
|
10116
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10170
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-await.md
|
|
10117
10171
|
*/
|
|
10118
10172
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
10119
10173
|
/**
|
|
10120
10174
|
* Disallow unnecessary comparisons against boolean literals.
|
|
10121
10175
|
*
|
|
10122
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10176
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-boolean-comparison.md
|
|
10123
10177
|
*/
|
|
10124
10178
|
'unicorn/no-unnecessary-boolean-comparison'?: Linter.RuleEntry<[]>;
|
|
10125
10179
|
/**
|
|
10126
10180
|
* Disallow unnecessary options in `fetch()` and `new Request()`.
|
|
10127
10181
|
*
|
|
10128
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10182
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-fetch-options.md
|
|
10129
10183
|
*/
|
|
10130
10184
|
'unicorn/no-unnecessary-fetch-options'?: Linter.RuleEntry<[]>;
|
|
10131
10185
|
/**
|
|
10132
10186
|
* Disallow unnecessary `globalThis` references.
|
|
10133
10187
|
*
|
|
10134
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10188
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-global-this.md
|
|
10135
10189
|
*/
|
|
10136
10190
|
'unicorn/no-unnecessary-global-this'?: Linter.RuleEntry<[]>;
|
|
10137
10191
|
/**
|
|
10138
10192
|
* Disallow unnecessary nested ternary expressions.
|
|
10139
10193
|
*
|
|
10140
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10194
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-nested-ternary.md
|
|
10141
10195
|
*/
|
|
10142
10196
|
'unicorn/no-unnecessary-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
10143
10197
|
/**
|
|
10144
10198
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
10145
10199
|
*
|
|
10146
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10200
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
10147
10201
|
*/
|
|
10148
10202
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
10149
10203
|
/**
|
|
10150
10204
|
* Disallow using `.length` or `Infinity` as the `end` argument of
|
|
10151
10205
|
* `{Array,String,TypedArray}#slice()`.
|
|
10152
10206
|
*
|
|
10153
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10207
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
10154
10208
|
*/
|
|
10155
10209
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
10156
10210
|
/**
|
|
10157
10211
|
* Disallow `Array#splice()` when simpler alternatives exist.
|
|
10158
10212
|
*
|
|
10159
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10213
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-splice.md
|
|
10160
10214
|
*/
|
|
10161
10215
|
'unicorn/no-unnecessary-splice'?: Linter.RuleEntry<[]>;
|
|
10162
10216
|
/**
|
|
10163
10217
|
* Disallow `String#trim()` before `String#startsWith()` or
|
|
10164
10218
|
* `String#endsWith()`.
|
|
10165
10219
|
*
|
|
10166
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10220
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unnecessary-string-trim.md
|
|
10167
10221
|
*/
|
|
10168
10222
|
'unicorn/no-unnecessary-string-trim'?: Linter.RuleEntry<[]>;
|
|
10169
10223
|
/**
|
|
10170
10224
|
* Disallow unreadable array destructuring.
|
|
10171
10225
|
*
|
|
10172
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10226
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
10173
10227
|
*/
|
|
10174
10228
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<UnicornNoUnreadableArrayDestructuring>;
|
|
10175
10229
|
/**
|
|
10176
10230
|
* Disallow unreadable iterable expressions in `for…of` and `for await…of`
|
|
10177
10231
|
* loop headers.
|
|
10178
10232
|
*
|
|
10179
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10233
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unreadable-for-of-expression.md
|
|
10180
10234
|
*/
|
|
10181
10235
|
'unicorn/no-unreadable-for-of-expression'?: Linter.RuleEntry<[]>;
|
|
10182
10236
|
/**
|
|
10183
10237
|
* Disallow unreadable IIFEs.
|
|
10184
10238
|
*
|
|
10185
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10239
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unreadable-iife.md
|
|
10186
10240
|
*/
|
|
10187
10241
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
10188
10242
|
/**
|
|
10189
10243
|
* Disallow unreadable `new` expressions.
|
|
10190
10244
|
*
|
|
10191
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10245
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unreadable-new-expression.md
|
|
10192
10246
|
*/
|
|
10193
10247
|
'unicorn/no-unreadable-new-expression'?: Linter.RuleEntry<[]>;
|
|
10194
10248
|
/**
|
|
10195
10249
|
* Disallow unreadable object destructuring.
|
|
10196
10250
|
*
|
|
10197
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10251
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unreadable-object-destructuring.md
|
|
10198
10252
|
*/
|
|
10199
10253
|
'unicorn/no-unreadable-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
10200
10254
|
/**
|
|
10201
10255
|
* Prevent unsafe use of ArrayBuffer view `.buffer`.
|
|
10202
10256
|
*
|
|
10203
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10257
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unsafe-buffer-conversion.md
|
|
10204
10258
|
*/
|
|
10205
10259
|
'unicorn/no-unsafe-buffer-conversion'?: Linter.RuleEntry<[]>;
|
|
10206
10260
|
/**
|
|
10207
10261
|
* Disallow unsafe DOM HTML APIs.
|
|
10208
10262
|
*
|
|
10209
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10263
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unsafe-dom-html.md
|
|
10210
10264
|
*/
|
|
10211
10265
|
'unicorn/no-unsafe-dom-html'?: Linter.RuleEntry<[]>;
|
|
10212
10266
|
/**
|
|
10213
10267
|
* Disallow reading `.value` from `Promise.allSettled()` results without a
|
|
10214
10268
|
* fulfilled status guard.
|
|
10215
10269
|
*
|
|
10216
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10270
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unsafe-promise-all-settled-values.md
|
|
10217
10271
|
*/
|
|
10218
10272
|
'unicorn/no-unsafe-promise-all-settled-values'?: Linter.RuleEntry<[]>;
|
|
10219
10273
|
/**
|
|
10220
10274
|
* Disallow unsafe values as property keys.
|
|
10221
10275
|
*
|
|
10222
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10276
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unsafe-property-key.md
|
|
10223
10277
|
*/
|
|
10224
10278
|
'unicorn/no-unsafe-property-key'?: Linter.RuleEntry<[]>;
|
|
10279
|
+
/**
|
|
10280
|
+
* Disallow interpolation into SQL strings passed to Node’s `node:sqlite`
|
|
10281
|
+
* APIs.
|
|
10282
|
+
*
|
|
10283
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unsafe-sqlite-interpolation.md
|
|
10284
|
+
*/
|
|
10285
|
+
'unicorn/no-unsafe-sqlite-interpolation'?: Linter.RuleEntry<[]>;
|
|
10225
10286
|
/**
|
|
10226
10287
|
* Disallow non-literal replacement values in `String#replace()` and
|
|
10227
10288
|
* `String#replaceAll()`.
|
|
10228
10289
|
*
|
|
10229
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10290
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unsafe-string-replacement.md
|
|
10230
10291
|
*/
|
|
10231
10292
|
'unicorn/no-unsafe-string-replacement'?: Linter.RuleEntry<[]>;
|
|
10232
10293
|
/**
|
|
10233
10294
|
* Disallow ignoring the return value of selected array methods.
|
|
10234
10295
|
*
|
|
10235
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10296
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unused-array-method-return.md
|
|
10236
10297
|
*/
|
|
10237
10298
|
'unicorn/no-unused-array-method-return'?: Linter.RuleEntry<[]>;
|
|
10238
10299
|
/**
|
|
10239
10300
|
* Disallow unused object properties.
|
|
10240
10301
|
*
|
|
10241
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10302
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-unused-properties.md
|
|
10242
10303
|
*/
|
|
10243
10304
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
10244
10305
|
/**
|
|
10245
10306
|
* Disallow unnecessary `Boolean()` casts in array predicate callbacks.
|
|
10246
10307
|
*
|
|
10247
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10308
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-boolean-cast.md
|
|
10248
10309
|
*/
|
|
10249
10310
|
'unicorn/no-useless-boolean-cast'?: Linter.RuleEntry<[]>;
|
|
10250
10311
|
/**
|
|
10251
10312
|
* Disallow useless type coercions of values that are already of the target
|
|
10252
10313
|
* type.
|
|
10253
10314
|
*
|
|
10254
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10315
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-coercion.md
|
|
10255
10316
|
*/
|
|
10256
10317
|
'unicorn/no-useless-coercion'?: Linter.RuleEntry<[]>;
|
|
10257
10318
|
/**
|
|
10258
10319
|
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or
|
|
10259
10320
|
* `WeakMap`.
|
|
10260
10321
|
*
|
|
10261
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10322
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-collection-argument.md
|
|
10262
10323
|
*/
|
|
10263
10324
|
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
|
|
10264
10325
|
/**
|
|
10265
10326
|
* Disallow useless compound assignments such as `x += 0`.
|
|
10266
10327
|
*
|
|
10267
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10328
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-compound-assignment.md
|
|
10268
10329
|
*/
|
|
10269
10330
|
'unicorn/no-useless-compound-assignment'?: Linter.RuleEntry<[]>;
|
|
10270
10331
|
/**
|
|
10271
10332
|
* Disallow useless concatenation of literals.
|
|
10272
10333
|
*
|
|
10273
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10334
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-concat.md
|
|
10274
10335
|
*/
|
|
10275
10336
|
'unicorn/no-useless-concat'?: Linter.RuleEntry<[]>;
|
|
10276
10337
|
/**
|
|
10277
10338
|
* Disallow useless `continue` statements.
|
|
10278
10339
|
*
|
|
10279
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10340
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-continue.md
|
|
10280
10341
|
*/
|
|
10281
10342
|
'unicorn/no-useless-continue'?: Linter.RuleEntry<[]>;
|
|
10282
10343
|
/**
|
|
10283
10344
|
* Disallow unnecessary existence checks before deletion.
|
|
10284
10345
|
*
|
|
10285
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10346
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-delete-check.md
|
|
10286
10347
|
*/
|
|
10287
10348
|
'unicorn/no-useless-delete-check'?: Linter.RuleEntry<[]>;
|
|
10288
10349
|
/**
|
|
10289
10350
|
* Disallow `else` after a statement that exits.
|
|
10290
10351
|
*
|
|
10291
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10352
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-else.md
|
|
10292
10353
|
*/
|
|
10293
10354
|
'unicorn/no-useless-else'?: Linter.RuleEntry<[]>;
|
|
10294
10355
|
/**
|
|
10295
10356
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
10296
10357
|
*
|
|
10297
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10358
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
10298
10359
|
*/
|
|
10299
10360
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
10300
10361
|
/**
|
|
10301
10362
|
* Disallow useless fallback when spreading in object literals.
|
|
10302
10363
|
*
|
|
10303
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10364
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
10304
10365
|
*/
|
|
10305
10366
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
10306
10367
|
/**
|
|
10307
10368
|
* Disallow unnecessary `.toArray()` on iterators.
|
|
10308
10369
|
*
|
|
10309
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10370
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-iterator-to-array.md
|
|
10310
10371
|
*/
|
|
10311
10372
|
'unicorn/no-useless-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
10312
10373
|
/**
|
|
10313
10374
|
* Disallow useless array length check.
|
|
10314
10375
|
*
|
|
10315
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10376
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-length-check.md
|
|
10316
10377
|
*/
|
|
10317
10378
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
10318
10379
|
/**
|
|
10319
10380
|
* Disallow unnecessary operands in logical expressions involving boolean
|
|
10320
10381
|
* literals.
|
|
10321
10382
|
*
|
|
10322
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10383
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-logical-operand.md
|
|
10323
10384
|
*/
|
|
10324
10385
|
'unicorn/no-useless-logical-operand'?: Linter.RuleEntry<[]>;
|
|
10325
10386
|
/**
|
|
10326
10387
|
* Disallow useless overrides of class methods.
|
|
10327
10388
|
*
|
|
10328
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10389
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-override.md
|
|
10329
10390
|
*/
|
|
10330
10391
|
'unicorn/no-useless-override'?: Linter.RuleEntry<[]>;
|
|
10331
10392
|
/**
|
|
10332
10393
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions
|
|
10333
10394
|
* or promise callbacks
|
|
10334
10395
|
*
|
|
10335
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10396
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
10336
10397
|
*/
|
|
10337
10398
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
10338
10399
|
/**
|
|
10339
10400
|
* Disallow redundant re-exports.
|
|
10340
10401
|
*
|
|
10341
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10402
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-re-export.md
|
|
10342
10403
|
*/
|
|
10343
10404
|
'unicorn/no-useless-re-export'?: Linter.RuleEntry<[]>;
|
|
10344
10405
|
/**
|
|
10345
10406
|
* Disallow simple recursive function calls that can be replaced with a loop.
|
|
10346
10407
|
*
|
|
10347
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10408
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-recursion.md
|
|
10348
10409
|
*/
|
|
10349
10410
|
'unicorn/no-useless-recursion'?: Linter.RuleEntry<[]>;
|
|
10350
10411
|
/**
|
|
10351
10412
|
* Disallow unnecessary spread.
|
|
10352
10413
|
*
|
|
10353
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10414
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-spread.md
|
|
10354
10415
|
*/
|
|
10355
10416
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
10356
10417
|
/**
|
|
10357
10418
|
* Disallow useless case in switch statements.
|
|
10358
10419
|
*
|
|
10359
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10420
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-switch-case.md
|
|
10360
10421
|
*/
|
|
10361
10422
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
10362
10423
|
/**
|
|
10363
10424
|
* Disallow useless template literal expressions.
|
|
10364
10425
|
*
|
|
10365
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10426
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-template-literals.md
|
|
10366
10427
|
*/
|
|
10367
10428
|
'unicorn/no-useless-template-literals'?: Linter.RuleEntry<[]>;
|
|
10368
10429
|
/**
|
|
10369
10430
|
* Disallow useless `undefined`.
|
|
10370
10431
|
*
|
|
10371
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10432
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-useless-undefined.md
|
|
10372
10433
|
*/
|
|
10373
10434
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
10374
10435
|
/**
|
|
10375
10436
|
* Disallow the bitwise XOR operator where exponentiation was likely intended.
|
|
10376
10437
|
*
|
|
10377
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10438
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-xor-as-exponentiation.md
|
|
10378
10439
|
*/
|
|
10379
10440
|
'unicorn/no-xor-as-exponentiation'?: Linter.RuleEntry<[]>;
|
|
10380
10441
|
/**
|
|
10381
10442
|
* Disallow number literals with zero fractions or dangling dots.
|
|
10382
10443
|
*
|
|
10383
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10444
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/no-zero-fractions.md
|
|
10384
10445
|
*/
|
|
10385
10446
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
10386
10447
|
/**
|
|
10387
10448
|
* Enforce proper case for numeric literals.
|
|
10388
10449
|
*
|
|
10389
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10450
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/number-literal-case.md
|
|
10390
10451
|
*/
|
|
10391
10452
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
10392
10453
|
/**
|
|
10393
10454
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
10394
10455
|
*
|
|
10395
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10456
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/numeric-separators-style.md
|
|
10396
10457
|
*/
|
|
10397
10458
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
10398
10459
|
/**
|
|
10399
10460
|
* Require assignment operator shorthand where possible.
|
|
10400
10461
|
*
|
|
10401
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10462
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/operator-assignment.md
|
|
10402
10463
|
*/
|
|
10403
10464
|
'unicorn/operator-assignment'?: Linter.RuleEntry<UnicornOperatorAssignment>;
|
|
10404
10465
|
/**
|
|
10405
10466
|
* Prefer `AbortSignal.any()` over manually forwarding abort events between
|
|
10406
10467
|
* signals.
|
|
10407
10468
|
*
|
|
10408
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10469
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-abort-signal-any.md
|
|
10409
10470
|
*/
|
|
10410
10471
|
'unicorn/prefer-abort-signal-any'?: Linter.RuleEntry<[]>;
|
|
10411
10472
|
/**
|
|
10412
10473
|
* Prefer `AbortSignal.timeout()` over manually aborting an `AbortController`
|
|
10413
10474
|
* with `setTimeout()`.
|
|
10414
10475
|
*
|
|
10415
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10476
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-abort-signal-timeout.md
|
|
10416
10477
|
*/
|
|
10417
10478
|
'unicorn/prefer-abort-signal-timeout'?: Linter.RuleEntry<[]>;
|
|
10418
10479
|
/**
|
|
10419
10480
|
* Prefer `.addEventListener()` and `.removeEventListener()` over
|
|
10420
10481
|
* `on`-functions.
|
|
10421
10482
|
*
|
|
10422
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10483
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-add-event-listener.md
|
|
10423
10484
|
*/
|
|
10424
10485
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
10425
10486
|
/**
|
|
10426
10487
|
* Prefer an options object over a boolean in `.addEventListener()`.
|
|
10427
10488
|
*
|
|
10428
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10489
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-add-event-listener-options.md
|
|
10429
10490
|
*/
|
|
10430
10491
|
'unicorn/prefer-add-event-listener-options'?: Linter.RuleEntry<[]>;
|
|
10431
10492
|
/**
|
|
10432
10493
|
* Prefer `AggregateError` when throwing collected errors.
|
|
10433
10494
|
*
|
|
10434
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10495
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-aggregate-error.md
|
|
10435
10496
|
*/
|
|
10436
10497
|
'unicorn/prefer-aggregate-error'?: Linter.RuleEntry<[]>;
|
|
10437
10498
|
/**
|
|
10438
10499
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from
|
|
10439
10500
|
* `.filter(…)`.
|
|
10440
10501
|
*
|
|
10441
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10502
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-array-find.md
|
|
10442
10503
|
*/
|
|
10443
10504
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
10444
10505
|
/**
|
|
10445
10506
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
10446
10507
|
*
|
|
10447
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10508
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-array-flat.md
|
|
10448
10509
|
*/
|
|
10449
10510
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
10450
10511
|
/**
|
|
10451
10512
|
* Prefer `.flatMap(…)` over `.map(…).flat()` and `.filter(…).flatMap(…)`.
|
|
10452
10513
|
*
|
|
10453
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10514
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-array-flat-map.md
|
|
10454
10515
|
*/
|
|
10455
10516
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
10456
10517
|
/**
|
|
10457
10518
|
* Prefer `Array.fromAsync()` over `for await…of` array accumulation.
|
|
10458
10519
|
*
|
|
10459
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10520
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-array-from-async.md
|
|
10460
10521
|
*/
|
|
10461
10522
|
'unicorn/prefer-array-from-async'?: Linter.RuleEntry<[]>;
|
|
10462
10523
|
/**
|
|
10463
10524
|
* Prefer using the `Array.from()` mapping function argument.
|
|
10464
10525
|
*
|
|
10465
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10526
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-array-from-map.md
|
|
10466
10527
|
*/
|
|
10467
10528
|
'unicorn/prefer-array-from-map'?: Linter.RuleEntry<[]>;
|
|
10468
10529
|
/**
|
|
10469
10530
|
* Prefer `Array.from({length}, …)` when creating range arrays.
|
|
10470
10531
|
*
|
|
10471
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10532
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-array-from-range.md
|
|
10472
10533
|
*/
|
|
10473
10534
|
'unicorn/prefer-array-from-range'?: Linter.RuleEntry<[]>;
|
|
10474
10535
|
/**
|
|
10475
10536
|
* Prefer `Array#{indexOf,lastIndexOf}()` over
|
|
10476
10537
|
* `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
10477
10538
|
*
|
|
10478
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10539
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-array-index-of.md
|
|
10479
10540
|
*/
|
|
10480
10541
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
10481
10542
|
/**
|
|
10482
10543
|
* Prefer iterating an array directly or with `Array#keys()` over
|
|
10483
10544
|
* `Array#entries()` when the index or value is unused.
|
|
10484
10545
|
*
|
|
10485
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10546
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-array-iterable-methods.md
|
|
10486
10547
|
*/
|
|
10487
10548
|
'unicorn/prefer-array-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
10488
10549
|
/**
|
|
10489
10550
|
* Prefer last-oriented array methods over `Array#reverse()` or
|
|
10490
10551
|
* `Array#toReversed()` followed by a method.
|
|
10491
10552
|
*
|
|
10492
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10553
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-array-last-methods.md
|
|
10493
10554
|
*/
|
|
10494
10555
|
'unicorn/prefer-array-last-methods'?: Linter.RuleEntry<[]>;
|
|
10495
10556
|
/**
|
|
10496
10557
|
* Prefer `Array#slice()` over `Array#splice()` when reading from the returned
|
|
10497
10558
|
* array.
|
|
10498
10559
|
*
|
|
10499
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10560
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-array-slice.md
|
|
10500
10561
|
*/
|
|
10501
10562
|
'unicorn/prefer-array-slice'?: Linter.RuleEntry<[]>;
|
|
10502
10563
|
/**
|
|
10503
10564
|
* Prefer `.some(…)` over `.filter(…).length` check and
|
|
10504
10565
|
* `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
10505
10566
|
*
|
|
10506
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10567
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-array-some.md
|
|
10507
10568
|
*/
|
|
10508
10569
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
10509
10570
|
/**
|
|
10510
10571
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
10511
10572
|
*
|
|
10512
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10573
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-at.md
|
|
10513
10574
|
*/
|
|
10514
10575
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
10515
10576
|
/**
|
|
10516
10577
|
* Prefer `await` over promise chaining.
|
|
10517
10578
|
*
|
|
10518
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10579
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-await.md
|
|
10519
10580
|
*/
|
|
10520
10581
|
'unicorn/prefer-await'?: Linter.RuleEntry<[]>;
|
|
10521
10582
|
/**
|
|
10522
10583
|
* Prefer `BigInt` literals over the constructor.
|
|
10523
10584
|
*
|
|
10524
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10585
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-bigint-literals.md
|
|
10525
10586
|
*/
|
|
10526
10587
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
10527
10588
|
/**
|
|
10528
10589
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and
|
|
10529
10590
|
* `Blob#text()` over `FileReader#readAsText(…)`.
|
|
10530
10591
|
*
|
|
10531
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10592
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
10532
10593
|
*/
|
|
10533
10594
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
10534
10595
|
/**
|
|
10535
10596
|
* Prefer block statements over IIFEs used only for scoping.
|
|
10536
10597
|
*
|
|
10537
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10598
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-block-statement-over-iife.md
|
|
10538
10599
|
*/
|
|
10539
10600
|
'unicorn/prefer-block-statement-over-iife'?: Linter.RuleEntry<[]>;
|
|
10540
10601
|
/**
|
|
10541
10602
|
* Prefer directly returning boolean expressions over `if` statements.
|
|
10542
10603
|
*
|
|
10543
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10604
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-boolean-return.md
|
|
10544
10605
|
*/
|
|
10545
10606
|
'unicorn/prefer-boolean-return'?: Linter.RuleEntry<[]>;
|
|
10546
10607
|
/**
|
|
10547
10608
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
10548
10609
|
*
|
|
10549
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10610
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-class-fields.md
|
|
10550
10611
|
*/
|
|
10551
10612
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
10552
10613
|
/**
|
|
10553
10614
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
10554
10615
|
*
|
|
10555
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10616
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-classlist-toggle.md
|
|
10556
10617
|
*/
|
|
10557
10618
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
10558
10619
|
/**
|
|
10559
10620
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and
|
|
10560
10621
|
* `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
10561
10622
|
*
|
|
10562
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10623
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-code-point.md
|
|
10563
10624
|
*/
|
|
10564
10625
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
10565
10626
|
/**
|
|
10566
10627
|
* Prefer early continues over whole-loop conditional wrapping.
|
|
10567
10628
|
*
|
|
10568
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10629
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-continue.md
|
|
10569
10630
|
*/
|
|
10570
10631
|
'unicorn/prefer-continue'?: Linter.RuleEntry<UnicornPreferContinue>;
|
|
10571
10632
|
/**
|
|
10572
10633
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
10573
10634
|
*
|
|
10574
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10635
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-date-now.md
|
|
10575
10636
|
*/
|
|
10576
10637
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
10577
10638
|
/**
|
|
10578
10639
|
* Prefer default parameters over reassignment.
|
|
10579
10640
|
*
|
|
10580
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10641
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-default-parameters.md
|
|
10581
10642
|
*/
|
|
10582
10643
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
10583
10644
|
/**
|
|
10584
10645
|
* Prefer direct iteration over default iterator method calls.
|
|
10585
10646
|
*
|
|
10586
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10647
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-direct-iteration.md
|
|
10587
10648
|
*/
|
|
10588
10649
|
'unicorn/prefer-direct-iteration'?: Linter.RuleEntry<[]>;
|
|
10589
10650
|
/**
|
|
10590
10651
|
* Prefer using `using`/`await using` over manual `try`/`finally` resource
|
|
10591
10652
|
* disposal.
|
|
10592
10653
|
*
|
|
10593
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10654
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-dispose.md
|
|
10594
10655
|
*/
|
|
10595
10656
|
'unicorn/prefer-dispose'?: Linter.RuleEntry<[]>;
|
|
10596
10657
|
/**
|
|
10597
10658
|
* Prefer `Element#append()` over `Node#appendChild()`.
|
|
10598
10659
|
*
|
|
10599
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10660
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-dom-node-append.md
|
|
10600
10661
|
*/
|
|
10601
10662
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
10602
10663
|
/**
|
|
10603
10664
|
* Renamed to `unicorn/dom-node-dataset`.
|
|
10604
10665
|
*
|
|
10605
10666
|
* @deprecated
|
|
10606
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10667
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/deleted-and-deprecated-rules.md#prefer-dom-node-dataset
|
|
10607
10668
|
*/
|
|
10608
10669
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
10609
10670
|
/**
|
|
10610
10671
|
* Prefer `.getHTML()` and `.setHTML()` over `.innerHTML`.
|
|
10611
10672
|
*
|
|
10612
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10673
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-dom-node-html-methods.md
|
|
10613
10674
|
*/
|
|
10614
10675
|
'unicorn/prefer-dom-node-html-methods'?: Linter.RuleEntry<UnicornPreferDomNodeHtmlMethods>;
|
|
10615
10676
|
/**
|
|
10616
10677
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
10617
10678
|
*
|
|
10618
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10679
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-dom-node-remove.md
|
|
10619
10680
|
*/
|
|
10620
10681
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
10621
10682
|
/**
|
|
10622
10683
|
* Prefer `.replaceChildren()` when emptying DOM children.
|
|
10623
10684
|
*
|
|
10624
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10685
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-dom-node-replace-children.md
|
|
10625
10686
|
*/
|
|
10626
10687
|
'unicorn/prefer-dom-node-replace-children'?: Linter.RuleEntry<[]>;
|
|
10627
10688
|
/**
|
|
10628
10689
|
* Prefer `.textContent` over `.innerText`.
|
|
10629
10690
|
*
|
|
10630
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10691
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
10631
10692
|
*/
|
|
10632
10693
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
10633
10694
|
/**
|
|
10634
10695
|
* Prefer early returns over full-function conditional wrapping.
|
|
10635
10696
|
*
|
|
10636
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10697
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-early-return.md
|
|
10637
10698
|
*/
|
|
10638
10699
|
'unicorn/prefer-early-return'?: Linter.RuleEntry<UnicornPreferEarlyReturn>;
|
|
10639
10700
|
/**
|
|
10640
10701
|
* Prefer `else if` over adjacent `if` statements with related conditions.
|
|
10641
10702
|
*
|
|
10642
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10703
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-else-if.md
|
|
10643
10704
|
*/
|
|
10644
10705
|
'unicorn/prefer-else-if'?: Linter.RuleEntry<[]>;
|
|
10645
10706
|
/**
|
|
10646
10707
|
* Prefer `Error.isError()` when checking for errors.
|
|
10647
10708
|
*
|
|
10648
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10709
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-error-is-error.md
|
|
10649
10710
|
*/
|
|
10650
10711
|
'unicorn/prefer-error-is-error'?: Linter.RuleEntry<[]>;
|
|
10651
10712
|
/**
|
|
10652
10713
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
10653
10714
|
*
|
|
10654
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10715
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-event-target.md
|
|
10655
10716
|
*/
|
|
10656
10717
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
10657
10718
|
/**
|
|
10658
10719
|
* Prefer explicit viewport units.
|
|
10659
10720
|
*
|
|
10660
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10721
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-explicit-viewport-units.md
|
|
10661
10722
|
*/
|
|
10662
10723
|
'unicorn/prefer-explicit-viewport-units'?: Linter.RuleEntry<UnicornPreferExplicitViewportUnits>;
|
|
10663
10724
|
/**
|
|
10664
10725
|
* Prefer `export…from` when re-exporting.
|
|
10665
10726
|
*
|
|
10666
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10727
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-export-from.md
|
|
10667
10728
|
*/
|
|
10668
10729
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
10669
10730
|
/**
|
|
10670
10731
|
* Prefer flat `Math.min()` and `Math.max()` calls over nested calls.
|
|
10671
10732
|
*
|
|
10672
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10733
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-flat-math-min-max.md
|
|
10673
10734
|
*/
|
|
10674
10735
|
'unicorn/prefer-flat-math-min-max'?: Linter.RuleEntry<[]>;
|
|
10675
10736
|
/**
|
|
10676
10737
|
* Prefer `.getOrInsertComputed()` when the default value has side effects.
|
|
10677
10738
|
*
|
|
10678
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10739
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-get-or-insert-computed.md
|
|
10679
10740
|
*/
|
|
10680
10741
|
'unicorn/prefer-get-or-insert-computed'?: Linter.RuleEntry<[]>;
|
|
10681
10742
|
/**
|
|
10682
10743
|
* Prefer global numeric constants over `Number` static properties.
|
|
10683
10744
|
*
|
|
10684
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10745
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-global-number-constants.md
|
|
10685
10746
|
*/
|
|
10686
10747
|
'unicorn/prefer-global-number-constants'?: Linter.RuleEntry<[]>;
|
|
10687
10748
|
/**
|
|
10688
10749
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
10689
10750
|
*
|
|
10690
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10751
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-global-this.md
|
|
10691
10752
|
*/
|
|
10692
10753
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
10693
10754
|
/**
|
|
10694
10755
|
* Prefer `Object.groupBy()` or `Map.groupBy()` over reduce-based grouping.
|
|
10695
10756
|
*
|
|
10696
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10757
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-group-by.md
|
|
10697
10758
|
*/
|
|
10698
10759
|
'unicorn/prefer-group-by'?: Linter.RuleEntry<[]>;
|
|
10699
10760
|
/**
|
|
10700
10761
|
* Prefer `.has()` when checking existence.
|
|
10701
10762
|
*
|
|
10702
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10763
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-has-check.md
|
|
10703
10764
|
*/
|
|
10704
10765
|
'unicorn/prefer-has-check'?: Linter.RuleEntry<[]>;
|
|
10705
10766
|
/**
|
|
10706
10767
|
* Prefer moving code shared by all branches of an `if` statement out of the
|
|
10707
10768
|
* branches.
|
|
10708
10769
|
*
|
|
10709
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10770
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-hoisting-branch-code.md
|
|
10710
10771
|
*/
|
|
10711
10772
|
'unicorn/prefer-hoisting-branch-code'?: Linter.RuleEntry<[]>;
|
|
10712
10773
|
/**
|
|
10713
10774
|
* Prefer HTTPS over HTTP.
|
|
10714
10775
|
*
|
|
10715
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10776
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-https.md
|
|
10716
10777
|
*/
|
|
10717
|
-
'unicorn/prefer-https'?: Linter.RuleEntry<
|
|
10778
|
+
'unicorn/prefer-https'?: Linter.RuleEntry<UnicornPreferHttps>;
|
|
10718
10779
|
/**
|
|
10719
10780
|
* Prefer identifiers over string literals in import and export specifiers.
|
|
10720
10781
|
*
|
|
10721
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10782
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-identifier-import-export-specifiers.md
|
|
10722
10783
|
*/
|
|
10723
10784
|
'unicorn/prefer-identifier-import-export-specifiers'?: Linter.RuleEntry<[]>;
|
|
10724
10785
|
/**
|
|
10725
10786
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting
|
|
10726
10787
|
* file paths.
|
|
10727
10788
|
*
|
|
10728
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10789
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-import-meta-properties.md
|
|
10729
10790
|
*/
|
|
10730
10791
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
10731
10792
|
/**
|
|
10732
10793
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and
|
|
10733
10794
|
* `Array#some()` when checking for existence or non-existence.
|
|
10734
10795
|
*
|
|
10735
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10796
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-includes.md
|
|
10736
10797
|
*/
|
|
10737
10798
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
10738
10799
|
/**
|
|
10739
10800
|
* Prefer `.includes()` over repeated equality comparisons.
|
|
10740
10801
|
*
|
|
10741
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10802
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-includes-over-repeated-comparisons.md
|
|
10742
10803
|
*/
|
|
10743
10804
|
'unicorn/prefer-includes-over-repeated-comparisons'?: Linter.RuleEntry<UnicornPreferIncludesOverRepeatedComparisons>;
|
|
10744
10805
|
/**
|
|
10745
10806
|
* Prefer passing iterables directly to constructors instead of filling empty
|
|
10746
10807
|
* collections.
|
|
10747
10808
|
*
|
|
10748
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10809
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-iterable-in-constructor.md
|
|
10749
10810
|
*/
|
|
10750
10811
|
'unicorn/prefer-iterable-in-constructor'?: Linter.RuleEntry<[]>;
|
|
10751
10812
|
/**
|
|
10752
10813
|
* Prefer `Iterator.concat(…)` over temporary spread arrays.
|
|
10753
10814
|
*
|
|
10754
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10815
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-iterator-concat.md
|
|
10755
10816
|
*/
|
|
10756
10817
|
'unicorn/prefer-iterator-concat'?: Linter.RuleEntry<[]>;
|
|
10757
10818
|
/**
|
|
10758
10819
|
* Prefer iterator helpers over temporary arrays from iterators.
|
|
10759
10820
|
*
|
|
10760
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10821
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-iterator-helpers.md
|
|
10761
10822
|
*/
|
|
10762
10823
|
'unicorn/prefer-iterator-helpers'?: Linter.RuleEntry<[]>;
|
|
10763
10824
|
/**
|
|
10764
10825
|
* Prefer `Iterator#toArray()` over temporary arrays from iterator spreads.
|
|
10765
10826
|
*
|
|
10766
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10827
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-iterator-to-array.md
|
|
10767
10828
|
*/
|
|
10768
10829
|
'unicorn/prefer-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
10769
10830
|
/**
|
|
10770
10831
|
* Prefer moving `.toArray()` to the end of iterator helper chains.
|
|
10771
10832
|
*
|
|
10772
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10833
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-iterator-to-array-at-end.md
|
|
10773
10834
|
*/
|
|
10774
10835
|
'unicorn/prefer-iterator-to-array-at-end'?: Linter.RuleEntry<[]>;
|
|
10775
10836
|
/**
|
|
10776
10837
|
* Renamed to `unicorn/consistent-json-file-read`.
|
|
10777
10838
|
*
|
|
10778
10839
|
* @deprecated
|
|
10779
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10840
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/deleted-and-deprecated-rules.md#prefer-json-parse-buffer
|
|
10780
10841
|
*/
|
|
10781
10842
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
10782
10843
|
/**
|
|
10783
10844
|
* Prefer `KeyboardEvent#key` over deprecated keyboard event properties.
|
|
10784
10845
|
*
|
|
10785
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10846
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
10786
10847
|
*/
|
|
10787
10848
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
10788
10849
|
/**
|
|
10789
10850
|
* Prefer `location.assign()` over assigning to `location.href`.
|
|
10790
10851
|
*
|
|
10791
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10852
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-location-assign.md
|
|
10792
10853
|
*/
|
|
10793
10854
|
'unicorn/prefer-location-assign'?: Linter.RuleEntry<[]>;
|
|
10794
10855
|
/**
|
|
10795
10856
|
* Prefer using a logical operator over a ternary.
|
|
10796
10857
|
*
|
|
10797
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10858
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
10798
10859
|
*/
|
|
10799
10860
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
10800
10861
|
/**
|
|
10801
10862
|
* Prefer `new Map()` over `Object.fromEntries()` when using the result as a
|
|
10802
10863
|
* map.
|
|
10803
10864
|
*
|
|
10804
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10865
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-map-from-entries.md
|
|
10805
10866
|
*/
|
|
10806
10867
|
'unicorn/prefer-map-from-entries'?: Linter.RuleEntry<[]>;
|
|
10807
10868
|
/**
|
|
10808
10869
|
* Prefer `Math.abs()` over manual absolute value expressions and symmetric
|
|
10809
10870
|
* range checks.
|
|
10810
10871
|
*
|
|
10811
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10872
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-math-abs.md
|
|
10812
10873
|
*/
|
|
10813
10874
|
'unicorn/prefer-math-abs'?: Linter.RuleEntry<[]>;
|
|
10814
10875
|
/**
|
|
10815
10876
|
* Prefer `Math` constants over their approximate numeric values.
|
|
10816
10877
|
*
|
|
10817
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10878
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-math-constants.md
|
|
10818
10879
|
*/
|
|
10819
10880
|
'unicorn/prefer-math-constants'?: Linter.RuleEntry<[]>;
|
|
10820
10881
|
/**
|
|
10821
10882
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
10822
10883
|
*
|
|
10823
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10884
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-math-min-max.md
|
|
10824
10885
|
*/
|
|
10825
10886
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
10826
10887
|
/**
|
|
10827
10888
|
* Prefer `Math.trunc()` for truncating numbers.
|
|
10828
10889
|
*
|
|
10829
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10890
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-math-trunc.md
|
|
10830
10891
|
*/
|
|
10831
10892
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
10832
10893
|
/**
|
|
10833
10894
|
* Prefer moving ternaries into the minimal varying part of an expression.
|
|
10834
10895
|
*
|
|
10835
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10896
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-minimal-ternary.md
|
|
10836
10897
|
*/
|
|
10837
10898
|
'unicorn/prefer-minimal-ternary'?: Linter.RuleEntry<UnicornPreferMinimalTernary>;
|
|
10838
10899
|
/**
|
|
10839
10900
|
* Prefer modern DOM APIs.
|
|
10840
10901
|
*
|
|
10841
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10902
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
10842
10903
|
*/
|
|
10843
10904
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
10844
10905
|
/**
|
|
10845
10906
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
10846
10907
|
*
|
|
10847
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10908
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-modern-math-apis.md
|
|
10848
10909
|
*/
|
|
10849
10910
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
10850
10911
|
/**
|
|
10851
10912
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
10852
10913
|
*
|
|
10853
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10914
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-module.md
|
|
10854
10915
|
*/
|
|
10855
10916
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
10856
10917
|
/**
|
|
10857
10918
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol`
|
|
10858
10919
|
* directly.
|
|
10859
10920
|
*
|
|
10860
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10921
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
10861
10922
|
*/
|
|
10862
10923
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
10863
10924
|
/**
|
|
10864
10925
|
* Prefer negative index over `.length - index` when possible.
|
|
10865
10926
|
*
|
|
10866
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10927
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-negative-index.md
|
|
10867
10928
|
*/
|
|
10868
10929
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
10869
10930
|
/**
|
|
10870
10931
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
10871
10932
|
*
|
|
10872
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10933
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-node-protocol.md
|
|
10873
10934
|
*/
|
|
10874
10935
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
10875
10936
|
/**
|
|
10876
10937
|
* Prefer `Number()` over `parseFloat()` and base-10 `parseInt()`.
|
|
10877
10938
|
*
|
|
10878
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10939
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-number-coercion.md
|
|
10879
10940
|
*/
|
|
10880
10941
|
'unicorn/prefer-number-coercion'?: Linter.RuleEntry<[]>;
|
|
10881
10942
|
/**
|
|
10882
10943
|
* Prefer `Number.isSafeInteger()` over integer checks.
|
|
10883
10944
|
*
|
|
10884
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10945
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-number-is-safe-integer.md
|
|
10885
10946
|
*/
|
|
10886
10947
|
'unicorn/prefer-number-is-safe-integer'?: Linter.RuleEntry<[]>;
|
|
10887
10948
|
/**
|
|
10888
10949
|
* Prefer `Number` static methods over global functions and optionally static
|
|
10889
10950
|
* properties over global constants.
|
|
10890
10951
|
*
|
|
10891
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10952
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-number-properties.md
|
|
10892
10953
|
*/
|
|
10893
10954
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
10894
10955
|
/**
|
|
10895
10956
|
* Prefer `Object.defineProperties()` over multiple `Object.defineProperty()`
|
|
10896
10957
|
* calls.
|
|
10897
10958
|
*
|
|
10898
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10959
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-object-define-properties.md
|
|
10899
10960
|
*/
|
|
10900
10961
|
'unicorn/prefer-object-define-properties'?: Linter.RuleEntry<[]>;
|
|
10901
10962
|
/**
|
|
10902
10963
|
* Prefer object destructuring defaults over default object literals with
|
|
10903
10964
|
* spread.
|
|
10904
10965
|
*
|
|
10905
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10966
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-object-destructuring-defaults.md
|
|
10906
10967
|
*/
|
|
10907
10968
|
'unicorn/prefer-object-destructuring-defaults'?: Linter.RuleEntry<[]>;
|
|
10908
10969
|
/**
|
|
10909
10970
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs
|
|
10910
10971
|
* into an object.
|
|
10911
10972
|
*
|
|
10912
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10973
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-object-from-entries.md
|
|
10913
10974
|
*/
|
|
10914
10975
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
10915
10976
|
/**
|
|
10916
10977
|
* Prefer the most specific `Object` iterable method.
|
|
10917
10978
|
*
|
|
10918
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10979
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-object-iterable-methods.md
|
|
10919
10980
|
*/
|
|
10920
10981
|
'unicorn/prefer-object-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
10921
10982
|
/**
|
|
10922
10983
|
* Prefer observer APIs over resize and scroll listeners with layout reads.
|
|
10923
10984
|
*
|
|
10924
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10985
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-observer-apis.md
|
|
10925
10986
|
*/
|
|
10926
10987
|
'unicorn/prefer-observer-apis'?: Linter.RuleEntry<[]>;
|
|
10927
10988
|
/**
|
|
10928
10989
|
* Prefer omitting the `catch` binding parameter.
|
|
10929
10990
|
*
|
|
10930
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10991
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
10931
10992
|
*/
|
|
10932
10993
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
10933
10994
|
/**
|
|
10934
10995
|
* Prefer `Path2D` for repeatedly drawn canvas paths.
|
|
10935
10996
|
*
|
|
10936
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10997
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-path2d.md
|
|
10937
10998
|
*/
|
|
10938
10999
|
'unicorn/prefer-path2d'?: Linter.RuleEntry<[]>;
|
|
10939
11000
|
/**
|
|
10940
11001
|
* Prefer private class fields over the underscore-prefix convention.
|
|
10941
11002
|
*
|
|
10942
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11003
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-private-class-fields.md
|
|
10943
11004
|
*/
|
|
10944
11005
|
'unicorn/prefer-private-class-fields'?: Linter.RuleEntry<[]>;
|
|
10945
11006
|
/**
|
|
10946
11007
|
* Prefer `Promise.try()` over promise-wrapping boilerplate.
|
|
10947
11008
|
*
|
|
10948
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11009
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-promise-try.md
|
|
10949
11010
|
*/
|
|
10950
11011
|
'unicorn/prefer-promise-try'?: Linter.RuleEntry<[]>;
|
|
10951
11012
|
/**
|
|
10952
11013
|
* Prefer `Promise.withResolvers()` when extracting resolver functions from
|
|
10953
11014
|
* `new Promise()`.
|
|
10954
11015
|
*
|
|
10955
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11016
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-promise-with-resolvers.md
|
|
10956
11017
|
*/
|
|
10957
11018
|
'unicorn/prefer-promise-with-resolvers'?: Linter.RuleEntry<[]>;
|
|
10958
11019
|
/**
|
|
10959
11020
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
10960
11021
|
*
|
|
10961
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11022
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-prototype-methods.md
|
|
10962
11023
|
*/
|
|
10963
11024
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
10964
11025
|
/**
|
|
10965
11026
|
* Prefer `.querySelector()` and `.querySelectorAll()` over older DOM query
|
|
10966
11027
|
* methods.
|
|
10967
11028
|
*
|
|
10968
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11029
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-query-selector.md
|
|
10969
11030
|
*/
|
|
10970
11031
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<UnicornPreferQuerySelector>;
|
|
10971
11032
|
/**
|
|
10972
11033
|
* Prefer `queueMicrotask()` over `process.nextTick()`, `setImmediate()`, and
|
|
10973
11034
|
* `setTimeout(…, 0)`.
|
|
10974
11035
|
*
|
|
10975
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11036
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-queue-microtask.md
|
|
10976
11037
|
*/
|
|
10977
11038
|
'unicorn/prefer-queue-microtask'?: Linter.RuleEntry<UnicornPreferQueueMicrotask>;
|
|
10978
11039
|
/**
|
|
10979
11040
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
10980
11041
|
*
|
|
10981
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11042
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-reflect-apply.md
|
|
10982
11043
|
*/
|
|
10983
11044
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
10984
11045
|
/**
|
|
10985
11046
|
* Prefer `RegExp.escape()` for escaping strings to use in regular
|
|
10986
11047
|
* expressions.
|
|
10987
11048
|
*
|
|
10988
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11049
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-regexp-escape.md
|
|
10989
11050
|
*/
|
|
10990
11051
|
'unicorn/prefer-regexp-escape'?: Linter.RuleEntry<[]>;
|
|
10991
11052
|
/**
|
|
10992
11053
|
* Prefer `RegExp#test()` over `String#match()`, `String#search()`, and
|
|
10993
11054
|
* `RegExp#exec()`.
|
|
10994
11055
|
*
|
|
10995
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11056
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-regexp-test.md
|
|
10996
11057
|
*/
|
|
10997
11058
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
10998
11059
|
/**
|
|
10999
11060
|
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
11000
11061
|
*
|
|
11001
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11062
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-response-static-json.md
|
|
11002
11063
|
*/
|
|
11003
11064
|
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
|
|
11004
11065
|
/**
|
|
11005
11066
|
* Prefer `:scope` when using element query selector methods.
|
|
11006
11067
|
*
|
|
11007
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11068
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-scoped-selector.md
|
|
11008
11069
|
*/
|
|
11009
11070
|
'unicorn/prefer-scoped-selector'?: Linter.RuleEntry<[]>;
|
|
11010
11071
|
/**
|
|
11011
11072
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or
|
|
11012
11073
|
* non-existence.
|
|
11013
11074
|
*
|
|
11014
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11075
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-set-has.md
|
|
11015
11076
|
*/
|
|
11016
11077
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<UnicornPreferSetHas>;
|
|
11017
11078
|
/**
|
|
11018
11079
|
* Prefer `Set` methods for Set operations.
|
|
11019
11080
|
*
|
|
11020
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11081
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-set-methods.md
|
|
11021
11082
|
*/
|
|
11022
11083
|
'unicorn/prefer-set-methods'?: Linter.RuleEntry<[]>;
|
|
11023
11084
|
/**
|
|
11024
11085
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
11025
11086
|
*
|
|
11026
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11087
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-set-size.md
|
|
11027
11088
|
*/
|
|
11028
11089
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
11029
11090
|
/**
|
|
11030
11091
|
* Prefer arrow function properties over methods with a single return.
|
|
11031
11092
|
*
|
|
11032
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11093
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-short-arrow-method.md
|
|
11033
11094
|
*/
|
|
11034
11095
|
'unicorn/prefer-short-arrow-method'?: Linter.RuleEntry<UnicornPreferShortArrowMethod>;
|
|
11035
11096
|
/**
|
|
11036
11097
|
* Prefer simple conditions first in logical expressions.
|
|
11037
11098
|
*
|
|
11038
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11099
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-simple-condition-first.md
|
|
11039
11100
|
*/
|
|
11040
11101
|
'unicorn/prefer-simple-condition-first'?: Linter.RuleEntry<[]>;
|
|
11041
11102
|
/**
|
|
11042
11103
|
* Prefer a simple comparison function for `Array#sort()`.
|
|
11043
11104
|
*
|
|
11044
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11105
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-simple-sort-comparator.md
|
|
11045
11106
|
*/
|
|
11046
11107
|
'unicorn/prefer-simple-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
11047
11108
|
/**
|
|
11048
11109
|
* Prefer simplified conditions.
|
|
11049
11110
|
*
|
|
11050
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11111
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-simplified-conditions.md
|
|
11051
11112
|
*/
|
|
11052
11113
|
'unicorn/prefer-simplified-conditions'?: Linter.RuleEntry<[]>;
|
|
11053
11114
|
/**
|
|
11054
11115
|
* Prefer a single `Array#some()` or `Array#every()` with a combined
|
|
11055
11116
|
* predicate.
|
|
11056
11117
|
*
|
|
11057
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11118
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-single-array-predicate.md
|
|
11058
11119
|
*/
|
|
11059
11120
|
'unicorn/prefer-single-array-predicate'?: Linter.RuleEntry<[]>;
|
|
11060
11121
|
/**
|
|
11061
11122
|
* Enforce combining multiple `Array#{push,unshift}()`,
|
|
11062
11123
|
* `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
11063
11124
|
*
|
|
11064
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11125
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-single-call.md
|
|
11065
11126
|
*/
|
|
11066
11127
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
11067
11128
|
/**
|
|
11068
11129
|
* Prefer a single object destructuring declaration per local const source.
|
|
11069
11130
|
*
|
|
11070
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11131
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-single-object-destructuring.md
|
|
11071
11132
|
*/
|
|
11072
11133
|
'unicorn/prefer-single-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
11073
11134
|
/**
|
|
11074
11135
|
* Enforce combining multiple single-character replacements into a single
|
|
11075
11136
|
* `String#replaceAll()` with a regular expression.
|
|
11076
11137
|
*
|
|
11077
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11138
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-single-replace.md
|
|
11078
11139
|
*/
|
|
11079
11140
|
'unicorn/prefer-single-replace'?: Linter.RuleEntry<[]>;
|
|
11080
11141
|
/**
|
|
11081
11142
|
* Prefer declaring variables in the smallest possible scope.
|
|
11082
11143
|
*
|
|
11083
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11144
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-smaller-scope.md
|
|
11084
11145
|
*/
|
|
11085
11146
|
'unicorn/prefer-smaller-scope'?: Linter.RuleEntry<[]>;
|
|
11086
11147
|
/**
|
|
11087
11148
|
* Prefer `String#split()` with a limit.
|
|
11088
11149
|
*
|
|
11089
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11150
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-split-limit.md
|
|
11090
11151
|
*/
|
|
11091
11152
|
'unicorn/prefer-split-limit'?: Linter.RuleEntry<[]>;
|
|
11092
11153
|
/**
|
|
11093
11154
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`,
|
|
11094
11155
|
* `Array#{slice,toSpliced}()`, and trivial `for…of` copies.
|
|
11095
11156
|
*
|
|
11096
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11157
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-spread.md
|
|
11097
11158
|
*/
|
|
11098
11159
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
11099
11160
|
/**
|
|
11100
11161
|
* Prefer `String#matchAll()` over `RegExp#exec()` loops.
|
|
11101
11162
|
*
|
|
11102
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11163
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-string-match-all.md
|
|
11103
11164
|
*/
|
|
11104
11165
|
'unicorn/prefer-string-match-all'?: Linter.RuleEntry<[]>;
|
|
11105
11166
|
/**
|
|
11106
11167
|
* Prefer `String#padStart()` and `String#padEnd()` over manual string
|
|
11107
11168
|
* padding.
|
|
11108
11169
|
*
|
|
11109
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11170
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-string-pad-start-end.md
|
|
11110
11171
|
*/
|
|
11111
11172
|
'unicorn/prefer-string-pad-start-end'?: Linter.RuleEntry<[]>;
|
|
11112
11173
|
/**
|
|
11113
11174
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
11114
11175
|
*
|
|
11115
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11176
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-string-raw.md
|
|
11116
11177
|
*/
|
|
11117
11178
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
11118
11179
|
/**
|
|
11119
11180
|
* Prefer `String#repeat()` for repeated whitespace.
|
|
11120
11181
|
*
|
|
11121
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11182
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-string-repeat.md
|
|
11122
11183
|
*/
|
|
11123
11184
|
'unicorn/prefer-string-repeat'?: Linter.RuleEntry<UnicornPreferStringRepeat>;
|
|
11124
11185
|
/**
|
|
11125
11186
|
* Prefer `String#replaceAll()` over regex searches with the global flag and
|
|
11126
11187
|
* `String#split().join()`.
|
|
11127
11188
|
*
|
|
11128
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11189
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-string-replace-all.md
|
|
11129
11190
|
*/
|
|
11130
11191
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
11131
11192
|
/**
|
|
11132
11193
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
11133
11194
|
*
|
|
11134
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11195
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-string-slice.md
|
|
11135
11196
|
*/
|
|
11136
11197
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
11137
11198
|
/**
|
|
11138
11199
|
* Prefer `String#startsWith()` & `String#endsWith()` over regexes,
|
|
11139
11200
|
* `String#indexOf() === 0`, and slice checks.
|
|
11140
11201
|
*
|
|
11141
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11202
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
11142
11203
|
*/
|
|
11143
11204
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
11144
11205
|
/**
|
|
11145
11206
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` /
|
|
11146
11207
|
* `String#trimRight()`.
|
|
11147
11208
|
*
|
|
11148
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11209
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
11149
11210
|
*/
|
|
11150
11211
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
11151
11212
|
/**
|
|
11152
11213
|
* Prefer using `structuredClone` to create a deep clone.
|
|
11153
11214
|
*
|
|
11154
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11215
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-structured-clone.md
|
|
11155
11216
|
*/
|
|
11156
11217
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
11157
11218
|
/**
|
|
11158
11219
|
* Prefer `switch` over multiple `else-if`.
|
|
11159
11220
|
*
|
|
11160
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11221
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-switch.md
|
|
11161
11222
|
*/
|
|
11162
11223
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
11163
11224
|
/**
|
|
11164
11225
|
* Prefer `Temporal` over `Date`.
|
|
11165
11226
|
*
|
|
11166
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11227
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-temporal.md
|
|
11167
11228
|
*/
|
|
11168
11229
|
'unicorn/prefer-temporal'?: Linter.RuleEntry<UnicornPreferTemporal>;
|
|
11169
11230
|
/**
|
|
11170
11231
|
* Prefer ternary expressions over simple `if` statements that return or
|
|
11171
11232
|
* assign values.
|
|
11172
11233
|
*
|
|
11173
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11234
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-ternary.md
|
|
11174
11235
|
*/
|
|
11175
11236
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
11176
11237
|
/**
|
|
11177
11238
|
* Prefer `.then().catch()` over `.then(…, …)` for error handling.
|
|
11178
11239
|
*
|
|
11179
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11240
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-then-catch.md
|
|
11180
11241
|
*/
|
|
11181
11242
|
'unicorn/prefer-then-catch'?: Linter.RuleEntry<[]>;
|
|
11182
11243
|
/**
|
|
11183
11244
|
* Prefer using `Element#toggleAttribute()` to toggle attributes.
|
|
11184
11245
|
*
|
|
11185
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11246
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-toggle-attribute.md
|
|
11186
11247
|
*/
|
|
11187
11248
|
'unicorn/prefer-toggle-attribute'?: Linter.RuleEntry<[]>;
|
|
11188
11249
|
/**
|
|
11189
11250
|
* Prefer top-level await over top-level promises and async function calls.
|
|
11190
11251
|
*
|
|
11191
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11252
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-top-level-await.md
|
|
11192
11253
|
*/
|
|
11193
11254
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
11194
11255
|
/**
|
|
11195
11256
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
11196
11257
|
*
|
|
11197
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11258
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-type-error.md
|
|
11198
11259
|
*/
|
|
11199
11260
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
11200
11261
|
/**
|
|
11201
11262
|
* Require type literals to be last in union types.
|
|
11202
11263
|
*
|
|
11203
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11264
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-type-literal-last.md
|
|
11204
11265
|
*/
|
|
11205
11266
|
'unicorn/prefer-type-literal-last'?: Linter.RuleEntry<[]>;
|
|
11206
11267
|
/**
|
|
11207
11268
|
* Prefer `Uint8Array#toBase64()` and `Uint8Array.fromBase64()` over `atob()`,
|
|
11208
11269
|
* `btoa()`, and `Buffer` base64 conversions.
|
|
11209
11270
|
*
|
|
11210
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11271
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-uint8array-base64.md
|
|
11211
11272
|
*/
|
|
11212
11273
|
'unicorn/prefer-uint8array-base64'?: Linter.RuleEntry<[]>;
|
|
11213
11274
|
/**
|
|
11214
11275
|
* Prefer the unary minus operator over multiplying or dividing by `-1`.
|
|
11215
11276
|
*
|
|
11216
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11277
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-unary-minus.md
|
|
11217
11278
|
*/
|
|
11218
11279
|
'unicorn/prefer-unary-minus'?: Linter.RuleEntry<[]>;
|
|
11219
11280
|
/**
|
|
11220
11281
|
* Prefer Unicode code point escapes over legacy escape sequences.
|
|
11221
11282
|
*
|
|
11222
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11283
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-unicode-code-point-escapes.md
|
|
11223
11284
|
*/
|
|
11224
11285
|
'unicorn/prefer-unicode-code-point-escapes'?: Linter.RuleEntry<[]>;
|
|
11225
11286
|
/**
|
|
11226
11287
|
* Prefer `URL.canParse()` over constructing a `URL` in a try/catch for
|
|
11227
11288
|
* validation.
|
|
11228
11289
|
*
|
|
11229
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11290
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-url-can-parse.md
|
|
11230
11291
|
*/
|
|
11231
11292
|
'unicorn/prefer-url-can-parse'?: Linter.RuleEntry<[]>;
|
|
11232
11293
|
/**
|
|
11233
11294
|
* Prefer `URL#href` over stringifying a `URL`.
|
|
11234
11295
|
*
|
|
11235
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11296
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-url-href.md
|
|
11236
11297
|
*/
|
|
11237
11298
|
'unicorn/prefer-url-href'?: Linter.RuleEntry<[]>;
|
|
11238
11299
|
/**
|
|
11239
11300
|
* Prefer `URLSearchParams` over manually splitting query strings.
|
|
11240
11301
|
*
|
|
11241
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11302
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-url-search-parameters.md
|
|
11242
11303
|
*/
|
|
11243
11304
|
'unicorn/prefer-url-search-parameters'?: Linter.RuleEntry<[]>;
|
|
11244
11305
|
/**
|
|
11245
11306
|
* Prefer putting the condition in the while statement.
|
|
11246
11307
|
*
|
|
11247
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11308
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/prefer-while-loop-condition.md
|
|
11248
11309
|
*/
|
|
11249
11310
|
'unicorn/prefer-while-loop-condition'?: Linter.RuleEntry<[]>;
|
|
11250
11311
|
/**
|
|
11251
11312
|
* Renamed to `unicorn/name-replacements`.
|
|
11252
11313
|
*
|
|
11253
11314
|
* @deprecated
|
|
11254
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11315
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/deleted-and-deprecated-rules.md#prevent-abbreviations
|
|
11255
11316
|
*/
|
|
11256
11317
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<[]>;
|
|
11257
11318
|
/**
|
|
11258
11319
|
* Enforce consistent relative URL style.
|
|
11259
11320
|
*
|
|
11260
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11321
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/relative-url-style.md
|
|
11261
11322
|
*/
|
|
11262
11323
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
11263
11324
|
/**
|
|
11264
11325
|
* Enforce using the separator argument with `Array#join()`.
|
|
11265
11326
|
*
|
|
11266
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11327
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/require-array-join-separator.md
|
|
11267
11328
|
*/
|
|
11268
11329
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
11269
11330
|
/**
|
|
11270
11331
|
* Require a compare function when calling `Array#sort()` or
|
|
11271
11332
|
* `Array#toSorted()`.
|
|
11272
11333
|
*
|
|
11273
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11334
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/require-array-sort-compare.md
|
|
11274
11335
|
*/
|
|
11275
11336
|
'unicorn/require-array-sort-compare'?: Linter.RuleEntry<[]>;
|
|
11276
11337
|
/**
|
|
11277
11338
|
* Require `CSS.escape()` for interpolated values in CSS selectors.
|
|
11278
11339
|
*
|
|
11279
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11340
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/require-css-escape.md
|
|
11280
11341
|
*/
|
|
11281
11342
|
'unicorn/require-css-escape'?: Linter.RuleEntry<UnicornRequireCssEscape>;
|
|
11282
11343
|
/**
|
|
11283
11344
|
* Require configured YAML frontmatter fields.
|
|
11284
11345
|
*
|
|
11285
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11346
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/require-frontmatter-fields.md
|
|
11286
11347
|
*/
|
|
11287
11348
|
'unicorn/require-frontmatter-fields'?: Linter.RuleEntry<UnicornRequireFrontmatterFields>;
|
|
11288
11349
|
/**
|
|
11289
11350
|
* Require non-empty module attributes for imports and exports
|
|
11290
11351
|
*
|
|
11291
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11352
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/require-module-attributes.md
|
|
11292
11353
|
*/
|
|
11293
11354
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
11294
11355
|
/**
|
|
11295
11356
|
* Require non-empty specifier list in import and export statements.
|
|
11296
11357
|
*
|
|
11297
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11358
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/require-module-specifiers.md
|
|
11298
11359
|
*/
|
|
11299
11360
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
11300
11361
|
/**
|
|
11301
11362
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
11302
11363
|
*
|
|
11303
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11364
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
11304
11365
|
*/
|
|
11305
11366
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
11306
11367
|
/**
|
|
11307
11368
|
* Require passive event listeners for high-frequency events.
|
|
11308
11369
|
*
|
|
11309
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11370
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/require-passive-events.md
|
|
11310
11371
|
*/
|
|
11311
11372
|
'unicorn/require-passive-events'?: Linter.RuleEntry<[]>;
|
|
11312
11373
|
/**
|
|
11313
11374
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
11314
11375
|
*
|
|
11315
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11376
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/require-post-message-target-origin.md
|
|
11316
11377
|
*/
|
|
11317
11378
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
11318
11379
|
/**
|
|
11319
11380
|
* Require boolean-returning Proxy traps to return booleans.
|
|
11320
11381
|
*
|
|
11321
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11382
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/require-proxy-trap-boolean-return.md
|
|
11322
11383
|
*/
|
|
11323
11384
|
'unicorn/require-proxy-trap-boolean-return'?: Linter.RuleEntry<[]>;
|
|
11385
|
+
/**
|
|
11386
|
+
* Enforce a consistent style for single-line block comments.
|
|
11387
|
+
*
|
|
11388
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/single-line-block-comment-style.md
|
|
11389
|
+
*/
|
|
11390
|
+
'unicorn/single-line-block-comment-style'?: Linter.RuleEntry<UnicornSingleLineBlockCommentStyle>;
|
|
11324
11391
|
/**
|
|
11325
11392
|
* Enforce better string content.
|
|
11326
11393
|
*
|
|
11327
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11394
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/string-content.md
|
|
11328
11395
|
*/
|
|
11329
11396
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
11330
11397
|
/**
|
|
11331
11398
|
* Enforce consistent brace style for `case` clauses.
|
|
11332
11399
|
*
|
|
11333
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11400
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/switch-case-braces.md
|
|
11334
11401
|
*/
|
|
11335
11402
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
11336
11403
|
/**
|
|
11337
11404
|
* Enforce consistent `break`/`return`/`continue`/`throw` position in `case`
|
|
11338
11405
|
* clauses.
|
|
11339
11406
|
*
|
|
11340
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11407
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/switch-case-break-position.md
|
|
11341
11408
|
*/
|
|
11342
11409
|
'unicorn/switch-case-break-position'?: Linter.RuleEntry<[]>;
|
|
11343
11410
|
/**
|
|
11344
11411
|
* Fix whitespace-insensitive template indentation.
|
|
11345
11412
|
*
|
|
11346
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11413
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/template-indent.md
|
|
11347
11414
|
*/
|
|
11348
11415
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
11349
11416
|
/**
|
|
11350
11417
|
* Enforce consistent case for text encoding identifiers.
|
|
11351
11418
|
*
|
|
11352
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11419
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/text-encoding-identifier-case.md
|
|
11353
11420
|
*/
|
|
11354
11421
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
11355
11422
|
/**
|
|
11356
11423
|
* Require `new` when creating an error.
|
|
11357
11424
|
*
|
|
11358
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11425
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/throw-new-error.md
|
|
11359
11426
|
*/
|
|
11360
11427
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
11361
11428
|
/**
|
|
11362
11429
|
* Limit the complexity of `try` blocks.
|
|
11363
11430
|
*
|
|
11364
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11431
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v74.0.0/docs/rules/try-complexity.md
|
|
11365
11432
|
*/
|
|
11366
11433
|
'unicorn/try-complexity'?: Linter.RuleEntry<UnicornTryComplexity>;
|
|
11367
11434
|
/**
|
|
@@ -11474,6 +11541,12 @@ interface RuleOptions {
|
|
|
11474
11541
|
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/key-spacing.html
|
|
11475
11542
|
*/
|
|
11476
11543
|
'yaml/key-spacing'?: Linter.RuleEntry<YamlKeySpacing>;
|
|
11544
|
+
/**
|
|
11545
|
+
* Disallow boolean mapping keys
|
|
11546
|
+
*
|
|
11547
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-boolean-key.html
|
|
11548
|
+
*/
|
|
11549
|
+
'yaml/no-boolean-key'?: Linter.RuleEntry<[]>;
|
|
11477
11550
|
/**
|
|
11478
11551
|
* Disallow empty document
|
|
11479
11552
|
*
|
|
@@ -12532,12 +12605,16 @@ type JsdocCheckLineAlignment = [] | ['always' | 'never' | 'any'] | ['always' | '
|
|
|
12532
12605
|
// ----- jsdoc/check-param-names -----
|
|
12533
12606
|
type JsdocCheckParamNames = [] | [{
|
|
12534
12607
|
allowExtraTrailingParamDocs?: boolean;
|
|
12608
|
+
badParamNames?: boolean;
|
|
12609
|
+
badParamOrder?: boolean;
|
|
12535
12610
|
checkDestructured?: boolean;
|
|
12536
12611
|
checkRestProperty?: boolean;
|
|
12537
12612
|
checkTypesPattern?: string;
|
|
12538
12613
|
disableExtraPropertyReporting?: boolean;
|
|
12539
12614
|
disableMissingParamChecks?: boolean;
|
|
12615
|
+
duplicateParams?: boolean;
|
|
12540
12616
|
enableFixer?: boolean;
|
|
12617
|
+
extraParams?: boolean;
|
|
12541
12618
|
useDefaultObjectProperties?: boolean;
|
|
12542
12619
|
}];
|
|
12543
12620
|
// ----- jsdoc/check-property-names -----
|
|
@@ -12718,6 +12795,14 @@ type JsdocNoUndefinedTypes = [] | [{
|
|
|
12718
12795
|
disableReporting?: boolean;
|
|
12719
12796
|
markVariablesAsUsed?: boolean;
|
|
12720
12797
|
}];
|
|
12798
|
+
// ----- jsdoc/no-unnecessary-type-assertion -----
|
|
12799
|
+
type JsdocNoUnnecessaryTypeAssertion = [] | [{
|
|
12800
|
+
checkLiteralConstAssertions?: boolean;
|
|
12801
|
+
enableFixer?: boolean;
|
|
12802
|
+
preferConstToLiteralTuples?: boolean;
|
|
12803
|
+
treatAnyAsRedundant?: boolean;
|
|
12804
|
+
typesToIgnore?: string[];
|
|
12805
|
+
}];
|
|
12721
12806
|
// ----- jsdoc/normalize-see-links -----
|
|
12722
12807
|
type JsdocNormalizeSeeLinks = [] | [{
|
|
12723
12808
|
canonicalForm?: 'pipe' | 'prefix';
|
|
@@ -13056,6 +13141,11 @@ type JsonPackageNoLocalDependencies = [] | [{
|
|
|
13056
13141
|
type JsonPackageOrderProperties = [] | [{
|
|
13057
13142
|
order?: 'sort-package-json' | string[];
|
|
13058
13143
|
}];
|
|
13144
|
+
// ----- json-package/prefer-rolling-workspace-spec -----
|
|
13145
|
+
type JsonPackagePreferRollingWorkspaceSpec = [] | [{
|
|
13146
|
+
ignoreDependencies?: string[];
|
|
13147
|
+
ignorePatterns?: string[];
|
|
13148
|
+
}];
|
|
13059
13149
|
// ----- json-package/repository-shorthand -----
|
|
13060
13150
|
type JsonPackageRepositoryShorthand = [] | [{
|
|
13061
13151
|
form?: 'object' | 'shorthand';
|
|
@@ -13222,12 +13312,12 @@ type JsonPackageRestrictDependencyRanges = [] | [{
|
|
|
13222
13312
|
forDependencyTypes?: ('dependencies' | 'devDependencies' | 'optionalDependencies' | 'peerDependencies')[];
|
|
13223
13313
|
forPackages?: string[];
|
|
13224
13314
|
forVersions?: string;
|
|
13225
|
-
rangeType: ('caret' | 'pin' | 'tilde') | ('caret' | 'pin' | 'tilde')[];
|
|
13315
|
+
rangeType: ('^' | '~' | '<' | '<=' | '>' | '>=' | 'caret' | 'pin' | 'tilde' | 'lt' | 'le' | 'gt' | 'ge') | ('^' | '~' | '<' | '<=' | '>' | '>=' | 'caret' | 'pin' | 'tilde' | 'lt' | 'le' | 'gt' | 'ge')[];
|
|
13226
13316
|
} | {
|
|
13227
13317
|
forDependencyTypes?: ('dependencies' | 'devDependencies' | 'optionalDependencies' | 'peerDependencies')[];
|
|
13228
13318
|
forPackages?: string[];
|
|
13229
13319
|
forVersions?: string;
|
|
13230
|
-
rangeType: ('caret' | 'pin' | 'tilde') | ('caret' | 'pin' | 'tilde')[];
|
|
13320
|
+
rangeType: ('^' | '~' | '<' | '<=' | '>' | '>=' | 'caret' | 'pin' | 'tilde' | 'lt' | 'le' | 'gt' | 'ge') | ('^' | '~' | '<' | '<=' | '>' | '>=' | 'caret' | 'pin' | 'tilde' | 'lt' | 'le' | 'gt' | 'ge')[];
|
|
13231
13321
|
}[]];
|
|
13232
13322
|
// ----- json-package/restrict-private-properties -----
|
|
13233
13323
|
type JsonPackageRestrictPrivateProperties = [] | [{
|
|
@@ -13240,6 +13330,11 @@ type JsonPackageRestrictTopLevelProperties = [] | [{
|
|
|
13240
13330
|
property: string;
|
|
13241
13331
|
})[];
|
|
13242
13332
|
}];
|
|
13333
|
+
// ----- json-package/scripts-name-casing -----
|
|
13334
|
+
type JsonPackageScriptsNameCasing = [] | [{
|
|
13335
|
+
ignoreNames?: string[];
|
|
13336
|
+
ignorePatterns?: string[];
|
|
13337
|
+
}];
|
|
13243
13338
|
// ----- json-package/sort-collections -----
|
|
13244
13339
|
type JsonPackageSortCollections = [] | [(string | {
|
|
13245
13340
|
key: string;
|
|
@@ -13476,11 +13571,15 @@ type JsonSortKeys = [{
|
|
|
13476
13571
|
type?: 'asc' | 'desc';
|
|
13477
13572
|
caseSensitive?: boolean;
|
|
13478
13573
|
natural?: boolean;
|
|
13574
|
+
} | {
|
|
13575
|
+
type: 'ignore';
|
|
13479
13576
|
};
|
|
13480
13577
|
})[] | {
|
|
13481
13578
|
type?: 'asc' | 'desc';
|
|
13482
13579
|
caseSensitive?: boolean;
|
|
13483
13580
|
natural?: boolean;
|
|
13581
|
+
} | {
|
|
13582
|
+
type: 'ignore';
|
|
13484
13583
|
};
|
|
13485
13584
|
minKeys?: number;
|
|
13486
13585
|
allowLineSeparatedGroups?: boolean;
|
|
@@ -13493,11 +13592,15 @@ type JsonSortKeys = [{
|
|
|
13493
13592
|
type?: 'asc' | 'desc';
|
|
13494
13593
|
caseSensitive?: boolean;
|
|
13495
13594
|
natural?: boolean;
|
|
13595
|
+
} | {
|
|
13596
|
+
type: 'ignore';
|
|
13496
13597
|
};
|
|
13497
13598
|
})[] | {
|
|
13498
13599
|
type?: 'asc' | 'desc';
|
|
13499
13600
|
caseSensitive?: boolean;
|
|
13500
13601
|
natural?: boolean;
|
|
13602
|
+
} | {
|
|
13603
|
+
type: 'ignore';
|
|
13501
13604
|
};
|
|
13502
13605
|
minKeys?: number;
|
|
13503
13606
|
allowLineSeparatedGroups?: boolean;
|
|
@@ -14575,6 +14678,10 @@ type NoUnderscoreDangle = [] | [{
|
|
|
14575
14678
|
allowInArrayDestructuring?: boolean;
|
|
14576
14679
|
allowInObjectDestructuring?: boolean;
|
|
14577
14680
|
}];
|
|
14681
|
+
// ----- no-unmodified-loop-condition -----
|
|
14682
|
+
type NoUnmodifiedLoopCondition = [] | [{
|
|
14683
|
+
checkConditionalExpressions?: boolean;
|
|
14684
|
+
}];
|
|
14578
14685
|
// ----- no-unneeded-ternary -----
|
|
14579
14686
|
type NoUnneededTernary = [] | [{
|
|
14580
14687
|
defaultAssignment?: boolean;
|
|
@@ -14898,6 +15005,10 @@ type NodePreferGlobalUrlSearchParams = [] | ['always' | 'never'];
|
|
|
14898
15005
|
type NodePreferNodeProtocol = [] | [{
|
|
14899
15006
|
version?: string;
|
|
14900
15007
|
}];
|
|
15008
|
+
// ----- node/prefer-process-get-builtin-module -----
|
|
15009
|
+
type NodePreferProcessGetBuiltinModule = [] | [{
|
|
15010
|
+
version?: string;
|
|
15011
|
+
}];
|
|
14901
15012
|
// ----- node/shebang -----
|
|
14902
15013
|
type NodeShebang = [] | [{
|
|
14903
15014
|
convertPath?: {
|
|
@@ -16217,10 +16328,6 @@ type PerfectionistSortImports = {
|
|
|
16217
16328
|
sortBy?: 'specifier' | 'path';
|
|
16218
16329
|
})[];
|
|
16219
16330
|
newlinesBetween?: 'ignore' | number;
|
|
16220
|
-
tsconfig?: {
|
|
16221
|
-
rootDir: string;
|
|
16222
|
-
filename?: string;
|
|
16223
|
-
};
|
|
16224
16331
|
maxLineLength?: number;
|
|
16225
16332
|
sortSideEffects?: boolean;
|
|
16226
16333
|
environment?: 'node' | 'bun';
|
|
@@ -16255,6 +16362,10 @@ type PerfectionistSortImports = {
|
|
|
16255
16362
|
pattern: string;
|
|
16256
16363
|
flags?: string;
|
|
16257
16364
|
} | string);
|
|
16365
|
+
tsconfig?: {
|
|
16366
|
+
rootDir: string;
|
|
16367
|
+
filename?: string;
|
|
16368
|
+
};
|
|
16258
16369
|
}[];
|
|
16259
16370
|
// ----- perfectionist/sort-interfaces -----
|
|
16260
16371
|
type PerfectionistSortInterfaces = {
|
|
@@ -16839,6 +16950,7 @@ type PerfectionistSortModules = [] | [{
|
|
|
16839
16950
|
order?: 'asc' | 'desc';
|
|
16840
16951
|
})[];
|
|
16841
16952
|
newlinesBetween?: 'ignore' | number;
|
|
16953
|
+
additionalModuleBlockTypes?: string[];
|
|
16842
16954
|
useExperimentalDependencyDetection?: boolean;
|
|
16843
16955
|
newlinesBetweenOverloadSignatures?: 'ignore' | number;
|
|
16844
16956
|
partitionByComment?: boolean | (({
|
|
@@ -16864,6 +16976,10 @@ type PerfectionistSortModules = [] | [{
|
|
|
16864
16976
|
} | string));
|
|
16865
16977
|
};
|
|
16866
16978
|
partitionByNewLine?: boolean;
|
|
16979
|
+
tsconfig?: {
|
|
16980
|
+
rootDir: string;
|
|
16981
|
+
filename?: string;
|
|
16982
|
+
};
|
|
16867
16983
|
}];
|
|
16868
16984
|
// ----- perfectionist/sort-named-exports -----
|
|
16869
16985
|
type PerfectionistSortNamedExports = {
|
|
@@ -17392,6 +17508,13 @@ type PerfectionistSortObjects = {
|
|
|
17392
17508
|
partitionByComputedKey?: boolean;
|
|
17393
17509
|
styledComponents?: boolean;
|
|
17394
17510
|
useExperimentalDependencyDetection?: boolean;
|
|
17511
|
+
ignoreCallbackDependenciesPatterns?: ({
|
|
17512
|
+
pattern: string;
|
|
17513
|
+
flags?: string;
|
|
17514
|
+
} | string)[] | ({
|
|
17515
|
+
pattern: string;
|
|
17516
|
+
flags?: string;
|
|
17517
|
+
} | string);
|
|
17395
17518
|
partitionByComment?: boolean | (({
|
|
17396
17519
|
pattern: string;
|
|
17397
17520
|
flags?: string;
|
|
@@ -17727,6 +17850,13 @@ type PerfectionistSortVariableDeclarations = {
|
|
|
17727
17850
|
matchesAstSelector?: string;
|
|
17728
17851
|
};
|
|
17729
17852
|
useExperimentalDependencyDetection?: boolean;
|
|
17853
|
+
ignoreCallbackDependenciesPatterns?: ({
|
|
17854
|
+
pattern: string;
|
|
17855
|
+
flags?: string;
|
|
17856
|
+
} | string)[] | ({
|
|
17857
|
+
pattern: string;
|
|
17858
|
+
flags?: string;
|
|
17859
|
+
} | string);
|
|
17730
17860
|
partitionByComment?: boolean | (({
|
|
17731
17861
|
pattern: string;
|
|
17732
17862
|
flags?: string;
|
|
@@ -20393,7 +20523,9 @@ type TsNoMeaninglessVoidOperator = [] | [{
|
|
|
20393
20523
|
}];
|
|
20394
20524
|
// ----- ts/no-misused-promises -----
|
|
20395
20525
|
type TsNoMisusedPromises = [] | [{
|
|
20396
|
-
checksConditionals?: boolean
|
|
20526
|
+
checksConditionals?: boolean | {
|
|
20527
|
+
flagUnions?: 'all' | 'strict' | 'none';
|
|
20528
|
+
};
|
|
20397
20529
|
checksSpreads?: boolean;
|
|
20398
20530
|
checksVoidReturn?: boolean | {
|
|
20399
20531
|
arguments?: boolean;
|
|
@@ -20793,7 +20925,9 @@ type UnicodeBom = [] | ['always' | 'never'];
|
|
|
20793
20925
|
// ----- unicorn/catch-error-name -----
|
|
20794
20926
|
type UnicornCatchErrorName = [] | [{
|
|
20795
20927
|
name?: string;
|
|
20796
|
-
ignore?:
|
|
20928
|
+
ignore?: (string | {
|
|
20929
|
+
[k: string]: unknown | undefined;
|
|
20930
|
+
})[];
|
|
20797
20931
|
}];
|
|
20798
20932
|
// ----- unicorn/class-reference-in-static-methods -----
|
|
20799
20933
|
type UnicornClassReferenceInStaticMethods = [] | [{
|
|
@@ -20813,11 +20947,19 @@ type UnicornCommentContent = [] | [{
|
|
|
20813
20947
|
}];
|
|
20814
20948
|
// ----- unicorn/consistent-boolean-name -----
|
|
20815
20949
|
type UnicornConsistentBooleanName = [] | [{
|
|
20816
|
-
|
|
20950
|
+
checkVariables?: 'always' | 'prohibit' | 'never';
|
|
20951
|
+
checkArguments?: 'always' | 'prohibit' | 'never';
|
|
20952
|
+
checkFunctions?: 'always' | 'prohibit' | 'never';
|
|
20953
|
+
checkMethods?: 'always' | 'prohibit' | 'never';
|
|
20954
|
+
checkFields?: 'always' | 'prohibit' | 'never';
|
|
20817
20955
|
prefixes?: {
|
|
20818
20956
|
[k: string]: boolean | undefined;
|
|
20819
20957
|
};
|
|
20958
|
+
wrappers?: {
|
|
20959
|
+
[k: string]: string | undefined;
|
|
20960
|
+
};
|
|
20820
20961
|
ignore?: unknown[];
|
|
20962
|
+
[k: string]: unknown;
|
|
20821
20963
|
}];
|
|
20822
20964
|
// ----- unicorn/consistent-class-member-order -----
|
|
20823
20965
|
type UnicornConsistentClassMemberOrder = [] | [{
|
|
@@ -20851,6 +20993,7 @@ type UnicornConsistentFunctionScoping = [] | [{
|
|
|
20851
20993
|
// ----- unicorn/consistent-function-style -----
|
|
20852
20994
|
type UnicornConsistentFunctionStyle = [] | [{
|
|
20853
20995
|
default?: 'declaration' | 'function-expression' | 'arrow-function' | 'ignore';
|
|
20996
|
+
defaultExport?: 'declaration' | 'function-expression' | 'arrow-function' | 'ignore';
|
|
20854
20997
|
namedFunctions?: 'declaration' | 'function-expression' | 'arrow-function' | 'ignore';
|
|
20855
20998
|
namedExports?: 'declaration' | 'function-expression' | 'arrow-function' | 'ignore';
|
|
20856
20999
|
callbacks?: 'function-expression' | 'arrow-function' | 'ignore';
|
|
@@ -20874,7 +21017,9 @@ type UnicornEscapeCase = [] | ['uppercase' | 'lowercase'];
|
|
|
20874
21017
|
// ----- unicorn/expiring-todo-comments -----
|
|
20875
21018
|
type UnicornExpiringTodoComments = [] | [{
|
|
20876
21019
|
terms?: string[];
|
|
20877
|
-
ignore?:
|
|
21020
|
+
ignore?: (string | {
|
|
21021
|
+
[k: string]: unknown | undefined;
|
|
21022
|
+
})[];
|
|
20878
21023
|
checkDates?: boolean;
|
|
20879
21024
|
checkDatesOnPullRequests?: boolean;
|
|
20880
21025
|
allowWarningComments?: boolean;
|
|
@@ -20889,7 +21034,9 @@ type UnicornExplicitTimerDelay = [] | ['always' | 'never'];
|
|
|
20889
21034
|
// ----- unicorn/filename-case -----
|
|
20890
21035
|
type UnicornFilenameCase = [] | [{
|
|
20891
21036
|
case?: 'camelCase' | 'camelCaseWithAcronyms' | 'snakeCase' | 'kebabCase' | 'pascalCase';
|
|
20892
|
-
ignore?:
|
|
21037
|
+
ignore?: (string | {
|
|
21038
|
+
[k: string]: unknown | undefined;
|
|
21039
|
+
})[];
|
|
20893
21040
|
multipleFileExtensions?: boolean;
|
|
20894
21041
|
checkDirectories?: boolean;
|
|
20895
21042
|
} | {
|
|
@@ -20900,7 +21047,9 @@ type UnicornFilenameCase = [] | [{
|
|
|
20900
21047
|
kebabCase?: boolean;
|
|
20901
21048
|
pascalCase?: boolean;
|
|
20902
21049
|
};
|
|
20903
|
-
ignore?:
|
|
21050
|
+
ignore?: (string | {
|
|
21051
|
+
[k: string]: unknown | undefined;
|
|
21052
|
+
})[];
|
|
20904
21053
|
multipleFileExtensions?: boolean;
|
|
20905
21054
|
checkDirectories?: boolean;
|
|
20906
21055
|
}];
|
|
@@ -20937,6 +21086,8 @@ type UnicornIsolatedFunctions = [] | [{
|
|
|
20937
21086
|
selectors?: string[];
|
|
20938
21087
|
comments?: string[];
|
|
20939
21088
|
}];
|
|
21089
|
+
// ----- unicorn/iteration-fallback-style -----
|
|
21090
|
+
type UnicornIterationFallbackStyle = [] | ['guard' | 'fallback'];
|
|
20940
21091
|
// ----- unicorn/logical-assignment-operators -----
|
|
20941
21092
|
type UnicornLogicalAssignmentOperators = ([] | ['always'] | ['always', {
|
|
20942
21093
|
enforceForIfStatements?: boolean;
|
|
@@ -20957,7 +21108,9 @@ type UnicornNameReplacements = [] | [{
|
|
|
20957
21108
|
replacements?: _UnicornNameReplacements_NameReplacements;
|
|
20958
21109
|
extendDefaultAllowList?: boolean;
|
|
20959
21110
|
allowList?: _UnicornNameReplacements_BooleanObject;
|
|
20960
|
-
ignore?:
|
|
21111
|
+
ignore?: (string | {
|
|
21112
|
+
[k: string]: unknown | undefined;
|
|
21113
|
+
})[];
|
|
20961
21114
|
}];
|
|
20962
21115
|
type _UnicornNameReplacementsReplacements = (false | _UnicornNameReplacements_BooleanObject) | undefined;
|
|
20963
21116
|
interface _UnicornNameReplacements_NameReplacements {
|
|
@@ -21005,7 +21158,7 @@ type UnicornNoInvalidArgumentCount = [] | [{
|
|
|
21005
21158
|
}];
|
|
21006
21159
|
// ----- unicorn/no-keyword-prefix -----
|
|
21007
21160
|
type UnicornNoKeywordPrefix = [] | [{
|
|
21008
|
-
disallowedPrefixes?: []
|
|
21161
|
+
disallowedPrefixes?: string[];
|
|
21009
21162
|
checkProperties?: boolean;
|
|
21010
21163
|
onlyCamelCase?: boolean;
|
|
21011
21164
|
}];
|
|
@@ -21016,7 +21169,9 @@ type UnicornNoNegatedComparison = [] | [{
|
|
|
21016
21169
|
// ----- unicorn/no-non-function-verb-prefix -----
|
|
21017
21170
|
type UnicornNoNonFunctionVerbPrefix = [] | [{
|
|
21018
21171
|
verbs?: string[];
|
|
21019
|
-
ignore?:
|
|
21172
|
+
ignore?: (string | {
|
|
21173
|
+
[k: string]: unknown | undefined;
|
|
21174
|
+
})[];
|
|
21020
21175
|
}];
|
|
21021
21176
|
// ----- unicorn/no-null -----
|
|
21022
21177
|
type UnicornNoNull = [] | [{
|
|
@@ -21029,7 +21184,7 @@ type UnicornNoTypeofUndefined = [] | [{
|
|
|
21029
21184
|
}];
|
|
21030
21185
|
// ----- unicorn/no-unnecessary-polyfills -----
|
|
21031
21186
|
type UnicornNoUnnecessaryPolyfills = [] | [{
|
|
21032
|
-
targets?: string |
|
|
21187
|
+
targets?: string | string[] | {
|
|
21033
21188
|
[k: string]: unknown | undefined;
|
|
21034
21189
|
};
|
|
21035
21190
|
}];
|
|
@@ -21083,11 +21238,11 @@ type UnicornPreferArrayFind = [] | [{
|
|
|
21083
21238
|
}];
|
|
21084
21239
|
// ----- unicorn/prefer-array-flat -----
|
|
21085
21240
|
type UnicornPreferArrayFlat = [] | [{
|
|
21086
|
-
functions?:
|
|
21241
|
+
functions?: string[];
|
|
21087
21242
|
}];
|
|
21088
21243
|
// ----- unicorn/prefer-at -----
|
|
21089
21244
|
type UnicornPreferAt = [] | [{
|
|
21090
|
-
getLastElementFunctions?:
|
|
21245
|
+
getLastElementFunctions?: string[];
|
|
21091
21246
|
checkAllIndexAccess?: boolean;
|
|
21092
21247
|
}];
|
|
21093
21248
|
// ----- unicorn/prefer-continue -----
|
|
@@ -21111,6 +21266,12 @@ type UnicornPreferExplicitViewportUnits = [] | [{
|
|
|
21111
21266
|
type UnicornPreferExportFrom = [] | [{
|
|
21112
21267
|
checkUsedVariables?: boolean;
|
|
21113
21268
|
}];
|
|
21269
|
+
// ----- unicorn/prefer-https -----
|
|
21270
|
+
type UnicornPreferHttps = [] | [{
|
|
21271
|
+
ignore?: (string | {
|
|
21272
|
+
[k: string]: unknown | undefined;
|
|
21273
|
+
})[];
|
|
21274
|
+
}];
|
|
21114
21275
|
// ----- unicorn/prefer-includes-over-repeated-comparisons -----
|
|
21115
21276
|
type UnicornPreferIncludesOverRepeatedComparisons = [] | [{
|
|
21116
21277
|
minimumComparisons?: number;
|
|
@@ -21127,7 +21288,7 @@ type UnicornPreferNumberProperties = [] | [{
|
|
|
21127
21288
|
}];
|
|
21128
21289
|
// ----- unicorn/prefer-object-from-entries -----
|
|
21129
21290
|
type UnicornPreferObjectFromEntries = [] | [{
|
|
21130
|
-
functions?:
|
|
21291
|
+
functions?: string[];
|
|
21131
21292
|
}];
|
|
21132
21293
|
// ----- unicorn/prefer-query-selector -----
|
|
21133
21294
|
type UnicornPreferQuerySelector = [] | [{
|
|
@@ -21146,7 +21307,7 @@ type UnicornPreferSetHas = [] | [{
|
|
|
21146
21307
|
type UnicornPreferShortArrowMethod = [] | ['always' | 'consistent-as-needed'];
|
|
21147
21308
|
// ----- unicorn/prefer-single-call -----
|
|
21148
21309
|
type UnicornPreferSingleCall = [] | [{
|
|
21149
|
-
ignore?:
|
|
21310
|
+
ignore?: string[];
|
|
21150
21311
|
}];
|
|
21151
21312
|
// ----- unicorn/prefer-string-repeat -----
|
|
21152
21313
|
type UnicornPreferStringRepeat = [] | [{
|
|
@@ -21154,7 +21315,7 @@ type UnicornPreferStringRepeat = [] | [{
|
|
|
21154
21315
|
}];
|
|
21155
21316
|
// ----- unicorn/prefer-structured-clone -----
|
|
21156
21317
|
type UnicornPreferStructuredClone = [] | [{
|
|
21157
|
-
functions?:
|
|
21318
|
+
functions?: string[];
|
|
21158
21319
|
}];
|
|
21159
21320
|
// ----- unicorn/prefer-switch -----
|
|
21160
21321
|
type UnicornPreferSwitch = [] | [{
|
|
@@ -21179,6 +21340,12 @@ type UnicornRequireCssEscape = [] | [{
|
|
|
21179
21340
|
type UnicornRequireFrontmatterFields = [] | [{
|
|
21180
21341
|
fields?: string[];
|
|
21181
21342
|
}];
|
|
21343
|
+
// ----- unicorn/single-line-block-comment-style -----
|
|
21344
|
+
type UnicornSingleLineBlockCommentStyle = [] | ['multiline' | 'single-line'] | ['multiline' | 'single-line', {
|
|
21345
|
+
ignore?: (string | {
|
|
21346
|
+
[k: string]: unknown | undefined;
|
|
21347
|
+
})[];
|
|
21348
|
+
}];
|
|
21182
21349
|
// ----- unicorn/string-content -----
|
|
21183
21350
|
type UnicornStringContent = [] | [{
|
|
21184
21351
|
patterns?: {
|
|
@@ -21368,11 +21535,15 @@ type YamlSortKeys = [{
|
|
|
21368
21535
|
type?: 'asc' | 'desc';
|
|
21369
21536
|
caseSensitive?: boolean;
|
|
21370
21537
|
natural?: boolean;
|
|
21538
|
+
} | {
|
|
21539
|
+
type: 'ignore';
|
|
21371
21540
|
};
|
|
21372
21541
|
})[] | {
|
|
21373
21542
|
type?: 'asc' | 'desc';
|
|
21374
21543
|
caseSensitive?: boolean;
|
|
21375
21544
|
natural?: boolean;
|
|
21545
|
+
} | {
|
|
21546
|
+
type: 'ignore';
|
|
21376
21547
|
};
|
|
21377
21548
|
minKeys?: number;
|
|
21378
21549
|
allowLineSeparatedGroups?: boolean;
|
|
@@ -21385,11 +21556,15 @@ type YamlSortKeys = [{
|
|
|
21385
21556
|
type?: 'asc' | 'desc';
|
|
21386
21557
|
caseSensitive?: boolean;
|
|
21387
21558
|
natural?: boolean;
|
|
21559
|
+
} | {
|
|
21560
|
+
type: 'ignore';
|
|
21388
21561
|
};
|
|
21389
21562
|
})[] | {
|
|
21390
21563
|
type?: 'asc' | 'desc';
|
|
21391
21564
|
caseSensitive?: boolean;
|
|
21392
21565
|
natural?: boolean;
|
|
21566
|
+
} | {
|
|
21567
|
+
type: 'ignore';
|
|
21393
21568
|
};
|
|
21394
21569
|
minKeys?: number;
|
|
21395
21570
|
allowLineSeparatedGroups?: boolean;
|
|
@@ -21451,7 +21626,7 @@ type Yoda = [] | ['always' | 'never'] | ['always' | 'never', {
|
|
|
21451
21626
|
onlyEquality?: boolean;
|
|
21452
21627
|
}];
|
|
21453
21628
|
// Names of all the configs
|
|
21454
|
-
type ConfigNames = 'kp/astro/setup' | 'kp/astro/component' | 'kp/astro/rules' | 'kp/astro/script-ts' | 'kp/disables/stylelint-config' | 'kp/disables/prettier' | 'kp/html-script' | 'kp/html/setup' | 'kp/html' | 'kp/html/markdown-code-blocks' | 'kp/ignores' | 'kp/js/rules' | 'kp/js/cjs' | 'kp/json/setup' | 'kp/json/rules-json' | 'kp/json/rules-jsonc' | 'kp/json/rules-json5' | 'kp/json/rules' | 'kp/json/rules-settings' | 'kp/json/rules-package' | 'kp/json/rules-tsconfig' | 'kp/json/rules-overrides' | 'kp/jsx/rules' | 'kp/markdown/remark' | 'kp/markdown/code-blocks' | 'kp/mdx/remark' | 'kp/mdx/code-blocks' | 'kp/react/setup' | 'kp/react/rules' | 'kp/react/disable-type-aware' | 'kp/svelte/setup' | 'kp/svelte/scripts' | 'kp/svelte/component' | 'kp/svelte/rules' | 'kp/svelte/sveltekit-routes' | 'kp/svelte/sveltekit-app' | 'kp/svelte/modules' | 'kp/test/setup' | 'kp/test/rules' | 'kp/toml/setup' | 'kp/toml/rules' | 'kp/ts/rules' | 'kp/ts/dts' | 'kp/tsx/rules' | 'kp/yaml/setup' | 'kp/yaml/rules';
|
|
21629
|
+
type ConfigNames = 'kp/astro/setup' | 'kp/astro/component' | 'kp/astro/rules' | 'kp/astro/script-ts' | 'kp/disables/stylelint-config' | 'kp/disables/prettier' | 'kp/extra-file-extensions' | 'kp/html-script' | 'kp/html/setup' | 'kp/html' | 'kp/html/markdown-code-blocks' | 'kp/ignores' | 'kp/js/rules' | 'kp/js/cjs' | 'kp/json/setup' | 'kp/json/rules-json' | 'kp/json/rules-jsonc' | 'kp/json/rules-json5' | 'kp/json/rules' | 'kp/json/rules-settings' | 'kp/json/rules-package' | 'kp/json/rules-tsconfig' | 'kp/json/rules-overrides' | 'kp/jsx/rules' | 'kp/markdown/remark' | 'kp/markdown/code-blocks' | 'kp/mdx/remark' | 'kp/mdx/code-blocks' | 'kp/react/setup' | 'kp/react/rules' | 'kp/react/disable-type-aware' | 'kp/svelte/setup' | 'kp/svelte/scripts' | 'kp/svelte/component' | 'kp/svelte/rules' | 'kp/svelte/sveltekit-routes' | 'kp/svelte/sveltekit-app' | 'kp/svelte/modules' | 'kp/test/setup' | 'kp/test/rules' | 'kp/toml/setup' | 'kp/toml/rules' | 'kp/ts/rules' | 'kp/ts/dts' | 'kp/tsx/rules' | 'kp/yaml/setup' | 'kp/yaml/rules';
|
|
21455
21630
|
//#endregion
|
|
21456
21631
|
//#region src/types.d.ts
|
|
21457
21632
|
type Awaitable<T> = Promise<T> | T;
|
|
@@ -21610,22 +21785,22 @@ type FileType = 'astro' | 'cjs' | 'cjsx' | 'cts' | 'ctsx' | 'html' | 'js' | 'jso
|
|
|
21610
21785
|
*
|
|
21611
21786
|
* @returns The fixed source string.
|
|
21612
21787
|
*/
|
|
21613
|
-
declare function fix(source: string, fileTypeOrConfig?: FileType | OptionsConfig, config?: OptionsConfig): Promise<string>;
|
|
21788
|
+
export declare function fix(source: string, fileTypeOrConfig?: FileType | OptionsConfig, config?: OptionsConfig): Promise<string>;
|
|
21614
21789
|
/**
|
|
21615
21790
|
* Lint and fix a file in place using the shared ESLint configuration.
|
|
21616
21791
|
*
|
|
21617
21792
|
* @param filePath - Path to the file to lint and fix.
|
|
21618
21793
|
* @param config - Optional `OptionsConfig` for configuration.
|
|
21619
21794
|
*/
|
|
21620
|
-
declare function fixFile(filePath: string, config?: OptionsConfig): Promise<void>;
|
|
21795
|
+
export declare function fixFile(filePath: string, config?: OptionsConfig): Promise<void>;
|
|
21621
21796
|
/**
|
|
21622
21797
|
* Clear the cached ESLint module and instances. Subsequent calls to `fix` or
|
|
21623
21798
|
* `fixFile` will re-import ESLint and re-create instances.
|
|
21624
21799
|
*/
|
|
21625
|
-
declare function clearCache(): void;
|
|
21800
|
+
export declare function clearCache(): void;
|
|
21626
21801
|
//#endregion
|
|
21627
21802
|
//#region src/config.d.ts
|
|
21628
|
-
declare const defaultPluginRenaming: {
|
|
21803
|
+
export declare const defaultPluginRenaming: {
|
|
21629
21804
|
'@eslint-community/eslint-comments': string;
|
|
21630
21805
|
'@eslint-react': string;
|
|
21631
21806
|
jsonc: string;
|
|
@@ -21638,15 +21813,29 @@ declare const defaultPluginRenaming: {
|
|
|
21638
21813
|
vitest: string;
|
|
21639
21814
|
yml: string;
|
|
21640
21815
|
};
|
|
21641
|
-
type ResolvedOptions<T> = T extends boolean ? never : NonNullable<T>;
|
|
21816
|
+
export type ResolvedOptions<T> = T extends boolean ? never : NonNullable<T>;
|
|
21642
21817
|
/**
|
|
21643
|
-
*
|
|
21818
|
+
* **@Kitschpatrol's Shared [ESLint](https://eslint.org/) Configuration***
|
|
21819
|
+
*
|
|
21820
|
+
* @example
|
|
21821
|
+
* import { eslintConfig } from '@kitschpatrol/eslint-config'
|
|
21822
|
+
*
|
|
21823
|
+
* export default eslintConfig(
|
|
21824
|
+
* {
|
|
21825
|
+
* // Option customizations here
|
|
21826
|
+
* },
|
|
21827
|
+
* {
|
|
21828
|
+
* // Additional flat config objects here
|
|
21829
|
+
* },
|
|
21830
|
+
* )
|
|
21644
21831
|
*
|
|
21645
21832
|
* @param options The options for generating the ESLint configurations.
|
|
21646
21833
|
* @param userConfigs The user configurations to be merged with the generated
|
|
21647
21834
|
* configurations.
|
|
21835
|
+
* @see [@kitschpatrol/eslint-config](https://github.com/kitschpatrol/shared-config/tree/main/packages/eslint-config)
|
|
21836
|
+
* @see [@kitschpatrol/shared-config](https://github.com/kitschpatrol/shared-config)*
|
|
21648
21837
|
*/
|
|
21649
|
-
declare function eslintConfig(options?: Omit<TypedFlatConfigItem, 'files'> & OptionsConfig, ...userConfigs: Array<Awaitable<FlatConfigComposer<any, any> | Linter.Config[] | TypedFlatConfigItem | TypedFlatConfigItem[]>>): Promise<FlatConfigComposer<TypedFlatConfigItem, ConfigNames>>;
|
|
21838
|
+
export declare function eslintConfig(options?: Omit<TypedFlatConfigItem, 'files'> & OptionsConfig, ...userConfigs: Array<Awaitable<FlatConfigComposer<any, any> | Linter.Config[] | TypedFlatConfigItem | TypedFlatConfigItem[]>>): Promise<FlatConfigComposer<TypedFlatConfigItem, ConfigNames>>;
|
|
21650
21839
|
/**
|
|
21651
21840
|
* Get ESLint language options object.
|
|
21652
21841
|
*
|
|
@@ -21654,21 +21843,21 @@ declare function eslintConfig(options?: Omit<TypedFlatConfigItem, 'files'> & Opt
|
|
|
21654
21843
|
* @param isJsxEnabled - Whether to enable JSX parsing.
|
|
21655
21844
|
* @param tsconfigRootDirectory - Root directory for TypeScript project lookup.
|
|
21656
21845
|
*/
|
|
21657
|
-
declare function getLanguageOptions(typeAware?: boolean, isJsxEnabled?: boolean, tsconfigRootDirectory?: string): Linter.LanguageOptions;
|
|
21846
|
+
export declare function getLanguageOptions(typeAware?: boolean, isJsxEnabled?: boolean, tsconfigRootDirectory?: string): Linter.LanguageOptions;
|
|
21658
21847
|
/**
|
|
21659
21848
|
* Get the overrides for a specific key.
|
|
21660
21849
|
*
|
|
21661
21850
|
* @param options The options object.
|
|
21662
21851
|
* @param key The key to get the overrides for.
|
|
21663
21852
|
*/
|
|
21664
|
-
declare function getOverrides<K extends keyof OptionsConfig>(options: OptionsConfig, key: K): Partial<Linter.RulesRecord & RuleOptions>;
|
|
21853
|
+
export declare function getOverrides<K extends keyof OptionsConfig>(options: OptionsConfig, key: K): Partial<Linter.RulesRecord & RuleOptions>;
|
|
21665
21854
|
/**
|
|
21666
21855
|
* Get the overrides for embedded scripts for a specific key.
|
|
21667
21856
|
*
|
|
21668
21857
|
* @param options The options object.
|
|
21669
21858
|
* @param key The key to get the overrides for.
|
|
21670
21859
|
*/
|
|
21671
|
-
declare function getOverridesEmbeddedScripts<K extends keyof OptionsConfig>(options: OptionsConfig, key: K): Partial<Linter.RulesRecord & RuleOptions>;
|
|
21860
|
+
export declare function getOverridesEmbeddedScripts<K extends keyof OptionsConfig>(options: OptionsConfig, key: K): Partial<Linter.RulesRecord & RuleOptions>;
|
|
21672
21861
|
/**
|
|
21673
21862
|
* Construct an array of ESLint flat config items.
|
|
21674
21863
|
*
|
|
@@ -21684,101 +21873,101 @@ declare function getOverridesEmbeddedScripts<K extends keyof OptionsConfig>(opti
|
|
|
21684
21873
|
* @param options The options object.
|
|
21685
21874
|
* @param key The key to resolve the sub options for.
|
|
21686
21875
|
*/
|
|
21687
|
-
declare function resolveSubOptions<K extends keyof OptionsConfig>(options: OptionsConfig, key: K): ResolvedOptions<OptionsConfig[K]>;
|
|
21876
|
+
export declare function resolveSubOptions<K extends keyof OptionsConfig>(options: OptionsConfig, key: K): ResolvedOptions<OptionsConfig[K]>;
|
|
21688
21877
|
//#endregion
|
|
21689
21878
|
//#region src/configs/astro.d.ts
|
|
21690
|
-
declare function astro(options?: OptionsOverrides & OptionsOverridesEmbeddedScripts & OptionsTsconfigRootDirectory & OptionsTypeAware): Promise<TypedFlatConfigItem[]>;
|
|
21879
|
+
export declare function astro(options?: OptionsOverrides & OptionsOverridesEmbeddedScripts & OptionsTsconfigRootDirectory & OptionsTypeAware): Promise<TypedFlatConfigItem[]>;
|
|
21691
21880
|
//#endregion
|
|
21692
21881
|
//#region src/configs/disables.d.ts
|
|
21693
21882
|
/**
|
|
21694
21883
|
* Final configuration pass to disable specific rules in specific contexts.
|
|
21695
21884
|
*/
|
|
21696
|
-
declare function disables(): Promise<TypedFlatConfigItem[]>;
|
|
21885
|
+
export declare function disables(): Promise<TypedFlatConfigItem[]>;
|
|
21697
21886
|
//#endregion
|
|
21698
21887
|
//#region src/configs/html.d.ts
|
|
21699
|
-
declare function html(options?: OptionsOverrides & OptionsOverridesEmbeddedScripts): Promise<TypedFlatConfigItem[]>;
|
|
21888
|
+
export declare function html(options?: OptionsOverrides & OptionsOverridesEmbeddedScripts): Promise<TypedFlatConfigItem[]>;
|
|
21700
21889
|
//#endregion
|
|
21701
21890
|
//#region src/configs/ignores.d.ts
|
|
21702
|
-
declare function ignores(userIgnores?: string[]): Promise<TypedFlatConfigItem[]>;
|
|
21891
|
+
export declare function ignores(userIgnores?: string[]): Promise<TypedFlatConfigItem[]>;
|
|
21703
21892
|
//#endregion
|
|
21704
21893
|
//#region src/configs/js.d.ts
|
|
21705
21894
|
/**
|
|
21706
21895
|
* JavaScript configuration, note use of TypeScript rules
|
|
21707
21896
|
*/
|
|
21708
|
-
declare function js(options?: OptionsOverrides & OptionsTsconfigRootDirectory & OptionsTypeAware): Promise<TypedFlatConfigItem[]>;
|
|
21897
|
+
export declare function js(options?: OptionsOverrides & OptionsTsconfigRootDirectory & OptionsTypeAware): Promise<TypedFlatConfigItem[]>;
|
|
21709
21898
|
//#endregion
|
|
21710
21899
|
//#region src/configs/json.d.ts
|
|
21711
|
-
declare function json(options?: OptionsOverrides): Promise<TypedFlatConfigItem[]>;
|
|
21900
|
+
export declare function json(options?: OptionsOverrides): Promise<TypedFlatConfigItem[]>;
|
|
21712
21901
|
//#endregion
|
|
21713
21902
|
//#region src/configs/jsx.d.ts
|
|
21714
|
-
declare function jsx(options?: OptionsOverrides & OptionsTsconfigRootDirectory & OptionsTypeAware): Promise<TypedFlatConfigItem[]>;
|
|
21903
|
+
export declare function jsx(options?: OptionsOverrides & OptionsTsconfigRootDirectory & OptionsTypeAware): Promise<TypedFlatConfigItem[]>;
|
|
21715
21904
|
//#endregion
|
|
21716
21905
|
//#region src/configs/md.d.ts
|
|
21717
|
-
declare function md(options?: OptionsOverrides & OptionsOverridesEmbeddedScripts): Promise<TypedFlatConfigItem[]>;
|
|
21906
|
+
export declare function md(options?: OptionsOverrides & OptionsOverridesEmbeddedScripts): Promise<TypedFlatConfigItem[]>;
|
|
21718
21907
|
//#endregion
|
|
21719
21908
|
//#region src/configs/mdx.d.ts
|
|
21720
|
-
declare function mdx(options?: OptionsOverrides & OptionsOverridesEmbeddedScripts): Promise<TypedFlatConfigItem[]>;
|
|
21909
|
+
export declare function mdx(options?: OptionsOverrides & OptionsOverridesEmbeddedScripts): Promise<TypedFlatConfigItem[]>;
|
|
21721
21910
|
//#endregion
|
|
21722
21911
|
//#region src/configs/react.d.ts
|
|
21723
|
-
declare function react(options?: OptionsOverrides & OptionsTsconfigRootDirectory & OptionsTypeAware & {
|
|
21912
|
+
export declare function react(options?: OptionsOverrides & OptionsTsconfigRootDirectory & OptionsTypeAware & {
|
|
21724
21913
|
typeAwareJavaScript?: boolean;
|
|
21725
21914
|
}): Promise<TypedFlatConfigItem[]>;
|
|
21726
21915
|
//#endregion
|
|
21727
21916
|
//#region src/configs/svelte.d.ts
|
|
21728
|
-
declare function svelte(options?: OptionsOverrides & OptionsTsconfigRootDirectory & OptionsTypeAware & {
|
|
21917
|
+
export declare function svelte(options?: OptionsOverrides & OptionsTsconfigRootDirectory & OptionsTypeAware & {
|
|
21729
21918
|
typeAwareJavaScript?: boolean;
|
|
21730
21919
|
}): Promise<TypedFlatConfigItem[]>;
|
|
21731
21920
|
//#endregion
|
|
21732
21921
|
//#region src/configs/test.d.ts
|
|
21733
|
-
declare function test(options?: OptionsIsInEditor & OptionsOverrides): Promise<TypedFlatConfigItem[]>;
|
|
21922
|
+
export declare function test(options?: OptionsIsInEditor & OptionsOverrides): Promise<TypedFlatConfigItem[]>;
|
|
21734
21923
|
//#endregion
|
|
21735
21924
|
//#region src/configs/toml.d.ts
|
|
21736
|
-
declare function toml(options?: OptionsOverrides): Promise<TypedFlatConfigItem[]>;
|
|
21925
|
+
export declare function toml(options?: OptionsOverrides): Promise<TypedFlatConfigItem[]>;
|
|
21737
21926
|
//#endregion
|
|
21738
21927
|
//#region src/configs/ts.d.ts
|
|
21739
|
-
declare function ts(options?: OptionsOverrides & OptionsTsconfigRootDirectory & OptionsTypeAware): Promise<TypedFlatConfigItem[]>;
|
|
21928
|
+
export declare function ts(options?: OptionsOverrides & OptionsTsconfigRootDirectory & OptionsTypeAware): Promise<TypedFlatConfigItem[]>;
|
|
21740
21929
|
//#endregion
|
|
21741
21930
|
//#region src/configs/tsx.d.ts
|
|
21742
|
-
declare function tsx(options?: OptionsOverrides & OptionsTsconfigRootDirectory & OptionsTypeAware): Promise<TypedFlatConfigItem[]>;
|
|
21931
|
+
export declare function tsx(options?: OptionsOverrides & OptionsTsconfigRootDirectory & OptionsTypeAware): Promise<TypedFlatConfigItem[]>;
|
|
21743
21932
|
//#endregion
|
|
21744
21933
|
//#region src/configs/yaml.d.ts
|
|
21745
|
-
declare function yaml(options?: OptionsOverrides): Promise<TypedFlatConfigItem[]>;
|
|
21934
|
+
export declare function yaml(options?: OptionsOverrides): Promise<TypedFlatConfigItem[]>;
|
|
21746
21935
|
//#endregion
|
|
21747
21936
|
//#region src/globs.d.ts
|
|
21748
|
-
declare const GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
21749
|
-
declare const GLOB_SRC = "**/*.?([cm])[jt]s?(x)";
|
|
21750
|
-
declare const GLOB_JS = "**/*.?([cm])js";
|
|
21751
|
-
declare const GLOB_JSX = "**/*.?([cm])jsx";
|
|
21752
|
-
declare const GLOB_TS = "**/*.?([cm])ts";
|
|
21753
|
-
declare const GLOB_TSX = "**/*.?([cm])tsx";
|
|
21754
|
-
declare const GLOB_STYLE = "**/*.{c,le,sc}ss";
|
|
21755
|
-
declare const GLOB_CSS = "**/*.css";
|
|
21756
|
-
declare const GLOB_POSTCSS = "**/*.{p,post}css";
|
|
21757
|
-
declare const GLOB_LESS = "**/*.less";
|
|
21758
|
-
declare const GLOB_SCSS = "**/*.scss";
|
|
21759
|
-
declare const GLOB_JSON = "**/*.json";
|
|
21760
|
-
declare const GLOB_JSON5 = "**/*.json5";
|
|
21761
|
-
declare const GLOB_JSONC = "**/*.jsonc";
|
|
21762
|
-
declare const GLOB_MARKDOWN = "**/*.md";
|
|
21763
|
-
declare const GLOB_MDX = "**/*.mdx";
|
|
21764
|
-
declare const GLOB_SVELTE = "**/*.svelte";
|
|
21765
|
-
declare const GLOB_SVELTE_TS = "**/*.svelte.ts";
|
|
21766
|
-
declare const GLOB_SVELTE_JS = "**/*.svelte.js";
|
|
21767
|
-
declare const GLOB_YAML = "**/*.y?(a)ml";
|
|
21768
|
-
declare const GLOB_TOML = "**/*.toml";
|
|
21769
|
-
declare const GLOB_XML = "**/*.xml";
|
|
21770
|
-
declare const GLOB_SVG = "**/*.svg";
|
|
21771
|
-
declare const GLOB_HTML = "**/*.htm?(l)";
|
|
21772
|
-
declare const GLOB_ASTRO = "**/*.astro";
|
|
21773
|
-
declare const GLOB_ASTRO_TS = "**/*.astro/*.ts";
|
|
21774
|
-
declare const GLOB_GRAPHQL = "**/*.{g,graph}ql";
|
|
21775
|
-
declare const GLOB_MARKDOWN_CODE = "**/*.md/**/*.?([cm])[jt]s?(x)";
|
|
21776
|
-
declare const GLOB_MDX_CODE = "**/*.mdx/**/*.?([cm])[jt]s?(x)";
|
|
21777
|
-
declare const GLOB_MARKDOWN_HTML_CODE = "**/*.md/**/*.htm?(l)";
|
|
21778
|
-
declare const GLOB_MDX_HTML_CODE = "**/*.mdx/**/*.htm?(l)";
|
|
21779
|
-
declare const GLOB_TESTS: string[];
|
|
21780
|
-
declare const GLOB_ALL_SRC: string[];
|
|
21781
|
-
declare const GLOB_EXCLUDE: string[];
|
|
21937
|
+
export declare const GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
21938
|
+
export declare const GLOB_SRC = "**/*.?([cm])[jt]s?(x)";
|
|
21939
|
+
export declare const GLOB_JS = "**/*.?([cm])js";
|
|
21940
|
+
export declare const GLOB_JSX = "**/*.?([cm])jsx";
|
|
21941
|
+
export declare const GLOB_TS = "**/*.?([cm])ts";
|
|
21942
|
+
export declare const GLOB_TSX = "**/*.?([cm])tsx";
|
|
21943
|
+
export declare const GLOB_STYLE = "**/*.{c,le,sc}ss";
|
|
21944
|
+
export declare const GLOB_CSS = "**/*.css";
|
|
21945
|
+
export declare const GLOB_POSTCSS = "**/*.{p,post}css";
|
|
21946
|
+
export declare const GLOB_LESS = "**/*.less";
|
|
21947
|
+
export declare const GLOB_SCSS = "**/*.scss";
|
|
21948
|
+
export declare const GLOB_JSON = "**/*.json";
|
|
21949
|
+
export declare const GLOB_JSON5 = "**/*.json5";
|
|
21950
|
+
export declare const GLOB_JSONC = "**/*.jsonc";
|
|
21951
|
+
export declare const GLOB_MARKDOWN = "**/*.md";
|
|
21952
|
+
export declare const GLOB_MDX = "**/*.mdx";
|
|
21953
|
+
export declare const GLOB_SVELTE = "**/*.svelte";
|
|
21954
|
+
export declare const GLOB_SVELTE_TS = "**/*.svelte.ts";
|
|
21955
|
+
export declare const GLOB_SVELTE_JS = "**/*.svelte.js";
|
|
21956
|
+
export declare const GLOB_YAML = "**/*.y?(a)ml";
|
|
21957
|
+
export declare const GLOB_TOML = "**/*.toml";
|
|
21958
|
+
export declare const GLOB_XML = "**/*.xml";
|
|
21959
|
+
export declare const GLOB_SVG = "**/*.svg";
|
|
21960
|
+
export declare const GLOB_HTML = "**/*.htm?(l)";
|
|
21961
|
+
export declare const GLOB_ASTRO = "**/*.astro";
|
|
21962
|
+
export declare const GLOB_ASTRO_TS = "**/*.astro/*.ts";
|
|
21963
|
+
export declare const GLOB_GRAPHQL = "**/*.{g,graph}ql";
|
|
21964
|
+
export declare const GLOB_MARKDOWN_CODE = "**/*.md/**/*.?([cm])[jt]s?(x)";
|
|
21965
|
+
export declare const GLOB_MDX_CODE = "**/*.mdx/**/*.?([cm])[jt]s?(x)";
|
|
21966
|
+
export declare const GLOB_MARKDOWN_HTML_CODE = "**/*.md/**/*.htm?(l)";
|
|
21967
|
+
export declare const GLOB_MDX_HTML_CODE = "**/*.mdx/**/*.htm?(l)";
|
|
21968
|
+
export declare const GLOB_TESTS: string[];
|
|
21969
|
+
export declare const GLOB_ALL_SRC: string[];
|
|
21970
|
+
export declare const GLOB_EXCLUDE: string[];
|
|
21782
21971
|
//#endregion
|
|
21783
21972
|
//#region src/utilities.d.ts
|
|
21784
21973
|
/**
|
|
@@ -21786,13 +21975,13 @@ declare const GLOB_EXCLUDE: string[];
|
|
|
21786
21975
|
*
|
|
21787
21976
|
* @param configs - An array of configs or a single config.
|
|
21788
21977
|
*/
|
|
21789
|
-
declare function combine(...configs: Array<Awaitable<TypedFlatConfigItem | TypedFlatConfigItem[]>>): Promise<TypedFlatConfigItem[]>;
|
|
21978
|
+
export declare function combine(...configs: Array<Awaitable<TypedFlatConfigItem | TypedFlatConfigItem[]>>): Promise<TypedFlatConfigItem[]>;
|
|
21790
21979
|
/**
|
|
21791
21980
|
* Import a module dynamically and return the default export.
|
|
21792
21981
|
*
|
|
21793
21982
|
* @param m - The module to import.
|
|
21794
21983
|
*/
|
|
21795
|
-
declare function interopDefault<T>(m: Awaitable<T>): Promise<T extends {
|
|
21984
|
+
export declare function interopDefault<T>(m: Awaitable<T>): Promise<T extends {
|
|
21796
21985
|
default: infer U;
|
|
21797
21986
|
} ? U : T>;
|
|
21798
21987
|
/**
|
|
@@ -21804,7 +21993,7 @@ declare function interopDefault<T>(m: Awaitable<T>): Promise<T extends {
|
|
|
21804
21993
|
*
|
|
21805
21994
|
* @returns True if running in an editor environment, false otherwise
|
|
21806
21995
|
*/
|
|
21807
|
-
declare function isInEditorEnv(): boolean;
|
|
21996
|
+
export declare function isInEditorEnv(): boolean;
|
|
21808
21997
|
/**
|
|
21809
21998
|
* Checks if the code is running within Git hooks or lint-staged.
|
|
21810
21999
|
*
|
|
@@ -21813,7 +22002,7 @@ declare function isInEditorEnv(): boolean;
|
|
|
21813
22002
|
*
|
|
21814
22003
|
* @returns True if running in Git hooks or lint-staged, false otherwise
|
|
21815
22004
|
*/
|
|
21816
|
-
declare function isInGitHooksOrLintStaged(): boolean;
|
|
22005
|
+
export declare function isInGitHooksOrLintStaged(): boolean;
|
|
21817
22006
|
/**
|
|
21818
22007
|
* Rename plugin names a flat configs array.
|
|
21819
22008
|
*
|
|
@@ -21829,7 +22018,7 @@ declare function isInGitHooksOrLintStaged(): boolean;
|
|
|
21829
22018
|
* @param configs - The flat configs array.
|
|
21830
22019
|
* @param map - A map of global to local plugin names.
|
|
21831
22020
|
*/
|
|
21832
|
-
declare function renamePluginInConfigs(configs: TypedFlatConfigItem[], map: Record<string, string>): TypedFlatConfigItem[];
|
|
22021
|
+
export declare function renamePluginInConfigs(configs: TypedFlatConfigItem[], map: Record<string, string>): TypedFlatConfigItem[];
|
|
21833
22022
|
/**
|
|
21834
22023
|
* Rename plugin prefixes in a rule object.
|
|
21835
22024
|
*
|
|
@@ -21850,13 +22039,13 @@ declare function renamePluginInConfigs(configs: TypedFlatConfigItem[], map: Reco
|
|
|
21850
22039
|
* @param rules - The rules object.
|
|
21851
22040
|
* @param map - A map of plugin prefixes to rename.
|
|
21852
22041
|
*/
|
|
21853
|
-
declare function renameRules(rules: Record<string, any>, map: Record<string, string>): Record<string, any>;
|
|
22042
|
+
export declare function renameRules(rules: Record<string, any>, map: Record<string, string>): Record<string, any>;
|
|
21854
22043
|
/**
|
|
21855
22044
|
* Convert a value to an array.
|
|
21856
22045
|
*
|
|
21857
22046
|
* @param value - The value to convert.
|
|
21858
22047
|
*/
|
|
21859
|
-
declare function toArray<T>(value: T | T[]): T[];
|
|
22048
|
+
export declare function toArray<T>(value: T | T[]): T[];
|
|
21860
22049
|
/**
|
|
21861
22050
|
* Generates a Perfectionist sort configuration object from an array of strings.
|
|
21862
22051
|
* Uses the v5.0 array-based customGroups format.
|
|
@@ -21870,7 +22059,7 @@ declare function toArray<T>(value: T | T[]): T[];
|
|
|
21870
22059
|
*
|
|
21871
22060
|
* @see https://perfectionist.dev/rules/sort-objects#useconfigurationif
|
|
21872
22061
|
*/
|
|
21873
|
-
declare function generatePerfectionistSortConfig(strings: string[], matchType?: 'exact' | 'leading' | 'trailing'): {
|
|
22062
|
+
export declare function generatePerfectionistSortConfig(strings: string[], matchType?: 'exact' | 'leading' | 'trailing'): {
|
|
21874
22063
|
customGroups: Array<{
|
|
21875
22064
|
elementNamePattern: string;
|
|
21876
22065
|
groupName: string;
|
|
@@ -21881,4 +22070,4 @@ declare function generatePerfectionistSortConfig(strings: string[], matchType?:
|
|
|
21881
22070
|
};
|
|
21882
22071
|
};
|
|
21883
22072
|
//#endregion
|
|
21884
|
-
export { type Awaitable, type ConfigNames, type FileType,
|
|
22073
|
+
export { type Awaitable, type ConfigNames, type FileType, type OptionsConfig, type OptionsHasTypeScript, type OptionsIsInEditor, type OptionsOverrides, type OptionsOverridesEmbeddedScripts, type OptionsTsconfigRootDirectory, type OptionsTypeAware, type Rules, type TypedFlatConfigItem, eslintConfig as default };
|