@kitschpatrol/eslint-config 8.6.0 → 8.7.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 +500 -362
- package/dist/index.js +1 -1
- package/package.json +27 -27
package/dist/index.d.ts
CHANGED
|
@@ -2389,7 +2389,7 @@ interface RuleOptions {
|
|
|
2389
2389
|
*
|
|
2390
2390
|
* @see https://eslint-plugin-package-json.dev/rules/scripts-name-casing
|
|
2391
2391
|
*/
|
|
2392
|
-
'json-package/scripts-name-casing'?: Linter.RuleEntry<
|
|
2392
|
+
'json-package/scripts-name-casing'?: Linter.RuleEntry<JsonPackageScriptsNameCasing>;
|
|
2393
2393
|
/**
|
|
2394
2394
|
* Selected collections must be in a consistent order (lexicographical for
|
|
2395
2395
|
* most; lifecycle-aware for scripts).
|
|
@@ -4329,7 +4329,7 @@ interface RuleOptions {
|
|
|
4329
4329
|
*
|
|
4330
4330
|
* @see https://eslint.org/docs/latest/rules/no-unmodified-loop-condition
|
|
4331
4331
|
*/
|
|
4332
|
-
'no-unmodified-loop-condition'?: Linter.RuleEntry<
|
|
4332
|
+
'no-unmodified-loop-condition'?: Linter.RuleEntry<NoUnmodifiedLoopCondition>;
|
|
4333
4333
|
/**
|
|
4334
4334
|
* Disallow ternary operators when simpler alternatives exist
|
|
4335
4335
|
*
|
|
@@ -4588,7 +4588,8 @@ interface RuleOptions {
|
|
|
4588
4588
|
*/
|
|
4589
4589
|
'node/no-new-require'?: Linter.RuleEntry<[]>;
|
|
4590
4590
|
/**
|
|
4591
|
-
* Disallow string concatenation with `__dirname` and
|
|
4591
|
+
* Disallow string concatenation with `__dirname`, `__filename`, and
|
|
4592
|
+
* `import.meta` paths
|
|
4592
4593
|
*
|
|
4593
4594
|
* @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-path-concat.md
|
|
4594
4595
|
*/
|
|
@@ -4719,12 +4720,24 @@ interface RuleOptions {
|
|
|
4719
4720
|
* @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/url-search-params.md
|
|
4720
4721
|
*/
|
|
4721
4722
|
'node/prefer-global/url-search-params'?: Linter.RuleEntry<NodePreferGlobalUrlSearchParams>;
|
|
4723
|
+
/**
|
|
4724
|
+
* Enforce using `node:assert/strict` instead of `node:assert`.
|
|
4725
|
+
*
|
|
4726
|
+
* @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-import/assert-strict.md
|
|
4727
|
+
*/
|
|
4728
|
+
'node/prefer-import/assert-strict'?: Linter.RuleEntry<[]>;
|
|
4722
4729
|
/**
|
|
4723
4730
|
* Enforce using the `node:` protocol when importing Node.js builtin modules.
|
|
4724
4731
|
*
|
|
4725
4732
|
* @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-node-protocol.md
|
|
4726
4733
|
*/
|
|
4727
4734
|
'node/prefer-node-protocol'?: Linter.RuleEntry<NodePreferNodeProtocol>;
|
|
4735
|
+
/**
|
|
4736
|
+
* Enforce using `process.getBuiltinModule()` to load Node.js built-in modules
|
|
4737
|
+
*
|
|
4738
|
+
* @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-process-get-builtin-module.md
|
|
4739
|
+
*/
|
|
4740
|
+
'node/prefer-process-get-builtin-module'?: Linter.RuleEntry<NodePreferProcessGetBuiltinModule>;
|
|
4728
4741
|
/**
|
|
4729
4742
|
* Enforce `require("dns").promises`
|
|
4730
4743
|
*
|
|
@@ -7577,6 +7590,12 @@ interface RuleOptions {
|
|
|
7577
7590
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-useless-mustaches/
|
|
7578
7591
|
*/
|
|
7579
7592
|
'svelte/no-useless-mustaches'?: Linter.RuleEntry<SvelteNoUselessMustaches>;
|
|
7593
|
+
/**
|
|
7594
|
+
* Require attribute interpolation instead of template literals
|
|
7595
|
+
*
|
|
7596
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/prefer-attribute-interpolation/
|
|
7597
|
+
*/
|
|
7598
|
+
'svelte/prefer-attribute-interpolation'?: Linter.RuleEntry<[]>;
|
|
7580
7599
|
/**
|
|
7581
7600
|
* Require class directives instead of ternary expressions
|
|
7582
7601
|
*
|
|
@@ -9244,501 +9263,519 @@ interface RuleOptions {
|
|
|
9244
9263
|
/**
|
|
9245
9264
|
* Prefer better DOM traversal APIs.
|
|
9246
9265
|
*
|
|
9247
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9266
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/better-dom-traversing.md
|
|
9248
9267
|
*/
|
|
9249
9268
|
'unicorn/better-dom-traversing'?: Linter.RuleEntry<[]>;
|
|
9250
9269
|
/**
|
|
9251
9270
|
* Removed. Prefer `eslint-plugin-regexp`
|
|
9252
9271
|
*
|
|
9253
9272
|
* @deprecated
|
|
9254
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9273
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/deleted-and-deprecated-rules.md#better-regex
|
|
9255
9274
|
*/
|
|
9256
9275
|
'unicorn/better-regex'?: Linter.RuleEntry<[]>;
|
|
9257
9276
|
/**
|
|
9258
9277
|
* Enforce a specific parameter name in catch clauses.
|
|
9259
9278
|
*
|
|
9260
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9279
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/catch-error-name.md
|
|
9261
9280
|
*/
|
|
9262
9281
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
9263
9282
|
/**
|
|
9264
9283
|
* Enforce consistent class references in static methods.
|
|
9265
9284
|
*
|
|
9266
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9285
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/class-reference-in-static-methods.md
|
|
9267
9286
|
*/
|
|
9268
9287
|
'unicorn/class-reference-in-static-methods'?: Linter.RuleEntry<UnicornClassReferenceInStaticMethods>;
|
|
9269
9288
|
/**
|
|
9270
9289
|
* Enforce better comment content.
|
|
9271
9290
|
*
|
|
9272
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9291
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/comment-content.md
|
|
9273
9292
|
*/
|
|
9274
9293
|
'unicorn/comment-content'?: Linter.RuleEntry<UnicornCommentContent>;
|
|
9294
|
+
/**
|
|
9295
|
+
* Enforce a consistent return style for multiline arrow function bodies.
|
|
9296
|
+
*
|
|
9297
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-arrow-return-style.md
|
|
9298
|
+
*/
|
|
9299
|
+
'unicorn/consistent-arrow-return-style'?: Linter.RuleEntry<[]>;
|
|
9275
9300
|
/**
|
|
9276
9301
|
* Enforce consistent assertion style with `node:assert`.
|
|
9277
9302
|
*
|
|
9278
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9303
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-assert.md
|
|
9279
9304
|
*/
|
|
9280
9305
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
9281
9306
|
/**
|
|
9282
9307
|
* Enforce consistent naming for boolean names.
|
|
9283
9308
|
*
|
|
9284
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9309
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-boolean-name.md
|
|
9285
9310
|
*/
|
|
9286
9311
|
'unicorn/consistent-boolean-name'?: Linter.RuleEntry<UnicornConsistentBooleanName>;
|
|
9287
9312
|
/**
|
|
9288
9313
|
* Enforce consistent class member order.
|
|
9289
9314
|
*
|
|
9290
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9315
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-class-member-order.md
|
|
9291
9316
|
*/
|
|
9292
9317
|
'unicorn/consistent-class-member-order'?: Linter.RuleEntry<UnicornConsistentClassMemberOrder>;
|
|
9293
9318
|
/**
|
|
9294
9319
|
* Enforce consistent spelling of compound words in identifiers.
|
|
9295
9320
|
*
|
|
9296
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9321
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-compound-words.md
|
|
9297
9322
|
*/
|
|
9298
9323
|
'unicorn/consistent-compound-words'?: Linter.RuleEntry<UnicornConsistentCompoundWords>;
|
|
9299
9324
|
/**
|
|
9300
9325
|
* Enforce consistent conditional object spread style.
|
|
9301
9326
|
*
|
|
9302
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9327
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-conditional-object-spread.md
|
|
9303
9328
|
*/
|
|
9304
9329
|
'unicorn/consistent-conditional-object-spread'?: Linter.RuleEntry<UnicornConsistentConditionalObjectSpread>;
|
|
9305
9330
|
/**
|
|
9306
9331
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
9307
9332
|
*
|
|
9308
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9333
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-date-clone.md
|
|
9309
9334
|
*/
|
|
9310
9335
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
9311
9336
|
/**
|
|
9312
9337
|
* Use destructured variables over properties.
|
|
9313
9338
|
*
|
|
9314
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9339
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-destructuring.md
|
|
9315
9340
|
*/
|
|
9316
9341
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
9317
9342
|
/**
|
|
9318
9343
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
9319
9344
|
*
|
|
9320
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9345
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-empty-array-spread.md
|
|
9321
9346
|
*/
|
|
9322
9347
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
9323
9348
|
/**
|
|
9324
9349
|
* Enforce consistent style for element existence checks with `indexOf()`,
|
|
9325
9350
|
* `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
9326
9351
|
*
|
|
9327
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9352
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-existence-index-check.md
|
|
9328
9353
|
*/
|
|
9329
9354
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
9330
9355
|
/**
|
|
9331
9356
|
* Enforce consistent decorator position on exported classes.
|
|
9332
9357
|
*
|
|
9333
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9358
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-export-decorator-position.md
|
|
9334
9359
|
*/
|
|
9335
9360
|
'unicorn/consistent-export-decorator-position'?: Linter.RuleEntry<UnicornConsistentExportDecoratorPosition>;
|
|
9336
9361
|
/**
|
|
9337
9362
|
* Move function definitions to the highest possible scope.
|
|
9338
9363
|
*
|
|
9339
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9364
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-function-scoping.md
|
|
9340
9365
|
*/
|
|
9341
9366
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
9342
9367
|
/**
|
|
9343
9368
|
* Enforce function syntax by role.
|
|
9344
9369
|
*
|
|
9345
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9370
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-function-style.md
|
|
9346
9371
|
*/
|
|
9347
9372
|
'unicorn/consistent-function-style'?: Linter.RuleEntry<UnicornConsistentFunctionStyle>;
|
|
9348
9373
|
/**
|
|
9349
9374
|
* Enforce consistent JSON file reads before `JSON.parse()`.
|
|
9350
9375
|
*
|
|
9351
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9376
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-json-file-read.md
|
|
9352
9377
|
*/
|
|
9353
9378
|
'unicorn/consistent-json-file-read'?: Linter.RuleEntry<UnicornConsistentJsonFileRead>;
|
|
9354
9379
|
/**
|
|
9355
9380
|
* Enforce consistent optional chaining for same-base member access.
|
|
9356
9381
|
*
|
|
9357
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9382
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-optional-chaining.md
|
|
9358
9383
|
*/
|
|
9359
9384
|
'unicorn/consistent-optional-chaining'?: Linter.RuleEntry<[]>;
|
|
9360
9385
|
/**
|
|
9361
9386
|
* Enforce consistent style for escaping `${` in template literals.
|
|
9362
9387
|
*
|
|
9363
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9388
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-template-literal-escape.md
|
|
9364
9389
|
*/
|
|
9365
9390
|
'unicorn/consistent-template-literal-escape'?: Linter.RuleEntry<[]>;
|
|
9366
9391
|
/**
|
|
9367
9392
|
* Enforce consistent labels on tuple type elements.
|
|
9368
9393
|
*
|
|
9369
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9394
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/consistent-tuple-labels.md
|
|
9370
9395
|
*/
|
|
9371
9396
|
'unicorn/consistent-tuple-labels'?: Linter.RuleEntry<[]>;
|
|
9372
9397
|
/**
|
|
9373
9398
|
* Enforce correct `Error` subclassing.
|
|
9374
9399
|
*
|
|
9375
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9400
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/custom-error-definition.md
|
|
9376
9401
|
*/
|
|
9377
9402
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
9378
9403
|
/**
|
|
9379
9404
|
* Enforce consistent default export declarations.
|
|
9380
9405
|
*
|
|
9381
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9406
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/default-export-style.md
|
|
9382
9407
|
*/
|
|
9383
9408
|
'unicorn/default-export-style'?: Linter.RuleEntry<UnicornDefaultExportStyle>;
|
|
9384
9409
|
/**
|
|
9385
9410
|
* Enforce consistent style for DOM element dataset access.
|
|
9386
9411
|
*
|
|
9387
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9412
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/dom-node-dataset.md
|
|
9388
9413
|
*/
|
|
9389
9414
|
'unicorn/dom-node-dataset'?: Linter.RuleEntry<UnicornDomNodeDataset>;
|
|
9390
9415
|
/**
|
|
9391
9416
|
* Enforce no spaces between braces.
|
|
9392
9417
|
*
|
|
9393
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9418
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/empty-brace-spaces.md
|
|
9394
9419
|
*/
|
|
9395
9420
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
9396
9421
|
/**
|
|
9397
9422
|
* Enforce passing a `message` value when creating a built-in error.
|
|
9398
9423
|
*
|
|
9399
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9424
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/error-message.md
|
|
9400
9425
|
*/
|
|
9401
9426
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
9402
9427
|
/**
|
|
9403
9428
|
* Require escape sequences to use uppercase or lowercase values.
|
|
9404
9429
|
*
|
|
9405
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9430
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/escape-case.md
|
|
9406
9431
|
*/
|
|
9407
9432
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
9408
9433
|
/**
|
|
9409
9434
|
* Add expiration conditions to TODO comments.
|
|
9410
9435
|
*
|
|
9411
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9436
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/expiring-todo-comments.md
|
|
9412
9437
|
*/
|
|
9413
9438
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
9414
9439
|
/**
|
|
9415
9440
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
9416
9441
|
*
|
|
9417
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9442
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/explicit-length-check.md
|
|
9418
9443
|
*/
|
|
9419
9444
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
9420
9445
|
/**
|
|
9421
9446
|
* Enforce or disallow explicit `delay` argument for `setTimeout()` and
|
|
9422
9447
|
* `setInterval()`.
|
|
9423
9448
|
*
|
|
9424
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9449
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/explicit-timer-delay.md
|
|
9425
9450
|
*/
|
|
9426
9451
|
'unicorn/explicit-timer-delay'?: Linter.RuleEntry<UnicornExplicitTimerDelay>;
|
|
9427
9452
|
/**
|
|
9428
9453
|
* Enforce a case style for filenames and directory names.
|
|
9429
9454
|
*
|
|
9430
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9455
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/filename-case.md
|
|
9431
9456
|
*/
|
|
9432
9457
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
9433
9458
|
/**
|
|
9434
9459
|
* Require identifiers to match a specified regular expression.
|
|
9435
9460
|
*
|
|
9436
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9461
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/id-match.md
|
|
9437
9462
|
*/
|
|
9438
9463
|
'unicorn/id-match'?: Linter.RuleEntry<UnicornIdMatch>;
|
|
9439
9464
|
/**
|
|
9440
9465
|
* Enforce specific import styles per module.
|
|
9441
9466
|
*
|
|
9442
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9467
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/import-style.md
|
|
9443
9468
|
*/
|
|
9444
9469
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
9445
9470
|
/**
|
|
9446
9471
|
* Prevent usage of variables from outside the scope of isolated functions.
|
|
9447
9472
|
*
|
|
9448
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9473
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/isolated-functions.md
|
|
9449
9474
|
*/
|
|
9450
9475
|
'unicorn/isolated-functions'?: Linter.RuleEntry<UnicornIsolatedFunctions>;
|
|
9476
|
+
/**
|
|
9477
|
+
* Enforce a consistent style for optional loop sources.
|
|
9478
|
+
*
|
|
9479
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/iteration-fallback-style.md
|
|
9480
|
+
*/
|
|
9481
|
+
'unicorn/iteration-fallback-style'?: Linter.RuleEntry<UnicornIterationFallbackStyle>;
|
|
9451
9482
|
/**
|
|
9452
9483
|
* Require or disallow logical assignment operator shorthand
|
|
9453
9484
|
*
|
|
9454
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9485
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/logical-assignment-operators.md
|
|
9455
9486
|
*/
|
|
9456
9487
|
'unicorn/logical-assignment-operators'?: Linter.RuleEntry<UnicornLogicalAssignmentOperators>;
|
|
9457
9488
|
/**
|
|
9458
9489
|
* Limit the depth of nested calls.
|
|
9459
9490
|
*
|
|
9460
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9491
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/max-nested-calls.md
|
|
9461
9492
|
*/
|
|
9462
9493
|
'unicorn/max-nested-calls'?: Linter.RuleEntry<UnicornMaxNestedCalls>;
|
|
9463
9494
|
/**
|
|
9464
9495
|
* Enforce replacements for variable, property, and filenames.
|
|
9465
9496
|
*
|
|
9466
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9497
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/name-replacements.md
|
|
9467
9498
|
*/
|
|
9468
9499
|
'unicorn/name-replacements'?: Linter.RuleEntry<UnicornNameReplacements>;
|
|
9469
9500
|
/**
|
|
9470
9501
|
* Enforce correct use of `new` for builtin constructors.
|
|
9471
9502
|
*
|
|
9472
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9503
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/new-for-builtins.md
|
|
9473
9504
|
*/
|
|
9474
9505
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
9475
9506
|
/**
|
|
9476
9507
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
9477
9508
|
*
|
|
9478
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9509
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
9479
9510
|
*/
|
|
9480
9511
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
9481
9512
|
/**
|
|
9482
9513
|
* Disallow recursive access to `this` within getters and setters.
|
|
9483
9514
|
*
|
|
9484
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9515
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-accessor-recursion.md
|
|
9485
9516
|
*/
|
|
9486
9517
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
9487
9518
|
/**
|
|
9488
9519
|
* Disallow bitwise operators where a logical operator was likely intended.
|
|
9489
9520
|
*
|
|
9490
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9521
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-accidental-bitwise-operator.md
|
|
9491
9522
|
*/
|
|
9492
9523
|
'unicorn/no-accidental-bitwise-operator'?: Linter.RuleEntry<[]>;
|
|
9493
9524
|
/**
|
|
9494
9525
|
* Disallow anonymous functions and classes as the default export.
|
|
9495
9526
|
*
|
|
9496
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9527
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-anonymous-default-export.md
|
|
9497
9528
|
*/
|
|
9498
9529
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
9499
9530
|
/**
|
|
9500
9531
|
* Prevent passing a function reference directly to iterator methods.
|
|
9501
9532
|
*
|
|
9502
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9533
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-callback-reference.md
|
|
9503
9534
|
*/
|
|
9504
9535
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<UnicornNoArrayCallbackReference>;
|
|
9505
9536
|
/**
|
|
9506
9537
|
* Disallow array accumulation with `Array#concat()` in loops.
|
|
9507
9538
|
*
|
|
9508
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9539
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-concat-in-loop.md
|
|
9509
9540
|
*/
|
|
9510
9541
|
'unicorn/no-array-concat-in-loop'?: Linter.RuleEntry<[]>;
|
|
9511
9542
|
/**
|
|
9512
9543
|
* Disallow using reference values as `Array#fill()` values.
|
|
9513
9544
|
*
|
|
9514
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9545
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-fill-with-reference-type.md
|
|
9515
9546
|
*/
|
|
9516
9547
|
'unicorn/no-array-fill-with-reference-type'?: Linter.RuleEntry<[]>;
|
|
9517
9548
|
/**
|
|
9518
9549
|
* Disallow `.fill()` after `Array.from({length: …})`.
|
|
9519
9550
|
*
|
|
9520
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9551
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-from-fill.md
|
|
9521
9552
|
*/
|
|
9522
9553
|
'unicorn/no-array-from-fill'?: Linter.RuleEntry<[]>;
|
|
9523
9554
|
/**
|
|
9524
9555
|
* Disallow front-of-array mutation.
|
|
9525
9556
|
*
|
|
9526
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9557
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-front-mutation.md
|
|
9527
9558
|
*/
|
|
9528
9559
|
'unicorn/no-array-front-mutation'?: Linter.RuleEntry<[]>;
|
|
9529
9560
|
/**
|
|
9530
9561
|
* Disallow using the `this` argument in array methods.
|
|
9531
9562
|
*
|
|
9532
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9563
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-method-this-argument.md
|
|
9533
9564
|
*/
|
|
9534
9565
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
9535
9566
|
/**
|
|
9536
9567
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
9537
9568
|
*
|
|
9538
9569
|
* @deprecated
|
|
9539
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9570
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/deleted-and-deprecated-rules.md#no-array-push-push
|
|
9540
9571
|
*/
|
|
9541
9572
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
9542
9573
|
/**
|
|
9543
9574
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
9544
9575
|
*
|
|
9545
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9576
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-reduce.md
|
|
9546
9577
|
*/
|
|
9547
9578
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
9548
9579
|
/**
|
|
9549
9580
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
9550
9581
|
*
|
|
9551
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9582
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-reverse.md
|
|
9552
9583
|
*/
|
|
9553
9584
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
9554
9585
|
/**
|
|
9555
9586
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
9556
9587
|
*
|
|
9557
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9588
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-sort.md
|
|
9558
9589
|
*/
|
|
9559
9590
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
9560
9591
|
/**
|
|
9561
9592
|
* Disallow sorting arrays to get the minimum or maximum value.
|
|
9562
9593
|
*
|
|
9563
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9594
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-sort-for-min-max.md
|
|
9564
9595
|
*/
|
|
9565
9596
|
'unicorn/no-array-sort-for-min-max'?: Linter.RuleEntry<[]>;
|
|
9566
9597
|
/**
|
|
9567
9598
|
* Prefer `Array#toSpliced()` over `Array#splice()`.
|
|
9568
9599
|
*
|
|
9569
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9600
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-array-splice.md
|
|
9570
9601
|
*/
|
|
9571
9602
|
'unicorn/no-array-splice'?: Linter.RuleEntry<[]>;
|
|
9572
9603
|
/**
|
|
9573
9604
|
* Disallow asterisk prefixes in documentation comments.
|
|
9574
9605
|
*
|
|
9575
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9606
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-asterisk-prefix-in-documentation-comments.md
|
|
9576
9607
|
*/
|
|
9577
9608
|
'unicorn/no-asterisk-prefix-in-documentation-comments'?: Linter.RuleEntry<[]>;
|
|
9578
9609
|
/**
|
|
9579
9610
|
* Disallow async functions as `Promise#finally()` callbacks.
|
|
9580
9611
|
*
|
|
9581
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9612
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-async-promise-finally.md
|
|
9582
9613
|
*/
|
|
9583
9614
|
'unicorn/no-async-promise-finally'?: Linter.RuleEntry<[]>;
|
|
9584
9615
|
/**
|
|
9585
9616
|
* Disallow member access from await expression.
|
|
9586
9617
|
*
|
|
9587
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9618
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-await-expression-member.md
|
|
9588
9619
|
*/
|
|
9589
9620
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
9590
9621
|
/**
|
|
9591
9622
|
* Disallow using `await` in `Promise` method parameters.
|
|
9592
9623
|
*
|
|
9593
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9624
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-await-in-promise-methods.md
|
|
9594
9625
|
*/
|
|
9595
9626
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
9627
|
+
/**
|
|
9628
|
+
* Disallow barrel files.
|
|
9629
|
+
*
|
|
9630
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-barrel-files.md
|
|
9631
|
+
*/
|
|
9632
|
+
'unicorn/no-barrel-files'?: Linter.RuleEntry<[]>;
|
|
9596
9633
|
/**
|
|
9597
9634
|
* Disallow unnecessary `Blob` to `File` conversion.
|
|
9598
9635
|
*
|
|
9599
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9636
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-blob-to-file.md
|
|
9600
9637
|
*/
|
|
9601
9638
|
'unicorn/no-blob-to-file'?: Linter.RuleEntry<[]>;
|
|
9602
9639
|
/**
|
|
9603
9640
|
* Disallow boolean-returning sort comparators.
|
|
9604
9641
|
*
|
|
9605
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9642
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-boolean-sort-comparator.md
|
|
9606
9643
|
*/
|
|
9607
9644
|
'unicorn/no-boolean-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
9608
9645
|
/**
|
|
9609
9646
|
* Disallow `break` and `continue` in nested loops and switches inside loops.
|
|
9610
9647
|
*
|
|
9611
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9648
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-break-in-nested-loop.md
|
|
9612
9649
|
*/
|
|
9613
9650
|
'unicorn/no-break-in-nested-loop'?: Linter.RuleEntry<[]>;
|
|
9614
9651
|
/**
|
|
9615
9652
|
* Prefer drawing canvases directly instead of converting them to images.
|
|
9616
9653
|
*
|
|
9617
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9654
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-canvas-to-image.md
|
|
9618
9655
|
*/
|
|
9619
9656
|
'unicorn/no-canvas-to-image'?: Linter.RuleEntry<[]>;
|
|
9620
9657
|
/**
|
|
9621
9658
|
* Disallow chained comparisons such as `a < b < c`.
|
|
9622
9659
|
*
|
|
9623
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9660
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-chained-comparison.md
|
|
9624
9661
|
*/
|
|
9625
9662
|
'unicorn/no-chained-comparison'?: Linter.RuleEntry<[]>;
|
|
9626
9663
|
/**
|
|
9627
9664
|
* Disallow accessing `Map`, `Set`, `WeakMap`, and `WeakSet` entries with
|
|
9628
9665
|
* bracket notation.
|
|
9629
9666
|
*
|
|
9630
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9667
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-collection-bracket-access.md
|
|
9631
9668
|
*/
|
|
9632
9669
|
'unicorn/no-collection-bracket-access'?: Linter.RuleEntry<[]>;
|
|
9633
9670
|
/**
|
|
9634
9671
|
* Disallow dynamic object property existence checks.
|
|
9635
9672
|
*
|
|
9636
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9673
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-computed-property-existence-check.md
|
|
9637
9674
|
*/
|
|
9638
9675
|
'unicorn/no-computed-property-existence-check'?: Linter.RuleEntry<[]>;
|
|
9639
9676
|
/**
|
|
9640
9677
|
* Disallow confusing uses of `Array#{splice,toSpliced}()`.
|
|
9641
9678
|
*
|
|
9642
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9679
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-confusing-array-splice.md
|
|
9643
9680
|
*/
|
|
9644
9681
|
'unicorn/no-confusing-array-splice'?: Linter.RuleEntry<[]>;
|
|
9645
9682
|
/**
|
|
9646
9683
|
* Disallow confusing uses of `Array#with()`.
|
|
9647
9684
|
*
|
|
9648
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9685
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-confusing-array-with.md
|
|
9649
9686
|
*/
|
|
9650
9687
|
'unicorn/no-confusing-array-with'?: Linter.RuleEntry<[]>;
|
|
9651
9688
|
/**
|
|
9652
9689
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
9653
9690
|
*
|
|
9654
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9691
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-console-spaces.md
|
|
9655
9692
|
*/
|
|
9656
9693
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
9657
9694
|
/**
|
|
9658
9695
|
* Disallow arithmetic and bitwise operations that always evaluate to `0`.
|
|
9659
9696
|
*
|
|
9660
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9697
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-constant-zero-expression.md
|
|
9661
9698
|
*/
|
|
9662
9699
|
'unicorn/no-constant-zero-expression'?: Linter.RuleEntry<[]>;
|
|
9663
9700
|
/**
|
|
9664
9701
|
* Disallow declarations before conditional early exits when they are only
|
|
9665
9702
|
* used after the exit.
|
|
9666
9703
|
*
|
|
9667
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9704
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-declarations-before-early-exit.md
|
|
9668
9705
|
*/
|
|
9669
9706
|
'unicorn/no-declarations-before-early-exit'?: Linter.RuleEntry<[]>;
|
|
9670
9707
|
/**
|
|
9671
9708
|
* Do not use `document.cookie` directly.
|
|
9672
9709
|
*
|
|
9673
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9710
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-document-cookie.md
|
|
9674
9711
|
*/
|
|
9675
9712
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
9676
9713
|
/**
|
|
9677
9714
|
* Disallow two comparisons of the same operands that can be combined into
|
|
9678
9715
|
* one.
|
|
9679
9716
|
*
|
|
9680
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9717
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-double-comparison.md
|
|
9681
9718
|
*/
|
|
9682
9719
|
'unicorn/no-double-comparison'?: Linter.RuleEntry<[]>;
|
|
9683
9720
|
/**
|
|
9684
9721
|
* Disallow duplicate adjacent branches in if chains.
|
|
9685
9722
|
*
|
|
9686
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9723
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-duplicate-if-branches.md
|
|
9687
9724
|
*/
|
|
9688
9725
|
'unicorn/no-duplicate-if-branches'?: Linter.RuleEntry<[]>;
|
|
9689
9726
|
/**
|
|
9690
9727
|
* Disallow adjacent duplicate operands in logical expressions.
|
|
9691
9728
|
*
|
|
9692
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9729
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-duplicate-logical-operands.md
|
|
9693
9730
|
*/
|
|
9694
9731
|
'unicorn/no-duplicate-logical-operands'?: Linter.RuleEntry<[]>;
|
|
9695
9732
|
/**
|
|
9696
9733
|
* Disallow `.map()` and `.filter()` in `for…of` and `for await…of` loop
|
|
9697
9734
|
* headers.
|
|
9698
9735
|
*
|
|
9699
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9736
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-duplicate-loops.md
|
|
9700
9737
|
*/
|
|
9701
9738
|
'unicorn/no-duplicate-loops'?: Linter.RuleEntry<[]>;
|
|
9702
9739
|
/**
|
|
9703
9740
|
* Disallow duplicate values in `Set` constructor array literals.
|
|
9704
9741
|
*
|
|
9705
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9742
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-duplicate-set-values.md
|
|
9706
9743
|
*/
|
|
9707
9744
|
'unicorn/no-duplicate-set-values'?: Linter.RuleEntry<[]>;
|
|
9708
9745
|
/**
|
|
9709
9746
|
* Disallow empty files.
|
|
9710
9747
|
*
|
|
9711
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9748
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-empty-file.md
|
|
9712
9749
|
*/
|
|
9713
9750
|
'unicorn/no-empty-file'?: Linter.RuleEntry<UnicornNoEmptyFile>;
|
|
9714
9751
|
/**
|
|
9715
9752
|
* Disallow assigning to built-in error properties.
|
|
9716
9753
|
*
|
|
9717
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9754
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-error-property-assignment.md
|
|
9718
9755
|
*/
|
|
9719
9756
|
'unicorn/no-error-property-assignment'?: Linter.RuleEntry<[]>;
|
|
9720
9757
|
/**
|
|
9721
9758
|
* Disallow exports in scripts.
|
|
9722
9759
|
*
|
|
9723
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9760
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-exports-in-scripts.md
|
|
9724
9761
|
*/
|
|
9725
9762
|
'unicorn/no-exports-in-scripts'?: Linter.RuleEntry<[]>;
|
|
9726
9763
|
/**
|
|
9727
9764
|
* Prefer `for…of` over the `forEach` method.
|
|
9728
9765
|
*
|
|
9729
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9766
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-for-each.md
|
|
9730
9767
|
*/
|
|
9731
9768
|
'unicorn/no-for-each'?: Linter.RuleEntry<[]>;
|
|
9732
9769
|
/**
|
|
9733
9770
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
9734
9771
|
*
|
|
9735
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9772
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-for-loop.md
|
|
9736
9773
|
*/
|
|
9737
9774
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
9738
9775
|
/**
|
|
9739
9776
|
* Disallow assigning properties on the global object.
|
|
9740
9777
|
*
|
|
9741
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9778
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-global-object-property-assignment.md
|
|
9742
9779
|
*/
|
|
9743
9780
|
'unicorn/no-global-object-property-assignment'?: Linter.RuleEntry<[]>;
|
|
9744
9781
|
/**
|
|
@@ -9746,1622 +9783,1635 @@ interface RuleOptions {
|
|
|
9746
9783
|
* cases.
|
|
9747
9784
|
*
|
|
9748
9785
|
* @deprecated
|
|
9749
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9786
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/deleted-and-deprecated-rules.md#no-hex-escape
|
|
9750
9787
|
*/
|
|
9751
9788
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
9752
9789
|
/**
|
|
9753
9790
|
* Disallow immediate mutation after variable assignment.
|
|
9754
9791
|
*
|
|
9755
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9792
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-immediate-mutation.md
|
|
9756
9793
|
*/
|
|
9757
9794
|
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]>;
|
|
9758
9795
|
/**
|
|
9759
9796
|
* Disallow impossible comparisons against `.length` or `.size`.
|
|
9760
9797
|
*
|
|
9761
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9798
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-impossible-length-comparison.md
|
|
9762
9799
|
*/
|
|
9763
9800
|
'unicorn/no-impossible-length-comparison'?: Linter.RuleEntry<[]>;
|
|
9764
9801
|
/**
|
|
9765
9802
|
* Disallow incorrect `querySelector()` and `querySelectorAll()` usage.
|
|
9766
9803
|
*
|
|
9767
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9804
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-incorrect-query-selector.md
|
|
9768
9805
|
*/
|
|
9769
9806
|
'unicorn/no-incorrect-query-selector'?: Linter.RuleEntry<[]>;
|
|
9770
9807
|
/**
|
|
9771
9808
|
* Disallow incorrect template literal interpolation syntax.
|
|
9772
9809
|
*
|
|
9773
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9810
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-incorrect-template-string-interpolation.md
|
|
9774
9811
|
*/
|
|
9775
9812
|
'unicorn/no-incorrect-template-string-interpolation'?: Linter.RuleEntry<[]>;
|
|
9776
9813
|
/**
|
|
9777
9814
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
9778
9815
|
*
|
|
9779
9816
|
* @deprecated
|
|
9780
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9817
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array
|
|
9781
9818
|
*/
|
|
9782
9819
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
9783
9820
|
/**
|
|
9784
9821
|
* Disallow `instanceof` with built-in objects
|
|
9785
9822
|
*
|
|
9786
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9823
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-instanceof-builtins.md
|
|
9787
9824
|
*/
|
|
9788
9825
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
9789
9826
|
/**
|
|
9790
9827
|
* Disallow calling functions and constructors with an invalid number of
|
|
9791
9828
|
* arguments.
|
|
9792
9829
|
*
|
|
9793
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9830
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-invalid-argument-count.md
|
|
9794
9831
|
*/
|
|
9795
9832
|
'unicorn/no-invalid-argument-count'?: Linter.RuleEntry<UnicornNoInvalidArgumentCount>;
|
|
9796
9833
|
/**
|
|
9797
9834
|
* Disallow comparing a single character from a string to a multi-character
|
|
9798
9835
|
* string.
|
|
9799
9836
|
*
|
|
9800
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9837
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-invalid-character-comparison.md
|
|
9801
9838
|
*/
|
|
9802
9839
|
'unicorn/no-invalid-character-comparison'?: Linter.RuleEntry<[]>;
|
|
9803
9840
|
/**
|
|
9804
9841
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
9805
9842
|
*
|
|
9806
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9843
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-invalid-fetch-options.md
|
|
9807
9844
|
*/
|
|
9808
9845
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
9809
9846
|
/**
|
|
9810
9847
|
* Disallow invalid `accept` values on file inputs.
|
|
9811
9848
|
*
|
|
9812
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9849
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-invalid-file-input-accept.md
|
|
9813
9850
|
*/
|
|
9814
9851
|
'unicorn/no-invalid-file-input-accept'?: Linter.RuleEntry<[]>;
|
|
9815
9852
|
/**
|
|
9816
9853
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an
|
|
9817
9854
|
* expression.
|
|
9818
9855
|
*
|
|
9819
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9856
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
9820
9857
|
*/
|
|
9821
9858
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
9822
9859
|
/**
|
|
9823
9860
|
* Disallow invalid implementations of well-known symbol methods.
|
|
9824
9861
|
*
|
|
9825
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9862
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-invalid-well-known-symbol-methods.md
|
|
9826
9863
|
*/
|
|
9827
9864
|
'unicorn/no-invalid-well-known-symbol-methods'?: Linter.RuleEntry<[]>;
|
|
9828
9865
|
/**
|
|
9829
9866
|
* Disallow identifiers starting with `new` or `class`.
|
|
9830
9867
|
*
|
|
9831
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9868
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-keyword-prefix.md
|
|
9832
9869
|
*/
|
|
9833
9870
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
9834
9871
|
/**
|
|
9835
9872
|
* Disallow accessing `event.currentTarget` after the synchronous event
|
|
9836
9873
|
* dispatch has finished.
|
|
9837
9874
|
*
|
|
9838
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9875
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-late-current-target-access.md
|
|
9839
9876
|
*/
|
|
9840
9877
|
'unicorn/no-late-current-target-access'?: Linter.RuleEntry<[]>;
|
|
9841
9878
|
/**
|
|
9842
9879
|
* Disallow event-control method calls after the synchronous event dispatch
|
|
9843
9880
|
* has finished.
|
|
9844
9881
|
*
|
|
9845
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9882
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-late-event-control.md
|
|
9846
9883
|
*/
|
|
9847
9884
|
'unicorn/no-late-event-control'?: Linter.RuleEntry<[]>;
|
|
9848
9885
|
/**
|
|
9849
9886
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
9850
9887
|
*
|
|
9851
9888
|
* @deprecated
|
|
9852
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9889
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
|
|
9853
9890
|
*/
|
|
9854
9891
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
9855
9892
|
/**
|
|
9856
9893
|
* Disallow `if` statements as the only statement in `if` blocks without
|
|
9857
9894
|
* `else`.
|
|
9858
9895
|
*
|
|
9859
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9896
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-lonely-if.md
|
|
9860
9897
|
*/
|
|
9861
9898
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
9862
9899
|
/**
|
|
9863
9900
|
* Disallow mutating a loop iterable during iteration.
|
|
9864
9901
|
*
|
|
9865
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9902
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-loop-iterable-mutation.md
|
|
9866
9903
|
*/
|
|
9867
9904
|
'unicorn/no-loop-iterable-mutation'?: Linter.RuleEntry<[]>;
|
|
9868
9905
|
/**
|
|
9869
9906
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
9870
9907
|
*
|
|
9871
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9908
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
9872
9909
|
*/
|
|
9873
9910
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
9874
9911
|
/**
|
|
9875
9912
|
* Disallow manually wrapped comments.
|
|
9876
9913
|
*
|
|
9877
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9914
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-manually-wrapped-comments.md
|
|
9878
9915
|
*/
|
|
9879
9916
|
'unicorn/no-manually-wrapped-comments'?: Linter.RuleEntry<[]>;
|
|
9880
9917
|
/**
|
|
9881
9918
|
* Disallow checking a Map key before accessing a different key.
|
|
9882
9919
|
*
|
|
9883
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9920
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-mismatched-map-key.md
|
|
9884
9921
|
*/
|
|
9885
9922
|
'unicorn/no-mismatched-map-key'?: Linter.RuleEntry<[]>;
|
|
9886
9923
|
/**
|
|
9887
9924
|
* Disallow misrefactored compound assignments where the target is duplicated
|
|
9888
9925
|
* in the right-hand side.
|
|
9889
9926
|
*
|
|
9890
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9927
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-misrefactored-assignment.md
|
|
9891
9928
|
*/
|
|
9892
9929
|
'unicorn/no-misrefactored-assignment'?: Linter.RuleEntry<[]>;
|
|
9893
9930
|
/**
|
|
9894
9931
|
* Disallow references to missing local resources.
|
|
9895
9932
|
*
|
|
9896
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9933
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-missing-local-resource.md
|
|
9897
9934
|
*/
|
|
9898
9935
|
'unicorn/no-missing-local-resource'?: Linter.RuleEntry<[]>;
|
|
9899
9936
|
/**
|
|
9900
9937
|
* Disallow calling Promise executor resolver functions more than once on the
|
|
9901
9938
|
* same execution path.
|
|
9902
9939
|
*
|
|
9903
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9940
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-multiple-promise-resolver-calls.md
|
|
9904
9941
|
*/
|
|
9905
9942
|
'unicorn/no-multiple-promise-resolver-calls'?: Linter.RuleEntry<[]>;
|
|
9906
9943
|
/**
|
|
9907
9944
|
* Disallow named usage of default import and export.
|
|
9908
9945
|
*
|
|
9909
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9946
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-named-default.md
|
|
9910
9947
|
*/
|
|
9911
9948
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
9912
9949
|
/**
|
|
9913
9950
|
* Disallow negated array predicate calls.
|
|
9914
9951
|
*
|
|
9915
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9952
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-negated-array-predicate.md
|
|
9916
9953
|
*/
|
|
9917
9954
|
'unicorn/no-negated-array-predicate'?: Linter.RuleEntry<[]>;
|
|
9918
9955
|
/**
|
|
9919
9956
|
* Disallow negated comparisons.
|
|
9920
9957
|
*
|
|
9921
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9958
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-negated-comparison.md
|
|
9922
9959
|
*/
|
|
9923
9960
|
'unicorn/no-negated-comparison'?: Linter.RuleEntry<UnicornNoNegatedComparison>;
|
|
9924
9961
|
/**
|
|
9925
9962
|
* Disallow negated conditions.
|
|
9926
9963
|
*
|
|
9927
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9964
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-negated-condition.md
|
|
9928
9965
|
*/
|
|
9929
9966
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
9930
9967
|
/**
|
|
9931
9968
|
* Disallow negated expression in equality check.
|
|
9932
9969
|
*
|
|
9933
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9970
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-negation-in-equality-check.md
|
|
9934
9971
|
*/
|
|
9935
9972
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
9936
9973
|
/**
|
|
9937
9974
|
* Disallow nested ternary expressions.
|
|
9938
9975
|
*
|
|
9939
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9976
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-nested-ternary.md
|
|
9940
9977
|
*/
|
|
9941
9978
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
9942
9979
|
/**
|
|
9943
9980
|
* Disallow `new Array()`.
|
|
9944
9981
|
*
|
|
9945
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9982
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-new-array.md
|
|
9946
9983
|
*/
|
|
9947
9984
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
9948
9985
|
/**
|
|
9949
9986
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the
|
|
9950
9987
|
* deprecated `new Buffer()`.
|
|
9951
9988
|
*
|
|
9952
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9989
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-new-buffer.md
|
|
9953
9990
|
*/
|
|
9954
9991
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
9955
9992
|
/**
|
|
9956
9993
|
* Disallow non-function values with function-style verb prefixes.
|
|
9957
9994
|
*
|
|
9958
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9995
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-non-function-verb-prefix.md
|
|
9959
9996
|
*/
|
|
9960
9997
|
'unicorn/no-non-function-verb-prefix'?: Linter.RuleEntry<UnicornNoNonFunctionVerbPrefix>;
|
|
9961
9998
|
/**
|
|
9962
9999
|
* Disallow non-standard properties on built-in objects.
|
|
9963
10000
|
*
|
|
9964
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10001
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-nonstandard-builtin-properties.md
|
|
9965
10002
|
*/
|
|
9966
10003
|
'unicorn/no-nonstandard-builtin-properties'?: Linter.RuleEntry<[]>;
|
|
9967
10004
|
/**
|
|
9968
10005
|
* Disallow the use of the `null` literal.
|
|
9969
10006
|
*
|
|
9970
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10007
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-null.md
|
|
9971
10008
|
*/
|
|
9972
10009
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
9973
10010
|
/**
|
|
9974
10011
|
* Disallow the use of objects as default parameters.
|
|
9975
10012
|
*
|
|
9976
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10013
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-object-as-default-parameter.md
|
|
9977
10014
|
*/
|
|
9978
10015
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
9979
10016
|
/**
|
|
9980
10017
|
* Disallow `Object` methods with `Map` or `Set`.
|
|
9981
10018
|
*
|
|
9982
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10019
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-object-methods-with-collections.md
|
|
9983
10020
|
*/
|
|
9984
10021
|
'unicorn/no-object-methods-with-collections'?: Linter.RuleEntry<[]>;
|
|
9985
10022
|
/**
|
|
9986
10023
|
* Disallow optional chaining on undeclared variables.
|
|
9987
10024
|
*
|
|
9988
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10025
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-optional-chaining-on-undeclared-variable.md
|
|
9989
10026
|
*/
|
|
9990
10027
|
'unicorn/no-optional-chaining-on-undeclared-variable'?: Linter.RuleEntry<[]>;
|
|
9991
10028
|
/**
|
|
9992
10029
|
* Disallow `process.exit()`.
|
|
9993
10030
|
*
|
|
9994
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10031
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-process-exit.md
|
|
9995
10032
|
*/
|
|
9996
10033
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
9997
10034
|
/**
|
|
9998
10035
|
* Disallow comparisons made redundant by an equality check in the same
|
|
9999
10036
|
* logical AND.
|
|
10000
10037
|
*
|
|
10001
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10038
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-redundant-comparison.md
|
|
10002
10039
|
*/
|
|
10003
10040
|
'unicorn/no-redundant-comparison'?: Linter.RuleEntry<[]>;
|
|
10004
10041
|
/**
|
|
10005
10042
|
* Disallow using the return value of `Array#push()` and `Array#unshift()`.
|
|
10006
10043
|
*
|
|
10007
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10044
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-return-array-push.md
|
|
10008
10045
|
*/
|
|
10009
10046
|
'unicorn/no-return-array-push'?: Linter.RuleEntry<[]>;
|
|
10010
10047
|
/**
|
|
10011
10048
|
* Disallow selector syntax in DOM names.
|
|
10012
10049
|
*
|
|
10013
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10050
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-selector-as-dom-name.md
|
|
10014
10051
|
*/
|
|
10015
10052
|
'unicorn/no-selector-as-dom-name'?: Linter.RuleEntry<[]>;
|
|
10016
10053
|
/**
|
|
10017
10054
|
* Disallow shorthand properties that override related longhand properties.
|
|
10018
10055
|
*
|
|
10019
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10056
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-shorthand-property-overrides.md
|
|
10020
10057
|
*/
|
|
10021
10058
|
'unicorn/no-shorthand-property-overrides'?: Linter.RuleEntry<[]>;
|
|
10022
10059
|
/**
|
|
10023
10060
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
10024
10061
|
*
|
|
10025
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10062
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
10026
10063
|
*/
|
|
10027
10064
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
10028
10065
|
/**
|
|
10029
10066
|
* Disallow classes that only have static members.
|
|
10030
10067
|
*
|
|
10031
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10068
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-static-only-class.md
|
|
10032
10069
|
*/
|
|
10033
10070
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
10034
10071
|
/**
|
|
10035
10072
|
* Prefer comparing values directly over subtracting and comparing to `0`.
|
|
10036
10073
|
*
|
|
10037
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10074
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-subtraction-comparison.md
|
|
10038
10075
|
*/
|
|
10039
10076
|
'unicorn/no-subtraction-comparison'?: Linter.RuleEntry<[]>;
|
|
10040
10077
|
/**
|
|
10041
10078
|
* Disallow `then` property.
|
|
10042
10079
|
*
|
|
10043
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10080
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-thenable.md
|
|
10044
10081
|
*/
|
|
10045
10082
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
10046
10083
|
/**
|
|
10047
10084
|
* Disallow assigning `this` to a variable.
|
|
10048
10085
|
*
|
|
10049
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10086
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-this-assignment.md
|
|
10050
10087
|
*/
|
|
10051
10088
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
10052
10089
|
/**
|
|
10053
10090
|
* Disallow `this` outside of classes.
|
|
10054
10091
|
*
|
|
10055
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10092
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-this-outside-of-class.md
|
|
10056
10093
|
*/
|
|
10057
10094
|
'unicorn/no-this-outside-of-class'?: Linter.RuleEntry<[]>;
|
|
10058
10095
|
/**
|
|
10059
10096
|
* Disallow assigning to top-level variables from inside functions.
|
|
10060
10097
|
*
|
|
10061
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10098
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-top-level-assignment-in-function.md
|
|
10062
10099
|
*/
|
|
10063
10100
|
'unicorn/no-top-level-assignment-in-function'?: Linter.RuleEntry<[]>;
|
|
10064
10101
|
/**
|
|
10065
10102
|
* Disallow top-level side effects in exported modules.
|
|
10066
10103
|
*
|
|
10067
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10104
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-top-level-side-effects.md
|
|
10068
10105
|
*/
|
|
10069
10106
|
'unicorn/no-top-level-side-effects'?: Linter.RuleEntry<[]>;
|
|
10070
10107
|
/**
|
|
10071
10108
|
* Disallow `all` as a transition property.
|
|
10072
10109
|
*
|
|
10073
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10110
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-transition-all.md
|
|
10074
10111
|
*/
|
|
10075
10112
|
'unicorn/no-transition-all'?: Linter.RuleEntry<[]>;
|
|
10076
10113
|
/**
|
|
10077
10114
|
* Disallow comparing `undefined` using `typeof`.
|
|
10078
10115
|
*
|
|
10079
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10116
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-typeof-undefined.md
|
|
10080
10117
|
*/
|
|
10081
10118
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
10082
10119
|
/**
|
|
10083
10120
|
* Disallow referencing methods without calling them.
|
|
10084
10121
|
*
|
|
10085
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10122
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-uncalled-method.md
|
|
10086
10123
|
*/
|
|
10087
10124
|
'unicorn/no-uncalled-method'?: Linter.RuleEntry<[]>;
|
|
10088
10125
|
/**
|
|
10089
10126
|
* Require class members to be declared.
|
|
10090
10127
|
*
|
|
10091
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10128
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-undeclared-class-members.md
|
|
10092
10129
|
*/
|
|
10093
10130
|
'unicorn/no-undeclared-class-members'?: Linter.RuleEntry<[]>;
|
|
10094
10131
|
/**
|
|
10095
10132
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
10096
10133
|
*
|
|
10097
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10134
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
10098
10135
|
*/
|
|
10099
10136
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
10100
10137
|
/**
|
|
10101
10138
|
* Disallow `Array#flatMap()` callbacks that only wrap a single item.
|
|
10102
10139
|
*
|
|
10103
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10140
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-array-flat-map.md
|
|
10104
10141
|
*/
|
|
10105
10142
|
'unicorn/no-unnecessary-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
10106
10143
|
/**
|
|
10107
10144
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount`
|
|
10108
10145
|
* argument of `Array#{splice,toSpliced}()`.
|
|
10109
10146
|
*
|
|
10110
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10147
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
10111
10148
|
*/
|
|
10112
10149
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
10113
10150
|
/**
|
|
10114
10151
|
* Disallow awaiting non-promise values.
|
|
10115
10152
|
*
|
|
10116
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10153
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-await.md
|
|
10117
10154
|
*/
|
|
10118
10155
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
10119
10156
|
/**
|
|
10120
10157
|
* Disallow unnecessary comparisons against boolean literals.
|
|
10121
10158
|
*
|
|
10122
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10159
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-boolean-comparison.md
|
|
10123
10160
|
*/
|
|
10124
10161
|
'unicorn/no-unnecessary-boolean-comparison'?: Linter.RuleEntry<[]>;
|
|
10125
10162
|
/**
|
|
10126
10163
|
* Disallow unnecessary options in `fetch()` and `new Request()`.
|
|
10127
10164
|
*
|
|
10128
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10165
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-fetch-options.md
|
|
10129
10166
|
*/
|
|
10130
10167
|
'unicorn/no-unnecessary-fetch-options'?: Linter.RuleEntry<[]>;
|
|
10131
10168
|
/**
|
|
10132
10169
|
* Disallow unnecessary `globalThis` references.
|
|
10133
10170
|
*
|
|
10134
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10171
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-global-this.md
|
|
10135
10172
|
*/
|
|
10136
10173
|
'unicorn/no-unnecessary-global-this'?: Linter.RuleEntry<[]>;
|
|
10137
10174
|
/**
|
|
10138
10175
|
* Disallow unnecessary nested ternary expressions.
|
|
10139
10176
|
*
|
|
10140
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10177
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-nested-ternary.md
|
|
10141
10178
|
*/
|
|
10142
10179
|
'unicorn/no-unnecessary-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
10143
10180
|
/**
|
|
10144
10181
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
10145
10182
|
*
|
|
10146
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10183
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
10147
10184
|
*/
|
|
10148
10185
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
10149
10186
|
/**
|
|
10150
10187
|
* Disallow using `.length` or `Infinity` as the `end` argument of
|
|
10151
10188
|
* `{Array,String,TypedArray}#slice()`.
|
|
10152
10189
|
*
|
|
10153
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10190
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
10154
10191
|
*/
|
|
10155
10192
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
10156
10193
|
/**
|
|
10157
10194
|
* Disallow `Array#splice()` when simpler alternatives exist.
|
|
10158
10195
|
*
|
|
10159
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10196
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-splice.md
|
|
10160
10197
|
*/
|
|
10161
10198
|
'unicorn/no-unnecessary-splice'?: Linter.RuleEntry<[]>;
|
|
10162
10199
|
/**
|
|
10163
10200
|
* Disallow `String#trim()` before `String#startsWith()` or
|
|
10164
10201
|
* `String#endsWith()`.
|
|
10165
10202
|
*
|
|
10166
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10203
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unnecessary-string-trim.md
|
|
10167
10204
|
*/
|
|
10168
10205
|
'unicorn/no-unnecessary-string-trim'?: Linter.RuleEntry<[]>;
|
|
10169
10206
|
/**
|
|
10170
10207
|
* Disallow unreadable array destructuring.
|
|
10171
10208
|
*
|
|
10172
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10209
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
10173
10210
|
*/
|
|
10174
10211
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<UnicornNoUnreadableArrayDestructuring>;
|
|
10175
10212
|
/**
|
|
10176
10213
|
* Disallow unreadable iterable expressions in `for…of` and `for await…of`
|
|
10177
10214
|
* loop headers.
|
|
10178
10215
|
*
|
|
10179
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10216
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unreadable-for-of-expression.md
|
|
10180
10217
|
*/
|
|
10181
10218
|
'unicorn/no-unreadable-for-of-expression'?: Linter.RuleEntry<[]>;
|
|
10182
10219
|
/**
|
|
10183
10220
|
* Disallow unreadable IIFEs.
|
|
10184
10221
|
*
|
|
10185
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10222
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unreadable-iife.md
|
|
10186
10223
|
*/
|
|
10187
10224
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
10188
10225
|
/**
|
|
10189
10226
|
* Disallow unreadable `new` expressions.
|
|
10190
10227
|
*
|
|
10191
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10228
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unreadable-new-expression.md
|
|
10192
10229
|
*/
|
|
10193
10230
|
'unicorn/no-unreadable-new-expression'?: Linter.RuleEntry<[]>;
|
|
10194
10231
|
/**
|
|
10195
10232
|
* Disallow unreadable object destructuring.
|
|
10196
10233
|
*
|
|
10197
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10234
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unreadable-object-destructuring.md
|
|
10198
10235
|
*/
|
|
10199
10236
|
'unicorn/no-unreadable-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
10200
10237
|
/**
|
|
10201
10238
|
* Prevent unsafe use of ArrayBuffer view `.buffer`.
|
|
10202
10239
|
*
|
|
10203
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10240
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unsafe-buffer-conversion.md
|
|
10204
10241
|
*/
|
|
10205
10242
|
'unicorn/no-unsafe-buffer-conversion'?: Linter.RuleEntry<[]>;
|
|
10206
10243
|
/**
|
|
10207
10244
|
* Disallow unsafe DOM HTML APIs.
|
|
10208
10245
|
*
|
|
10209
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10246
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unsafe-dom-html.md
|
|
10210
10247
|
*/
|
|
10211
10248
|
'unicorn/no-unsafe-dom-html'?: Linter.RuleEntry<[]>;
|
|
10212
10249
|
/**
|
|
10213
10250
|
* Disallow reading `.value` from `Promise.allSettled()` results without a
|
|
10214
10251
|
* fulfilled status guard.
|
|
10215
10252
|
*
|
|
10216
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10253
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unsafe-promise-all-settled-values.md
|
|
10217
10254
|
*/
|
|
10218
10255
|
'unicorn/no-unsafe-promise-all-settled-values'?: Linter.RuleEntry<[]>;
|
|
10219
10256
|
/**
|
|
10220
10257
|
* Disallow unsafe values as property keys.
|
|
10221
10258
|
*
|
|
10222
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10259
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unsafe-property-key.md
|
|
10223
10260
|
*/
|
|
10224
10261
|
'unicorn/no-unsafe-property-key'?: Linter.RuleEntry<[]>;
|
|
10262
|
+
/**
|
|
10263
|
+
* Disallow interpolation into SQL strings passed to Node’s `node:sqlite`
|
|
10264
|
+
* APIs.
|
|
10265
|
+
*
|
|
10266
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unsafe-sqlite-interpolation.md
|
|
10267
|
+
*/
|
|
10268
|
+
'unicorn/no-unsafe-sqlite-interpolation'?: Linter.RuleEntry<[]>;
|
|
10225
10269
|
/**
|
|
10226
10270
|
* Disallow non-literal replacement values in `String#replace()` and
|
|
10227
10271
|
* `String#replaceAll()`.
|
|
10228
10272
|
*
|
|
10229
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10273
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unsafe-string-replacement.md
|
|
10230
10274
|
*/
|
|
10231
10275
|
'unicorn/no-unsafe-string-replacement'?: Linter.RuleEntry<[]>;
|
|
10232
10276
|
/**
|
|
10233
10277
|
* Disallow ignoring the return value of selected array methods.
|
|
10234
10278
|
*
|
|
10235
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10279
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unused-array-method-return.md
|
|
10236
10280
|
*/
|
|
10237
10281
|
'unicorn/no-unused-array-method-return'?: Linter.RuleEntry<[]>;
|
|
10238
10282
|
/**
|
|
10239
10283
|
* Disallow unused object properties.
|
|
10240
10284
|
*
|
|
10241
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10285
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-unused-properties.md
|
|
10242
10286
|
*/
|
|
10243
10287
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
10244
10288
|
/**
|
|
10245
10289
|
* Disallow unnecessary `Boolean()` casts in array predicate callbacks.
|
|
10246
10290
|
*
|
|
10247
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10291
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-boolean-cast.md
|
|
10248
10292
|
*/
|
|
10249
10293
|
'unicorn/no-useless-boolean-cast'?: Linter.RuleEntry<[]>;
|
|
10250
10294
|
/**
|
|
10251
10295
|
* Disallow useless type coercions of values that are already of the target
|
|
10252
10296
|
* type.
|
|
10253
10297
|
*
|
|
10254
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10298
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-coercion.md
|
|
10255
10299
|
*/
|
|
10256
10300
|
'unicorn/no-useless-coercion'?: Linter.RuleEntry<[]>;
|
|
10257
10301
|
/**
|
|
10258
10302
|
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or
|
|
10259
10303
|
* `WeakMap`.
|
|
10260
10304
|
*
|
|
10261
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10305
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-collection-argument.md
|
|
10262
10306
|
*/
|
|
10263
10307
|
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
|
|
10264
10308
|
/**
|
|
10265
10309
|
* Disallow useless compound assignments such as `x += 0`.
|
|
10266
10310
|
*
|
|
10267
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10311
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-compound-assignment.md
|
|
10268
10312
|
*/
|
|
10269
10313
|
'unicorn/no-useless-compound-assignment'?: Linter.RuleEntry<[]>;
|
|
10270
10314
|
/**
|
|
10271
10315
|
* Disallow useless concatenation of literals.
|
|
10272
10316
|
*
|
|
10273
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10317
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-concat.md
|
|
10274
10318
|
*/
|
|
10275
10319
|
'unicorn/no-useless-concat'?: Linter.RuleEntry<[]>;
|
|
10276
10320
|
/**
|
|
10277
10321
|
* Disallow useless `continue` statements.
|
|
10278
10322
|
*
|
|
10279
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10323
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-continue.md
|
|
10280
10324
|
*/
|
|
10281
10325
|
'unicorn/no-useless-continue'?: Linter.RuleEntry<[]>;
|
|
10282
10326
|
/**
|
|
10283
10327
|
* Disallow unnecessary existence checks before deletion.
|
|
10284
10328
|
*
|
|
10285
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10329
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-delete-check.md
|
|
10286
10330
|
*/
|
|
10287
10331
|
'unicorn/no-useless-delete-check'?: Linter.RuleEntry<[]>;
|
|
10288
10332
|
/**
|
|
10289
10333
|
* Disallow `else` after a statement that exits.
|
|
10290
10334
|
*
|
|
10291
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10335
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-else.md
|
|
10292
10336
|
*/
|
|
10293
10337
|
'unicorn/no-useless-else'?: Linter.RuleEntry<[]>;
|
|
10294
10338
|
/**
|
|
10295
10339
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
10296
10340
|
*
|
|
10297
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10341
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
10298
10342
|
*/
|
|
10299
10343
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
10300
10344
|
/**
|
|
10301
10345
|
* Disallow useless fallback when spreading in object literals.
|
|
10302
10346
|
*
|
|
10303
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10347
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
10304
10348
|
*/
|
|
10305
10349
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
10306
10350
|
/**
|
|
10307
10351
|
* Disallow unnecessary `.toArray()` on iterators.
|
|
10308
10352
|
*
|
|
10309
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10353
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-iterator-to-array.md
|
|
10310
10354
|
*/
|
|
10311
10355
|
'unicorn/no-useless-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
10312
10356
|
/**
|
|
10313
10357
|
* Disallow useless array length check.
|
|
10314
10358
|
*
|
|
10315
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10359
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-length-check.md
|
|
10316
10360
|
*/
|
|
10317
10361
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
10318
10362
|
/**
|
|
10319
10363
|
* Disallow unnecessary operands in logical expressions involving boolean
|
|
10320
10364
|
* literals.
|
|
10321
10365
|
*
|
|
10322
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10366
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-logical-operand.md
|
|
10323
10367
|
*/
|
|
10324
10368
|
'unicorn/no-useless-logical-operand'?: Linter.RuleEntry<[]>;
|
|
10325
10369
|
/**
|
|
10326
10370
|
* Disallow useless overrides of class methods.
|
|
10327
10371
|
*
|
|
10328
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10372
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-override.md
|
|
10329
10373
|
*/
|
|
10330
10374
|
'unicorn/no-useless-override'?: Linter.RuleEntry<[]>;
|
|
10331
10375
|
/**
|
|
10332
10376
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions
|
|
10333
10377
|
* or promise callbacks
|
|
10334
10378
|
*
|
|
10335
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10379
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
10336
10380
|
*/
|
|
10337
10381
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
10338
10382
|
/**
|
|
10339
10383
|
* Disallow redundant re-exports.
|
|
10340
10384
|
*
|
|
10341
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10385
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-re-export.md
|
|
10342
10386
|
*/
|
|
10343
10387
|
'unicorn/no-useless-re-export'?: Linter.RuleEntry<[]>;
|
|
10344
10388
|
/**
|
|
10345
10389
|
* Disallow simple recursive function calls that can be replaced with a loop.
|
|
10346
10390
|
*
|
|
10347
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10391
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-recursion.md
|
|
10348
10392
|
*/
|
|
10349
10393
|
'unicorn/no-useless-recursion'?: Linter.RuleEntry<[]>;
|
|
10350
10394
|
/**
|
|
10351
10395
|
* Disallow unnecessary spread.
|
|
10352
10396
|
*
|
|
10353
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10397
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-spread.md
|
|
10354
10398
|
*/
|
|
10355
10399
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
10356
10400
|
/**
|
|
10357
10401
|
* Disallow useless case in switch statements.
|
|
10358
10402
|
*
|
|
10359
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10403
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-switch-case.md
|
|
10360
10404
|
*/
|
|
10361
10405
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
10362
10406
|
/**
|
|
10363
10407
|
* Disallow useless template literal expressions.
|
|
10364
10408
|
*
|
|
10365
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10409
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-template-literals.md
|
|
10366
10410
|
*/
|
|
10367
10411
|
'unicorn/no-useless-template-literals'?: Linter.RuleEntry<[]>;
|
|
10368
10412
|
/**
|
|
10369
10413
|
* Disallow useless `undefined`.
|
|
10370
10414
|
*
|
|
10371
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10415
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-useless-undefined.md
|
|
10372
10416
|
*/
|
|
10373
10417
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
10374
10418
|
/**
|
|
10375
10419
|
* Disallow the bitwise XOR operator where exponentiation was likely intended.
|
|
10376
10420
|
*
|
|
10377
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10421
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-xor-as-exponentiation.md
|
|
10378
10422
|
*/
|
|
10379
10423
|
'unicorn/no-xor-as-exponentiation'?: Linter.RuleEntry<[]>;
|
|
10380
10424
|
/**
|
|
10381
10425
|
* Disallow number literals with zero fractions or dangling dots.
|
|
10382
10426
|
*
|
|
10383
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10427
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/no-zero-fractions.md
|
|
10384
10428
|
*/
|
|
10385
10429
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
10386
10430
|
/**
|
|
10387
10431
|
* Enforce proper case for numeric literals.
|
|
10388
10432
|
*
|
|
10389
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10433
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/number-literal-case.md
|
|
10390
10434
|
*/
|
|
10391
10435
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
10392
10436
|
/**
|
|
10393
10437
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
10394
10438
|
*
|
|
10395
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10439
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/numeric-separators-style.md
|
|
10396
10440
|
*/
|
|
10397
10441
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
10398
10442
|
/**
|
|
10399
10443
|
* Require assignment operator shorthand where possible.
|
|
10400
10444
|
*
|
|
10401
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10445
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/operator-assignment.md
|
|
10402
10446
|
*/
|
|
10403
10447
|
'unicorn/operator-assignment'?: Linter.RuleEntry<UnicornOperatorAssignment>;
|
|
10404
10448
|
/**
|
|
10405
10449
|
* Prefer `AbortSignal.any()` over manually forwarding abort events between
|
|
10406
10450
|
* signals.
|
|
10407
10451
|
*
|
|
10408
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10452
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-abort-signal-any.md
|
|
10409
10453
|
*/
|
|
10410
10454
|
'unicorn/prefer-abort-signal-any'?: Linter.RuleEntry<[]>;
|
|
10411
10455
|
/**
|
|
10412
10456
|
* Prefer `AbortSignal.timeout()` over manually aborting an `AbortController`
|
|
10413
10457
|
* with `setTimeout()`.
|
|
10414
10458
|
*
|
|
10415
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10459
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-abort-signal-timeout.md
|
|
10416
10460
|
*/
|
|
10417
10461
|
'unicorn/prefer-abort-signal-timeout'?: Linter.RuleEntry<[]>;
|
|
10418
10462
|
/**
|
|
10419
10463
|
* Prefer `.addEventListener()` and `.removeEventListener()` over
|
|
10420
10464
|
* `on`-functions.
|
|
10421
10465
|
*
|
|
10422
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10466
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-add-event-listener.md
|
|
10423
10467
|
*/
|
|
10424
10468
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
10425
10469
|
/**
|
|
10426
10470
|
* Prefer an options object over a boolean in `.addEventListener()`.
|
|
10427
10471
|
*
|
|
10428
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10472
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-add-event-listener-options.md
|
|
10429
10473
|
*/
|
|
10430
10474
|
'unicorn/prefer-add-event-listener-options'?: Linter.RuleEntry<[]>;
|
|
10431
10475
|
/**
|
|
10432
10476
|
* Prefer `AggregateError` when throwing collected errors.
|
|
10433
10477
|
*
|
|
10434
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10478
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-aggregate-error.md
|
|
10435
10479
|
*/
|
|
10436
10480
|
'unicorn/prefer-aggregate-error'?: Linter.RuleEntry<[]>;
|
|
10437
10481
|
/**
|
|
10438
10482
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from
|
|
10439
10483
|
* `.filter(…)`.
|
|
10440
10484
|
*
|
|
10441
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10485
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-find.md
|
|
10442
10486
|
*/
|
|
10443
10487
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
10444
10488
|
/**
|
|
10445
10489
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
10446
10490
|
*
|
|
10447
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10491
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-flat.md
|
|
10448
10492
|
*/
|
|
10449
10493
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
10450
10494
|
/**
|
|
10451
10495
|
* Prefer `.flatMap(…)` over `.map(…).flat()` and `.filter(…).flatMap(…)`.
|
|
10452
10496
|
*
|
|
10453
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10497
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-flat-map.md
|
|
10454
10498
|
*/
|
|
10455
10499
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
10456
10500
|
/**
|
|
10457
10501
|
* Prefer `Array.fromAsync()` over `for await…of` array accumulation.
|
|
10458
10502
|
*
|
|
10459
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10503
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-from-async.md
|
|
10460
10504
|
*/
|
|
10461
10505
|
'unicorn/prefer-array-from-async'?: Linter.RuleEntry<[]>;
|
|
10462
10506
|
/**
|
|
10463
10507
|
* Prefer using the `Array.from()` mapping function argument.
|
|
10464
10508
|
*
|
|
10465
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10509
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-from-map.md
|
|
10466
10510
|
*/
|
|
10467
10511
|
'unicorn/prefer-array-from-map'?: Linter.RuleEntry<[]>;
|
|
10468
10512
|
/**
|
|
10469
10513
|
* Prefer `Array.from({length}, …)` when creating range arrays.
|
|
10470
10514
|
*
|
|
10471
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10515
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-from-range.md
|
|
10472
10516
|
*/
|
|
10473
10517
|
'unicorn/prefer-array-from-range'?: Linter.RuleEntry<[]>;
|
|
10474
10518
|
/**
|
|
10475
10519
|
* Prefer `Array#{indexOf,lastIndexOf}()` over
|
|
10476
10520
|
* `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
10477
10521
|
*
|
|
10478
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10522
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-index-of.md
|
|
10479
10523
|
*/
|
|
10480
10524
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
10481
10525
|
/**
|
|
10482
10526
|
* Prefer iterating an array directly or with `Array#keys()` over
|
|
10483
10527
|
* `Array#entries()` when the index or value is unused.
|
|
10484
10528
|
*
|
|
10485
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10529
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-iterable-methods.md
|
|
10486
10530
|
*/
|
|
10487
10531
|
'unicorn/prefer-array-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
10488
10532
|
/**
|
|
10489
10533
|
* Prefer last-oriented array methods over `Array#reverse()` or
|
|
10490
10534
|
* `Array#toReversed()` followed by a method.
|
|
10491
10535
|
*
|
|
10492
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10536
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-last-methods.md
|
|
10493
10537
|
*/
|
|
10494
10538
|
'unicorn/prefer-array-last-methods'?: Linter.RuleEntry<[]>;
|
|
10495
10539
|
/**
|
|
10496
10540
|
* Prefer `Array#slice()` over `Array#splice()` when reading from the returned
|
|
10497
10541
|
* array.
|
|
10498
10542
|
*
|
|
10499
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10543
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-slice.md
|
|
10500
10544
|
*/
|
|
10501
10545
|
'unicorn/prefer-array-slice'?: Linter.RuleEntry<[]>;
|
|
10502
10546
|
/**
|
|
10503
10547
|
* Prefer `.some(…)` over `.filter(…).length` check and
|
|
10504
10548
|
* `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
10505
10549
|
*
|
|
10506
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10550
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-array-some.md
|
|
10507
10551
|
*/
|
|
10508
10552
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
10509
10553
|
/**
|
|
10510
10554
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
10511
10555
|
*
|
|
10512
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10556
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-at.md
|
|
10513
10557
|
*/
|
|
10514
10558
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
10515
10559
|
/**
|
|
10516
10560
|
* Prefer `await` over promise chaining.
|
|
10517
10561
|
*
|
|
10518
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10562
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-await.md
|
|
10519
10563
|
*/
|
|
10520
10564
|
'unicorn/prefer-await'?: Linter.RuleEntry<[]>;
|
|
10521
10565
|
/**
|
|
10522
10566
|
* Prefer `BigInt` literals over the constructor.
|
|
10523
10567
|
*
|
|
10524
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10568
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-bigint-literals.md
|
|
10525
10569
|
*/
|
|
10526
10570
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
10527
10571
|
/**
|
|
10528
10572
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and
|
|
10529
10573
|
* `Blob#text()` over `FileReader#readAsText(…)`.
|
|
10530
10574
|
*
|
|
10531
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10575
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
10532
10576
|
*/
|
|
10533
10577
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
10534
10578
|
/**
|
|
10535
10579
|
* Prefer block statements over IIFEs used only for scoping.
|
|
10536
10580
|
*
|
|
10537
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10581
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-block-statement-over-iife.md
|
|
10538
10582
|
*/
|
|
10539
10583
|
'unicorn/prefer-block-statement-over-iife'?: Linter.RuleEntry<[]>;
|
|
10540
10584
|
/**
|
|
10541
10585
|
* Prefer directly returning boolean expressions over `if` statements.
|
|
10542
10586
|
*
|
|
10543
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10587
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-boolean-return.md
|
|
10544
10588
|
*/
|
|
10545
10589
|
'unicorn/prefer-boolean-return'?: Linter.RuleEntry<[]>;
|
|
10546
10590
|
/**
|
|
10547
10591
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
10548
10592
|
*
|
|
10549
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10593
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-class-fields.md
|
|
10550
10594
|
*/
|
|
10551
10595
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
10552
10596
|
/**
|
|
10553
10597
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
10554
10598
|
*
|
|
10555
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10599
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-classlist-toggle.md
|
|
10556
10600
|
*/
|
|
10557
10601
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
10558
10602
|
/**
|
|
10559
10603
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and
|
|
10560
10604
|
* `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
10561
10605
|
*
|
|
10562
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10606
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-code-point.md
|
|
10563
10607
|
*/
|
|
10564
10608
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
10565
10609
|
/**
|
|
10566
10610
|
* Prefer early continues over whole-loop conditional wrapping.
|
|
10567
10611
|
*
|
|
10568
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10612
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-continue.md
|
|
10569
10613
|
*/
|
|
10570
10614
|
'unicorn/prefer-continue'?: Linter.RuleEntry<UnicornPreferContinue>;
|
|
10571
10615
|
/**
|
|
10572
10616
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
10573
10617
|
*
|
|
10574
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10618
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-date-now.md
|
|
10575
10619
|
*/
|
|
10576
10620
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
10577
10621
|
/**
|
|
10578
10622
|
* Prefer default parameters over reassignment.
|
|
10579
10623
|
*
|
|
10580
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10624
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-default-parameters.md
|
|
10581
10625
|
*/
|
|
10582
10626
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
10583
10627
|
/**
|
|
10584
10628
|
* Prefer direct iteration over default iterator method calls.
|
|
10585
10629
|
*
|
|
10586
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10630
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-direct-iteration.md
|
|
10587
10631
|
*/
|
|
10588
10632
|
'unicorn/prefer-direct-iteration'?: Linter.RuleEntry<[]>;
|
|
10589
10633
|
/**
|
|
10590
10634
|
* Prefer using `using`/`await using` over manual `try`/`finally` resource
|
|
10591
10635
|
* disposal.
|
|
10592
10636
|
*
|
|
10593
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10637
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-dispose.md
|
|
10594
10638
|
*/
|
|
10595
10639
|
'unicorn/prefer-dispose'?: Linter.RuleEntry<[]>;
|
|
10596
10640
|
/**
|
|
10597
10641
|
* Prefer `Element#append()` over `Node#appendChild()`.
|
|
10598
10642
|
*
|
|
10599
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10643
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-dom-node-append.md
|
|
10600
10644
|
*/
|
|
10601
10645
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
10602
10646
|
/**
|
|
10603
10647
|
* Renamed to `unicorn/dom-node-dataset`.
|
|
10604
10648
|
*
|
|
10605
10649
|
* @deprecated
|
|
10606
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10650
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/deleted-and-deprecated-rules.md#prefer-dom-node-dataset
|
|
10607
10651
|
*/
|
|
10608
10652
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
10609
10653
|
/**
|
|
10610
10654
|
* Prefer `.getHTML()` and `.setHTML()` over `.innerHTML`.
|
|
10611
10655
|
*
|
|
10612
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10656
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-dom-node-html-methods.md
|
|
10613
10657
|
*/
|
|
10614
10658
|
'unicorn/prefer-dom-node-html-methods'?: Linter.RuleEntry<UnicornPreferDomNodeHtmlMethods>;
|
|
10615
10659
|
/**
|
|
10616
10660
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
10617
10661
|
*
|
|
10618
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10662
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-dom-node-remove.md
|
|
10619
10663
|
*/
|
|
10620
10664
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
10621
10665
|
/**
|
|
10622
10666
|
* Prefer `.replaceChildren()` when emptying DOM children.
|
|
10623
10667
|
*
|
|
10624
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10668
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-dom-node-replace-children.md
|
|
10625
10669
|
*/
|
|
10626
10670
|
'unicorn/prefer-dom-node-replace-children'?: Linter.RuleEntry<[]>;
|
|
10627
10671
|
/**
|
|
10628
10672
|
* Prefer `.textContent` over `.innerText`.
|
|
10629
10673
|
*
|
|
10630
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10674
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
10631
10675
|
*/
|
|
10632
10676
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
10633
10677
|
/**
|
|
10634
10678
|
* Prefer early returns over full-function conditional wrapping.
|
|
10635
10679
|
*
|
|
10636
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10680
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-early-return.md
|
|
10637
10681
|
*/
|
|
10638
10682
|
'unicorn/prefer-early-return'?: Linter.RuleEntry<UnicornPreferEarlyReturn>;
|
|
10639
10683
|
/**
|
|
10640
10684
|
* Prefer `else if` over adjacent `if` statements with related conditions.
|
|
10641
10685
|
*
|
|
10642
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10686
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-else-if.md
|
|
10643
10687
|
*/
|
|
10644
10688
|
'unicorn/prefer-else-if'?: Linter.RuleEntry<[]>;
|
|
10645
10689
|
/**
|
|
10646
10690
|
* Prefer `Error.isError()` when checking for errors.
|
|
10647
10691
|
*
|
|
10648
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10692
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-error-is-error.md
|
|
10649
10693
|
*/
|
|
10650
10694
|
'unicorn/prefer-error-is-error'?: Linter.RuleEntry<[]>;
|
|
10651
10695
|
/**
|
|
10652
10696
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
10653
10697
|
*
|
|
10654
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10698
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-event-target.md
|
|
10655
10699
|
*/
|
|
10656
10700
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
10657
10701
|
/**
|
|
10658
10702
|
* Prefer explicit viewport units.
|
|
10659
10703
|
*
|
|
10660
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10704
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-explicit-viewport-units.md
|
|
10661
10705
|
*/
|
|
10662
10706
|
'unicorn/prefer-explicit-viewport-units'?: Linter.RuleEntry<UnicornPreferExplicitViewportUnits>;
|
|
10663
10707
|
/**
|
|
10664
10708
|
* Prefer `export…from` when re-exporting.
|
|
10665
10709
|
*
|
|
10666
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10710
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-export-from.md
|
|
10667
10711
|
*/
|
|
10668
10712
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
10669
10713
|
/**
|
|
10670
10714
|
* Prefer flat `Math.min()` and `Math.max()` calls over nested calls.
|
|
10671
10715
|
*
|
|
10672
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10716
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-flat-math-min-max.md
|
|
10673
10717
|
*/
|
|
10674
10718
|
'unicorn/prefer-flat-math-min-max'?: Linter.RuleEntry<[]>;
|
|
10675
10719
|
/**
|
|
10676
10720
|
* Prefer `.getOrInsertComputed()` when the default value has side effects.
|
|
10677
10721
|
*
|
|
10678
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10722
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-get-or-insert-computed.md
|
|
10679
10723
|
*/
|
|
10680
10724
|
'unicorn/prefer-get-or-insert-computed'?: Linter.RuleEntry<[]>;
|
|
10681
10725
|
/**
|
|
10682
10726
|
* Prefer global numeric constants over `Number` static properties.
|
|
10683
10727
|
*
|
|
10684
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10728
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-global-number-constants.md
|
|
10685
10729
|
*/
|
|
10686
10730
|
'unicorn/prefer-global-number-constants'?: Linter.RuleEntry<[]>;
|
|
10687
10731
|
/**
|
|
10688
10732
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
10689
10733
|
*
|
|
10690
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10734
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-global-this.md
|
|
10691
10735
|
*/
|
|
10692
10736
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
10693
10737
|
/**
|
|
10694
10738
|
* Prefer `Object.groupBy()` or `Map.groupBy()` over reduce-based grouping.
|
|
10695
10739
|
*
|
|
10696
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10740
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-group-by.md
|
|
10697
10741
|
*/
|
|
10698
10742
|
'unicorn/prefer-group-by'?: Linter.RuleEntry<[]>;
|
|
10699
10743
|
/**
|
|
10700
10744
|
* Prefer `.has()` when checking existence.
|
|
10701
10745
|
*
|
|
10702
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10746
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-has-check.md
|
|
10703
10747
|
*/
|
|
10704
10748
|
'unicorn/prefer-has-check'?: Linter.RuleEntry<[]>;
|
|
10705
10749
|
/**
|
|
10706
10750
|
* Prefer moving code shared by all branches of an `if` statement out of the
|
|
10707
10751
|
* branches.
|
|
10708
10752
|
*
|
|
10709
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10753
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-hoisting-branch-code.md
|
|
10710
10754
|
*/
|
|
10711
10755
|
'unicorn/prefer-hoisting-branch-code'?: Linter.RuleEntry<[]>;
|
|
10712
10756
|
/**
|
|
10713
10757
|
* Prefer HTTPS over HTTP.
|
|
10714
10758
|
*
|
|
10715
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10759
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-https.md
|
|
10716
10760
|
*/
|
|
10717
|
-
'unicorn/prefer-https'?: Linter.RuleEntry<
|
|
10761
|
+
'unicorn/prefer-https'?: Linter.RuleEntry<UnicornPreferHttps>;
|
|
10718
10762
|
/**
|
|
10719
10763
|
* Prefer identifiers over string literals in import and export specifiers.
|
|
10720
10764
|
*
|
|
10721
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10765
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-identifier-import-export-specifiers.md
|
|
10722
10766
|
*/
|
|
10723
10767
|
'unicorn/prefer-identifier-import-export-specifiers'?: Linter.RuleEntry<[]>;
|
|
10724
10768
|
/**
|
|
10725
10769
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting
|
|
10726
10770
|
* file paths.
|
|
10727
10771
|
*
|
|
10728
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10772
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-import-meta-properties.md
|
|
10729
10773
|
*/
|
|
10730
10774
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
10731
10775
|
/**
|
|
10732
10776
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and
|
|
10733
10777
|
* `Array#some()` when checking for existence or non-existence.
|
|
10734
10778
|
*
|
|
10735
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10779
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-includes.md
|
|
10736
10780
|
*/
|
|
10737
10781
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
10738
10782
|
/**
|
|
10739
10783
|
* Prefer `.includes()` over repeated equality comparisons.
|
|
10740
10784
|
*
|
|
10741
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10785
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-includes-over-repeated-comparisons.md
|
|
10742
10786
|
*/
|
|
10743
10787
|
'unicorn/prefer-includes-over-repeated-comparisons'?: Linter.RuleEntry<UnicornPreferIncludesOverRepeatedComparisons>;
|
|
10744
10788
|
/**
|
|
10745
10789
|
* Prefer passing iterables directly to constructors instead of filling empty
|
|
10746
10790
|
* collections.
|
|
10747
10791
|
*
|
|
10748
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10792
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-iterable-in-constructor.md
|
|
10749
10793
|
*/
|
|
10750
10794
|
'unicorn/prefer-iterable-in-constructor'?: Linter.RuleEntry<[]>;
|
|
10751
10795
|
/**
|
|
10752
10796
|
* Prefer `Iterator.concat(…)` over temporary spread arrays.
|
|
10753
10797
|
*
|
|
10754
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10798
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-iterator-concat.md
|
|
10755
10799
|
*/
|
|
10756
10800
|
'unicorn/prefer-iterator-concat'?: Linter.RuleEntry<[]>;
|
|
10757
10801
|
/**
|
|
10758
10802
|
* Prefer iterator helpers over temporary arrays from iterators.
|
|
10759
10803
|
*
|
|
10760
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10804
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-iterator-helpers.md
|
|
10761
10805
|
*/
|
|
10762
10806
|
'unicorn/prefer-iterator-helpers'?: Linter.RuleEntry<[]>;
|
|
10763
10807
|
/**
|
|
10764
10808
|
* Prefer `Iterator#toArray()` over temporary arrays from iterator spreads.
|
|
10765
10809
|
*
|
|
10766
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10810
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-iterator-to-array.md
|
|
10767
10811
|
*/
|
|
10768
10812
|
'unicorn/prefer-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
10769
10813
|
/**
|
|
10770
10814
|
* Prefer moving `.toArray()` to the end of iterator helper chains.
|
|
10771
10815
|
*
|
|
10772
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10816
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-iterator-to-array-at-end.md
|
|
10773
10817
|
*/
|
|
10774
10818
|
'unicorn/prefer-iterator-to-array-at-end'?: Linter.RuleEntry<[]>;
|
|
10775
10819
|
/**
|
|
10776
10820
|
* Renamed to `unicorn/consistent-json-file-read`.
|
|
10777
10821
|
*
|
|
10778
10822
|
* @deprecated
|
|
10779
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10823
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/deleted-and-deprecated-rules.md#prefer-json-parse-buffer
|
|
10780
10824
|
*/
|
|
10781
10825
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
10782
10826
|
/**
|
|
10783
10827
|
* Prefer `KeyboardEvent#key` over deprecated keyboard event properties.
|
|
10784
10828
|
*
|
|
10785
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10829
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
10786
10830
|
*/
|
|
10787
10831
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
10788
10832
|
/**
|
|
10789
10833
|
* Prefer `location.assign()` over assigning to `location.href`.
|
|
10790
10834
|
*
|
|
10791
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10835
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-location-assign.md
|
|
10792
10836
|
*/
|
|
10793
10837
|
'unicorn/prefer-location-assign'?: Linter.RuleEntry<[]>;
|
|
10794
10838
|
/**
|
|
10795
10839
|
* Prefer using a logical operator over a ternary.
|
|
10796
10840
|
*
|
|
10797
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10841
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
10798
10842
|
*/
|
|
10799
10843
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
10800
10844
|
/**
|
|
10801
10845
|
* Prefer `new Map()` over `Object.fromEntries()` when using the result as a
|
|
10802
10846
|
* map.
|
|
10803
10847
|
*
|
|
10804
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10848
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-map-from-entries.md
|
|
10805
10849
|
*/
|
|
10806
10850
|
'unicorn/prefer-map-from-entries'?: Linter.RuleEntry<[]>;
|
|
10807
10851
|
/**
|
|
10808
10852
|
* Prefer `Math.abs()` over manual absolute value expressions and symmetric
|
|
10809
10853
|
* range checks.
|
|
10810
10854
|
*
|
|
10811
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10855
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-math-abs.md
|
|
10812
10856
|
*/
|
|
10813
10857
|
'unicorn/prefer-math-abs'?: Linter.RuleEntry<[]>;
|
|
10814
10858
|
/**
|
|
10815
10859
|
* Prefer `Math` constants over their approximate numeric values.
|
|
10816
10860
|
*
|
|
10817
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10861
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-math-constants.md
|
|
10818
10862
|
*/
|
|
10819
10863
|
'unicorn/prefer-math-constants'?: Linter.RuleEntry<[]>;
|
|
10820
10864
|
/**
|
|
10821
10865
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
10822
10866
|
*
|
|
10823
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10867
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-math-min-max.md
|
|
10824
10868
|
*/
|
|
10825
10869
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
10826
10870
|
/**
|
|
10827
10871
|
* Prefer `Math.trunc()` for truncating numbers.
|
|
10828
10872
|
*
|
|
10829
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10873
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-math-trunc.md
|
|
10830
10874
|
*/
|
|
10831
10875
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
10832
10876
|
/**
|
|
10833
10877
|
* Prefer moving ternaries into the minimal varying part of an expression.
|
|
10834
10878
|
*
|
|
10835
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10879
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-minimal-ternary.md
|
|
10836
10880
|
*/
|
|
10837
10881
|
'unicorn/prefer-minimal-ternary'?: Linter.RuleEntry<UnicornPreferMinimalTernary>;
|
|
10838
10882
|
/**
|
|
10839
10883
|
* Prefer modern DOM APIs.
|
|
10840
10884
|
*
|
|
10841
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10885
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
10842
10886
|
*/
|
|
10843
10887
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
10844
10888
|
/**
|
|
10845
10889
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
10846
10890
|
*
|
|
10847
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10891
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-modern-math-apis.md
|
|
10848
10892
|
*/
|
|
10849
10893
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
10850
10894
|
/**
|
|
10851
10895
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
10852
10896
|
*
|
|
10853
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10897
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-module.md
|
|
10854
10898
|
*/
|
|
10855
10899
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
10856
10900
|
/**
|
|
10857
10901
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol`
|
|
10858
10902
|
* directly.
|
|
10859
10903
|
*
|
|
10860
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10904
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
10861
10905
|
*/
|
|
10862
10906
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
10863
10907
|
/**
|
|
10864
10908
|
* Prefer negative index over `.length - index` when possible.
|
|
10865
10909
|
*
|
|
10866
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10910
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-negative-index.md
|
|
10867
10911
|
*/
|
|
10868
10912
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
10869
10913
|
/**
|
|
10870
10914
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
10871
10915
|
*
|
|
10872
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10916
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-node-protocol.md
|
|
10873
10917
|
*/
|
|
10874
10918
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
10875
10919
|
/**
|
|
10876
10920
|
* Prefer `Number()` over `parseFloat()` and base-10 `parseInt()`.
|
|
10877
10921
|
*
|
|
10878
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10922
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-number-coercion.md
|
|
10879
10923
|
*/
|
|
10880
10924
|
'unicorn/prefer-number-coercion'?: Linter.RuleEntry<[]>;
|
|
10881
10925
|
/**
|
|
10882
10926
|
* Prefer `Number.isSafeInteger()` over integer checks.
|
|
10883
10927
|
*
|
|
10884
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10928
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-number-is-safe-integer.md
|
|
10885
10929
|
*/
|
|
10886
10930
|
'unicorn/prefer-number-is-safe-integer'?: Linter.RuleEntry<[]>;
|
|
10887
10931
|
/**
|
|
10888
10932
|
* Prefer `Number` static methods over global functions and optionally static
|
|
10889
10933
|
* properties over global constants.
|
|
10890
10934
|
*
|
|
10891
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10935
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-number-properties.md
|
|
10892
10936
|
*/
|
|
10893
10937
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
10894
10938
|
/**
|
|
10895
10939
|
* Prefer `Object.defineProperties()` over multiple `Object.defineProperty()`
|
|
10896
10940
|
* calls.
|
|
10897
10941
|
*
|
|
10898
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10942
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-object-define-properties.md
|
|
10899
10943
|
*/
|
|
10900
10944
|
'unicorn/prefer-object-define-properties'?: Linter.RuleEntry<[]>;
|
|
10901
10945
|
/**
|
|
10902
10946
|
* Prefer object destructuring defaults over default object literals with
|
|
10903
10947
|
* spread.
|
|
10904
10948
|
*
|
|
10905
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10949
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-object-destructuring-defaults.md
|
|
10906
10950
|
*/
|
|
10907
10951
|
'unicorn/prefer-object-destructuring-defaults'?: Linter.RuleEntry<[]>;
|
|
10908
10952
|
/**
|
|
10909
10953
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs
|
|
10910
10954
|
* into an object.
|
|
10911
10955
|
*
|
|
10912
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10956
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-object-from-entries.md
|
|
10913
10957
|
*/
|
|
10914
10958
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
10915
10959
|
/**
|
|
10916
10960
|
* Prefer the most specific `Object` iterable method.
|
|
10917
10961
|
*
|
|
10918
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10962
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-object-iterable-methods.md
|
|
10919
10963
|
*/
|
|
10920
10964
|
'unicorn/prefer-object-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
10921
10965
|
/**
|
|
10922
10966
|
* Prefer observer APIs over resize and scroll listeners with layout reads.
|
|
10923
10967
|
*
|
|
10924
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10968
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-observer-apis.md
|
|
10925
10969
|
*/
|
|
10926
10970
|
'unicorn/prefer-observer-apis'?: Linter.RuleEntry<[]>;
|
|
10927
10971
|
/**
|
|
10928
10972
|
* Prefer omitting the `catch` binding parameter.
|
|
10929
10973
|
*
|
|
10930
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10974
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
10931
10975
|
*/
|
|
10932
10976
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
10933
10977
|
/**
|
|
10934
10978
|
* Prefer `Path2D` for repeatedly drawn canvas paths.
|
|
10935
10979
|
*
|
|
10936
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10980
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-path2d.md
|
|
10937
10981
|
*/
|
|
10938
10982
|
'unicorn/prefer-path2d'?: Linter.RuleEntry<[]>;
|
|
10939
10983
|
/**
|
|
10940
10984
|
* Prefer private class fields over the underscore-prefix convention.
|
|
10941
10985
|
*
|
|
10942
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10986
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-private-class-fields.md
|
|
10943
10987
|
*/
|
|
10944
10988
|
'unicorn/prefer-private-class-fields'?: Linter.RuleEntry<[]>;
|
|
10945
10989
|
/**
|
|
10946
10990
|
* Prefer `Promise.try()` over promise-wrapping boilerplate.
|
|
10947
10991
|
*
|
|
10948
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10992
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-promise-try.md
|
|
10949
10993
|
*/
|
|
10950
10994
|
'unicorn/prefer-promise-try'?: Linter.RuleEntry<[]>;
|
|
10951
10995
|
/**
|
|
10952
10996
|
* Prefer `Promise.withResolvers()` when extracting resolver functions from
|
|
10953
10997
|
* `new Promise()`.
|
|
10954
10998
|
*
|
|
10955
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
10999
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-promise-with-resolvers.md
|
|
10956
11000
|
*/
|
|
10957
11001
|
'unicorn/prefer-promise-with-resolvers'?: Linter.RuleEntry<[]>;
|
|
10958
11002
|
/**
|
|
10959
11003
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
10960
11004
|
*
|
|
10961
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11005
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-prototype-methods.md
|
|
10962
11006
|
*/
|
|
10963
11007
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
10964
11008
|
/**
|
|
10965
11009
|
* Prefer `.querySelector()` and `.querySelectorAll()` over older DOM query
|
|
10966
11010
|
* methods.
|
|
10967
11011
|
*
|
|
10968
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11012
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-query-selector.md
|
|
10969
11013
|
*/
|
|
10970
11014
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<UnicornPreferQuerySelector>;
|
|
10971
11015
|
/**
|
|
10972
11016
|
* Prefer `queueMicrotask()` over `process.nextTick()`, `setImmediate()`, and
|
|
10973
11017
|
* `setTimeout(…, 0)`.
|
|
10974
11018
|
*
|
|
10975
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11019
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-queue-microtask.md
|
|
10976
11020
|
*/
|
|
10977
11021
|
'unicorn/prefer-queue-microtask'?: Linter.RuleEntry<UnicornPreferQueueMicrotask>;
|
|
10978
11022
|
/**
|
|
10979
11023
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
10980
11024
|
*
|
|
10981
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11025
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-reflect-apply.md
|
|
10982
11026
|
*/
|
|
10983
11027
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
10984
11028
|
/**
|
|
10985
11029
|
* Prefer `RegExp.escape()` for escaping strings to use in regular
|
|
10986
11030
|
* expressions.
|
|
10987
11031
|
*
|
|
10988
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11032
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-regexp-escape.md
|
|
10989
11033
|
*/
|
|
10990
11034
|
'unicorn/prefer-regexp-escape'?: Linter.RuleEntry<[]>;
|
|
10991
11035
|
/**
|
|
10992
11036
|
* Prefer `RegExp#test()` over `String#match()`, `String#search()`, and
|
|
10993
11037
|
* `RegExp#exec()`.
|
|
10994
11038
|
*
|
|
10995
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11039
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-regexp-test.md
|
|
10996
11040
|
*/
|
|
10997
11041
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
10998
11042
|
/**
|
|
10999
11043
|
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
11000
11044
|
*
|
|
11001
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11045
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-response-static-json.md
|
|
11002
11046
|
*/
|
|
11003
11047
|
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
|
|
11004
11048
|
/**
|
|
11005
11049
|
* Prefer `:scope` when using element query selector methods.
|
|
11006
11050
|
*
|
|
11007
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11051
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-scoped-selector.md
|
|
11008
11052
|
*/
|
|
11009
11053
|
'unicorn/prefer-scoped-selector'?: Linter.RuleEntry<[]>;
|
|
11010
11054
|
/**
|
|
11011
11055
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or
|
|
11012
11056
|
* non-existence.
|
|
11013
11057
|
*
|
|
11014
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11058
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-set-has.md
|
|
11015
11059
|
*/
|
|
11016
11060
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<UnicornPreferSetHas>;
|
|
11017
11061
|
/**
|
|
11018
11062
|
* Prefer `Set` methods for Set operations.
|
|
11019
11063
|
*
|
|
11020
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11064
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-set-methods.md
|
|
11021
11065
|
*/
|
|
11022
11066
|
'unicorn/prefer-set-methods'?: Linter.RuleEntry<[]>;
|
|
11023
11067
|
/**
|
|
11024
11068
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
11025
11069
|
*
|
|
11026
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11070
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-set-size.md
|
|
11027
11071
|
*/
|
|
11028
11072
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
11029
11073
|
/**
|
|
11030
11074
|
* Prefer arrow function properties over methods with a single return.
|
|
11031
11075
|
*
|
|
11032
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11076
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-short-arrow-method.md
|
|
11033
11077
|
*/
|
|
11034
11078
|
'unicorn/prefer-short-arrow-method'?: Linter.RuleEntry<UnicornPreferShortArrowMethod>;
|
|
11035
11079
|
/**
|
|
11036
11080
|
* Prefer simple conditions first in logical expressions.
|
|
11037
11081
|
*
|
|
11038
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11082
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-simple-condition-first.md
|
|
11039
11083
|
*/
|
|
11040
11084
|
'unicorn/prefer-simple-condition-first'?: Linter.RuleEntry<[]>;
|
|
11041
11085
|
/**
|
|
11042
11086
|
* Prefer a simple comparison function for `Array#sort()`.
|
|
11043
11087
|
*
|
|
11044
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11088
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-simple-sort-comparator.md
|
|
11045
11089
|
*/
|
|
11046
11090
|
'unicorn/prefer-simple-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
11047
11091
|
/**
|
|
11048
11092
|
* Prefer simplified conditions.
|
|
11049
11093
|
*
|
|
11050
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11094
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-simplified-conditions.md
|
|
11051
11095
|
*/
|
|
11052
11096
|
'unicorn/prefer-simplified-conditions'?: Linter.RuleEntry<[]>;
|
|
11053
11097
|
/**
|
|
11054
11098
|
* Prefer a single `Array#some()` or `Array#every()` with a combined
|
|
11055
11099
|
* predicate.
|
|
11056
11100
|
*
|
|
11057
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11101
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-single-array-predicate.md
|
|
11058
11102
|
*/
|
|
11059
11103
|
'unicorn/prefer-single-array-predicate'?: Linter.RuleEntry<[]>;
|
|
11060
11104
|
/**
|
|
11061
11105
|
* Enforce combining multiple `Array#{push,unshift}()`,
|
|
11062
11106
|
* `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
11063
11107
|
*
|
|
11064
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11108
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-single-call.md
|
|
11065
11109
|
*/
|
|
11066
11110
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
11067
11111
|
/**
|
|
11068
11112
|
* Prefer a single object destructuring declaration per local const source.
|
|
11069
11113
|
*
|
|
11070
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11114
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-single-object-destructuring.md
|
|
11071
11115
|
*/
|
|
11072
11116
|
'unicorn/prefer-single-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
11073
11117
|
/**
|
|
11074
11118
|
* Enforce combining multiple single-character replacements into a single
|
|
11075
11119
|
* `String#replaceAll()` with a regular expression.
|
|
11076
11120
|
*
|
|
11077
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11121
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-single-replace.md
|
|
11078
11122
|
*/
|
|
11079
11123
|
'unicorn/prefer-single-replace'?: Linter.RuleEntry<[]>;
|
|
11080
11124
|
/**
|
|
11081
11125
|
* Prefer declaring variables in the smallest possible scope.
|
|
11082
11126
|
*
|
|
11083
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11127
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-smaller-scope.md
|
|
11084
11128
|
*/
|
|
11085
11129
|
'unicorn/prefer-smaller-scope'?: Linter.RuleEntry<[]>;
|
|
11086
11130
|
/**
|
|
11087
11131
|
* Prefer `String#split()` with a limit.
|
|
11088
11132
|
*
|
|
11089
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11133
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-split-limit.md
|
|
11090
11134
|
*/
|
|
11091
11135
|
'unicorn/prefer-split-limit'?: Linter.RuleEntry<[]>;
|
|
11092
11136
|
/**
|
|
11093
11137
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`,
|
|
11094
11138
|
* `Array#{slice,toSpliced}()`, and trivial `for…of` copies.
|
|
11095
11139
|
*
|
|
11096
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11140
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-spread.md
|
|
11097
11141
|
*/
|
|
11098
11142
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
11099
11143
|
/**
|
|
11100
11144
|
* Prefer `String#matchAll()` over `RegExp#exec()` loops.
|
|
11101
11145
|
*
|
|
11102
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11146
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-string-match-all.md
|
|
11103
11147
|
*/
|
|
11104
11148
|
'unicorn/prefer-string-match-all'?: Linter.RuleEntry<[]>;
|
|
11105
11149
|
/**
|
|
11106
11150
|
* Prefer `String#padStart()` and `String#padEnd()` over manual string
|
|
11107
11151
|
* padding.
|
|
11108
11152
|
*
|
|
11109
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11153
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-string-pad-start-end.md
|
|
11110
11154
|
*/
|
|
11111
11155
|
'unicorn/prefer-string-pad-start-end'?: Linter.RuleEntry<[]>;
|
|
11112
11156
|
/**
|
|
11113
11157
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
11114
11158
|
*
|
|
11115
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11159
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-string-raw.md
|
|
11116
11160
|
*/
|
|
11117
11161
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
11118
11162
|
/**
|
|
11119
11163
|
* Prefer `String#repeat()` for repeated whitespace.
|
|
11120
11164
|
*
|
|
11121
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11165
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-string-repeat.md
|
|
11122
11166
|
*/
|
|
11123
11167
|
'unicorn/prefer-string-repeat'?: Linter.RuleEntry<UnicornPreferStringRepeat>;
|
|
11124
11168
|
/**
|
|
11125
11169
|
* Prefer `String#replaceAll()` over regex searches with the global flag and
|
|
11126
11170
|
* `String#split().join()`.
|
|
11127
11171
|
*
|
|
11128
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11172
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-string-replace-all.md
|
|
11129
11173
|
*/
|
|
11130
11174
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
11131
11175
|
/**
|
|
11132
11176
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
11133
11177
|
*
|
|
11134
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11178
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-string-slice.md
|
|
11135
11179
|
*/
|
|
11136
11180
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
11137
11181
|
/**
|
|
11138
11182
|
* Prefer `String#startsWith()` & `String#endsWith()` over regexes,
|
|
11139
11183
|
* `String#indexOf() === 0`, and slice checks.
|
|
11140
11184
|
*
|
|
11141
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11185
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
11142
11186
|
*/
|
|
11143
11187
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
11144
11188
|
/**
|
|
11145
11189
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` /
|
|
11146
11190
|
* `String#trimRight()`.
|
|
11147
11191
|
*
|
|
11148
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11192
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
11149
11193
|
*/
|
|
11150
11194
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
11151
11195
|
/**
|
|
11152
11196
|
* Prefer using `structuredClone` to create a deep clone.
|
|
11153
11197
|
*
|
|
11154
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11198
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-structured-clone.md
|
|
11155
11199
|
*/
|
|
11156
11200
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
11157
11201
|
/**
|
|
11158
11202
|
* Prefer `switch` over multiple `else-if`.
|
|
11159
11203
|
*
|
|
11160
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11204
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-switch.md
|
|
11161
11205
|
*/
|
|
11162
11206
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
11163
11207
|
/**
|
|
11164
11208
|
* Prefer `Temporal` over `Date`.
|
|
11165
11209
|
*
|
|
11166
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11210
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-temporal.md
|
|
11167
11211
|
*/
|
|
11168
11212
|
'unicorn/prefer-temporal'?: Linter.RuleEntry<UnicornPreferTemporal>;
|
|
11169
11213
|
/**
|
|
11170
11214
|
* Prefer ternary expressions over simple `if` statements that return or
|
|
11171
11215
|
* assign values.
|
|
11172
11216
|
*
|
|
11173
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11217
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-ternary.md
|
|
11174
11218
|
*/
|
|
11175
11219
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
11176
11220
|
/**
|
|
11177
11221
|
* Prefer `.then().catch()` over `.then(…, …)` for error handling.
|
|
11178
11222
|
*
|
|
11179
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11223
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-then-catch.md
|
|
11180
11224
|
*/
|
|
11181
11225
|
'unicorn/prefer-then-catch'?: Linter.RuleEntry<[]>;
|
|
11182
11226
|
/**
|
|
11183
11227
|
* Prefer using `Element#toggleAttribute()` to toggle attributes.
|
|
11184
11228
|
*
|
|
11185
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11229
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-toggle-attribute.md
|
|
11186
11230
|
*/
|
|
11187
11231
|
'unicorn/prefer-toggle-attribute'?: Linter.RuleEntry<[]>;
|
|
11188
11232
|
/**
|
|
11189
11233
|
* Prefer top-level await over top-level promises and async function calls.
|
|
11190
11234
|
*
|
|
11191
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11235
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-top-level-await.md
|
|
11192
11236
|
*/
|
|
11193
11237
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
11194
11238
|
/**
|
|
11195
11239
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
11196
11240
|
*
|
|
11197
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11241
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-type-error.md
|
|
11198
11242
|
*/
|
|
11199
11243
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
11200
11244
|
/**
|
|
11201
11245
|
* Require type literals to be last in union types.
|
|
11202
11246
|
*
|
|
11203
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11247
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-type-literal-last.md
|
|
11204
11248
|
*/
|
|
11205
11249
|
'unicorn/prefer-type-literal-last'?: Linter.RuleEntry<[]>;
|
|
11206
11250
|
/**
|
|
11207
11251
|
* Prefer `Uint8Array#toBase64()` and `Uint8Array.fromBase64()` over `atob()`,
|
|
11208
11252
|
* `btoa()`, and `Buffer` base64 conversions.
|
|
11209
11253
|
*
|
|
11210
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11254
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-uint8array-base64.md
|
|
11211
11255
|
*/
|
|
11212
11256
|
'unicorn/prefer-uint8array-base64'?: Linter.RuleEntry<[]>;
|
|
11213
11257
|
/**
|
|
11214
11258
|
* Prefer the unary minus operator over multiplying or dividing by `-1`.
|
|
11215
11259
|
*
|
|
11216
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11260
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-unary-minus.md
|
|
11217
11261
|
*/
|
|
11218
11262
|
'unicorn/prefer-unary-minus'?: Linter.RuleEntry<[]>;
|
|
11219
11263
|
/**
|
|
11220
11264
|
* Prefer Unicode code point escapes over legacy escape sequences.
|
|
11221
11265
|
*
|
|
11222
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11266
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-unicode-code-point-escapes.md
|
|
11223
11267
|
*/
|
|
11224
11268
|
'unicorn/prefer-unicode-code-point-escapes'?: Linter.RuleEntry<[]>;
|
|
11225
11269
|
/**
|
|
11226
11270
|
* Prefer `URL.canParse()` over constructing a `URL` in a try/catch for
|
|
11227
11271
|
* validation.
|
|
11228
11272
|
*
|
|
11229
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11273
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-url-can-parse.md
|
|
11230
11274
|
*/
|
|
11231
11275
|
'unicorn/prefer-url-can-parse'?: Linter.RuleEntry<[]>;
|
|
11232
11276
|
/**
|
|
11233
11277
|
* Prefer `URL#href` over stringifying a `URL`.
|
|
11234
11278
|
*
|
|
11235
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11279
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-url-href.md
|
|
11236
11280
|
*/
|
|
11237
11281
|
'unicorn/prefer-url-href'?: Linter.RuleEntry<[]>;
|
|
11238
11282
|
/**
|
|
11239
11283
|
* Prefer `URLSearchParams` over manually splitting query strings.
|
|
11240
11284
|
*
|
|
11241
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11285
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-url-search-parameters.md
|
|
11242
11286
|
*/
|
|
11243
11287
|
'unicorn/prefer-url-search-parameters'?: Linter.RuleEntry<[]>;
|
|
11244
11288
|
/**
|
|
11245
11289
|
* Prefer putting the condition in the while statement.
|
|
11246
11290
|
*
|
|
11247
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11291
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/prefer-while-loop-condition.md
|
|
11248
11292
|
*/
|
|
11249
11293
|
'unicorn/prefer-while-loop-condition'?: Linter.RuleEntry<[]>;
|
|
11250
11294
|
/**
|
|
11251
11295
|
* Renamed to `unicorn/name-replacements`.
|
|
11252
11296
|
*
|
|
11253
11297
|
* @deprecated
|
|
11254
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11298
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/deleted-and-deprecated-rules.md#prevent-abbreviations
|
|
11255
11299
|
*/
|
|
11256
11300
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<[]>;
|
|
11257
11301
|
/**
|
|
11258
11302
|
* Enforce consistent relative URL style.
|
|
11259
11303
|
*
|
|
11260
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11304
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/relative-url-style.md
|
|
11261
11305
|
*/
|
|
11262
11306
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
11263
11307
|
/**
|
|
11264
11308
|
* Enforce using the separator argument with `Array#join()`.
|
|
11265
11309
|
*
|
|
11266
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11310
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-array-join-separator.md
|
|
11267
11311
|
*/
|
|
11268
11312
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
11269
11313
|
/**
|
|
11270
11314
|
* Require a compare function when calling `Array#sort()` or
|
|
11271
11315
|
* `Array#toSorted()`.
|
|
11272
11316
|
*
|
|
11273
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11317
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-array-sort-compare.md
|
|
11274
11318
|
*/
|
|
11275
11319
|
'unicorn/require-array-sort-compare'?: Linter.RuleEntry<[]>;
|
|
11276
11320
|
/**
|
|
11277
11321
|
* Require `CSS.escape()` for interpolated values in CSS selectors.
|
|
11278
11322
|
*
|
|
11279
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11323
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-css-escape.md
|
|
11280
11324
|
*/
|
|
11281
11325
|
'unicorn/require-css-escape'?: Linter.RuleEntry<UnicornRequireCssEscape>;
|
|
11282
11326
|
/**
|
|
11283
11327
|
* Require configured YAML frontmatter fields.
|
|
11284
11328
|
*
|
|
11285
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11329
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-frontmatter-fields.md
|
|
11286
11330
|
*/
|
|
11287
11331
|
'unicorn/require-frontmatter-fields'?: Linter.RuleEntry<UnicornRequireFrontmatterFields>;
|
|
11288
11332
|
/**
|
|
11289
11333
|
* Require non-empty module attributes for imports and exports
|
|
11290
11334
|
*
|
|
11291
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11335
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-module-attributes.md
|
|
11292
11336
|
*/
|
|
11293
11337
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
11294
11338
|
/**
|
|
11295
11339
|
* Require non-empty specifier list in import and export statements.
|
|
11296
11340
|
*
|
|
11297
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11341
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-module-specifiers.md
|
|
11298
11342
|
*/
|
|
11299
11343
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
11300
11344
|
/**
|
|
11301
11345
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
11302
11346
|
*
|
|
11303
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11347
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
11304
11348
|
*/
|
|
11305
11349
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
11306
11350
|
/**
|
|
11307
11351
|
* Require passive event listeners for high-frequency events.
|
|
11308
11352
|
*
|
|
11309
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11353
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-passive-events.md
|
|
11310
11354
|
*/
|
|
11311
11355
|
'unicorn/require-passive-events'?: Linter.RuleEntry<[]>;
|
|
11312
11356
|
/**
|
|
11313
11357
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
11314
11358
|
*
|
|
11315
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11359
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-post-message-target-origin.md
|
|
11316
11360
|
*/
|
|
11317
11361
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
11318
11362
|
/**
|
|
11319
11363
|
* Require boolean-returning Proxy traps to return booleans.
|
|
11320
11364
|
*
|
|
11321
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11365
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/require-proxy-trap-boolean-return.md
|
|
11322
11366
|
*/
|
|
11323
11367
|
'unicorn/require-proxy-trap-boolean-return'?: Linter.RuleEntry<[]>;
|
|
11368
|
+
/**
|
|
11369
|
+
* Enforce a consistent style for single-line block comments.
|
|
11370
|
+
*
|
|
11371
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/single-line-block-comment-style.md
|
|
11372
|
+
*/
|
|
11373
|
+
'unicorn/single-line-block-comment-style'?: Linter.RuleEntry<UnicornSingleLineBlockCommentStyle>;
|
|
11324
11374
|
/**
|
|
11325
11375
|
* Enforce better string content.
|
|
11326
11376
|
*
|
|
11327
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11377
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/string-content.md
|
|
11328
11378
|
*/
|
|
11329
11379
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
11330
11380
|
/**
|
|
11331
11381
|
* Enforce consistent brace style for `case` clauses.
|
|
11332
11382
|
*
|
|
11333
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11383
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/switch-case-braces.md
|
|
11334
11384
|
*/
|
|
11335
11385
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
11336
11386
|
/**
|
|
11337
11387
|
* Enforce consistent `break`/`return`/`continue`/`throw` position in `case`
|
|
11338
11388
|
* clauses.
|
|
11339
11389
|
*
|
|
11340
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11390
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/switch-case-break-position.md
|
|
11341
11391
|
*/
|
|
11342
11392
|
'unicorn/switch-case-break-position'?: Linter.RuleEntry<[]>;
|
|
11343
11393
|
/**
|
|
11344
11394
|
* Fix whitespace-insensitive template indentation.
|
|
11345
11395
|
*
|
|
11346
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11396
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/template-indent.md
|
|
11347
11397
|
*/
|
|
11348
11398
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
11349
11399
|
/**
|
|
11350
11400
|
* Enforce consistent case for text encoding identifiers.
|
|
11351
11401
|
*
|
|
11352
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11402
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/text-encoding-identifier-case.md
|
|
11353
11403
|
*/
|
|
11354
11404
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
11355
11405
|
/**
|
|
11356
11406
|
* Require `new` when creating an error.
|
|
11357
11407
|
*
|
|
11358
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11408
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/throw-new-error.md
|
|
11359
11409
|
*/
|
|
11360
11410
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
11361
11411
|
/**
|
|
11362
11412
|
* Limit the complexity of `try` blocks.
|
|
11363
11413
|
*
|
|
11364
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
11414
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v73.0.0/docs/rules/try-complexity.md
|
|
11365
11415
|
*/
|
|
11366
11416
|
'unicorn/try-complexity'?: Linter.RuleEntry<UnicornTryComplexity>;
|
|
11367
11417
|
/**
|
|
@@ -11474,6 +11524,12 @@ interface RuleOptions {
|
|
|
11474
11524
|
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/key-spacing.html
|
|
11475
11525
|
*/
|
|
11476
11526
|
'yaml/key-spacing'?: Linter.RuleEntry<YamlKeySpacing>;
|
|
11527
|
+
/**
|
|
11528
|
+
* Disallow boolean mapping keys
|
|
11529
|
+
*
|
|
11530
|
+
* @see https://ota-meshi.github.io/eslint-plugin-yml/rules/no-boolean-key.html
|
|
11531
|
+
*/
|
|
11532
|
+
'yaml/no-boolean-key'?: Linter.RuleEntry<[]>;
|
|
11477
11533
|
/**
|
|
11478
11534
|
* Disallow empty document
|
|
11479
11535
|
*
|
|
@@ -12532,12 +12588,16 @@ type JsdocCheckLineAlignment = [] | ['always' | 'never' | 'any'] | ['always' | '
|
|
|
12532
12588
|
// ----- jsdoc/check-param-names -----
|
|
12533
12589
|
type JsdocCheckParamNames = [] | [{
|
|
12534
12590
|
allowExtraTrailingParamDocs?: boolean;
|
|
12591
|
+
badParamNames?: boolean;
|
|
12592
|
+
badParamOrder?: boolean;
|
|
12535
12593
|
checkDestructured?: boolean;
|
|
12536
12594
|
checkRestProperty?: boolean;
|
|
12537
12595
|
checkTypesPattern?: string;
|
|
12538
12596
|
disableExtraPropertyReporting?: boolean;
|
|
12539
12597
|
disableMissingParamChecks?: boolean;
|
|
12598
|
+
duplicateParams?: boolean;
|
|
12540
12599
|
enableFixer?: boolean;
|
|
12600
|
+
extraParams?: boolean;
|
|
12541
12601
|
useDefaultObjectProperties?: boolean;
|
|
12542
12602
|
}];
|
|
12543
12603
|
// ----- jsdoc/check-property-names -----
|
|
@@ -13222,12 +13282,12 @@ type JsonPackageRestrictDependencyRanges = [] | [{
|
|
|
13222
13282
|
forDependencyTypes?: ('dependencies' | 'devDependencies' | 'optionalDependencies' | 'peerDependencies')[];
|
|
13223
13283
|
forPackages?: string[];
|
|
13224
13284
|
forVersions?: string;
|
|
13225
|
-
rangeType: ('caret' | 'pin' | 'tilde') | ('caret' | 'pin' | 'tilde')[];
|
|
13285
|
+
rangeType: ('^' | '~' | '<' | '<=' | '>' | '>=' | 'caret' | 'pin' | 'tilde' | 'lt' | 'le' | 'gt' | 'ge') | ('^' | '~' | '<' | '<=' | '>' | '>=' | 'caret' | 'pin' | 'tilde' | 'lt' | 'le' | 'gt' | 'ge')[];
|
|
13226
13286
|
} | {
|
|
13227
13287
|
forDependencyTypes?: ('dependencies' | 'devDependencies' | 'optionalDependencies' | 'peerDependencies')[];
|
|
13228
13288
|
forPackages?: string[];
|
|
13229
13289
|
forVersions?: string;
|
|
13230
|
-
rangeType: ('caret' | 'pin' | 'tilde') | ('caret' | 'pin' | 'tilde')[];
|
|
13290
|
+
rangeType: ('^' | '~' | '<' | '<=' | '>' | '>=' | 'caret' | 'pin' | 'tilde' | 'lt' | 'le' | 'gt' | 'ge') | ('^' | '~' | '<' | '<=' | '>' | '>=' | 'caret' | 'pin' | 'tilde' | 'lt' | 'le' | 'gt' | 'ge')[];
|
|
13231
13291
|
}[]];
|
|
13232
13292
|
// ----- json-package/restrict-private-properties -----
|
|
13233
13293
|
type JsonPackageRestrictPrivateProperties = [] | [{
|
|
@@ -13240,6 +13300,11 @@ type JsonPackageRestrictTopLevelProperties = [] | [{
|
|
|
13240
13300
|
property: string;
|
|
13241
13301
|
})[];
|
|
13242
13302
|
}];
|
|
13303
|
+
// ----- json-package/scripts-name-casing -----
|
|
13304
|
+
type JsonPackageScriptsNameCasing = [] | [{
|
|
13305
|
+
ignoreNames?: string[];
|
|
13306
|
+
ignorePatterns?: string[];
|
|
13307
|
+
}];
|
|
13243
13308
|
// ----- json-package/sort-collections -----
|
|
13244
13309
|
type JsonPackageSortCollections = [] | [(string | {
|
|
13245
13310
|
key: string;
|
|
@@ -13476,11 +13541,15 @@ type JsonSortKeys = [{
|
|
|
13476
13541
|
type?: 'asc' | 'desc';
|
|
13477
13542
|
caseSensitive?: boolean;
|
|
13478
13543
|
natural?: boolean;
|
|
13544
|
+
} | {
|
|
13545
|
+
type: 'ignore';
|
|
13479
13546
|
};
|
|
13480
13547
|
})[] | {
|
|
13481
13548
|
type?: 'asc' | 'desc';
|
|
13482
13549
|
caseSensitive?: boolean;
|
|
13483
13550
|
natural?: boolean;
|
|
13551
|
+
} | {
|
|
13552
|
+
type: 'ignore';
|
|
13484
13553
|
};
|
|
13485
13554
|
minKeys?: number;
|
|
13486
13555
|
allowLineSeparatedGroups?: boolean;
|
|
@@ -13493,11 +13562,15 @@ type JsonSortKeys = [{
|
|
|
13493
13562
|
type?: 'asc' | 'desc';
|
|
13494
13563
|
caseSensitive?: boolean;
|
|
13495
13564
|
natural?: boolean;
|
|
13565
|
+
} | {
|
|
13566
|
+
type: 'ignore';
|
|
13496
13567
|
};
|
|
13497
13568
|
})[] | {
|
|
13498
13569
|
type?: 'asc' | 'desc';
|
|
13499
13570
|
caseSensitive?: boolean;
|
|
13500
13571
|
natural?: boolean;
|
|
13572
|
+
} | {
|
|
13573
|
+
type: 'ignore';
|
|
13501
13574
|
};
|
|
13502
13575
|
minKeys?: number;
|
|
13503
13576
|
allowLineSeparatedGroups?: boolean;
|
|
@@ -14575,6 +14648,10 @@ type NoUnderscoreDangle = [] | [{
|
|
|
14575
14648
|
allowInArrayDestructuring?: boolean;
|
|
14576
14649
|
allowInObjectDestructuring?: boolean;
|
|
14577
14650
|
}];
|
|
14651
|
+
// ----- no-unmodified-loop-condition -----
|
|
14652
|
+
type NoUnmodifiedLoopCondition = [] | [{
|
|
14653
|
+
checkConditionalExpressions?: boolean;
|
|
14654
|
+
}];
|
|
14578
14655
|
// ----- no-unneeded-ternary -----
|
|
14579
14656
|
type NoUnneededTernary = [] | [{
|
|
14580
14657
|
defaultAssignment?: boolean;
|
|
@@ -14898,6 +14975,10 @@ type NodePreferGlobalUrlSearchParams = [] | ['always' | 'never'];
|
|
|
14898
14975
|
type NodePreferNodeProtocol = [] | [{
|
|
14899
14976
|
version?: string;
|
|
14900
14977
|
}];
|
|
14978
|
+
// ----- node/prefer-process-get-builtin-module -----
|
|
14979
|
+
type NodePreferProcessGetBuiltinModule = [] | [{
|
|
14980
|
+
version?: string;
|
|
14981
|
+
}];
|
|
14901
14982
|
// ----- node/shebang -----
|
|
14902
14983
|
type NodeShebang = [] | [{
|
|
14903
14984
|
convertPath?: {
|
|
@@ -20793,7 +20874,9 @@ type UnicodeBom = [] | ['always' | 'never'];
|
|
|
20793
20874
|
// ----- unicorn/catch-error-name -----
|
|
20794
20875
|
type UnicornCatchErrorName = [] | [{
|
|
20795
20876
|
name?: string;
|
|
20796
|
-
ignore?:
|
|
20877
|
+
ignore?: (string | {
|
|
20878
|
+
[k: string]: unknown | undefined;
|
|
20879
|
+
})[];
|
|
20797
20880
|
}];
|
|
20798
20881
|
// ----- unicorn/class-reference-in-static-methods -----
|
|
20799
20882
|
type UnicornClassReferenceInStaticMethods = [] | [{
|
|
@@ -20813,11 +20896,19 @@ type UnicornCommentContent = [] | [{
|
|
|
20813
20896
|
}];
|
|
20814
20897
|
// ----- unicorn/consistent-boolean-name -----
|
|
20815
20898
|
type UnicornConsistentBooleanName = [] | [{
|
|
20816
|
-
|
|
20899
|
+
checkVariables?: 'always' | 'prohibit' | 'never';
|
|
20900
|
+
checkArguments?: 'always' | 'prohibit' | 'never';
|
|
20901
|
+
checkFunctions?: 'always' | 'prohibit' | 'never';
|
|
20902
|
+
checkMethods?: 'always' | 'prohibit' | 'never';
|
|
20903
|
+
checkFields?: 'always' | 'prohibit' | 'never';
|
|
20817
20904
|
prefixes?: {
|
|
20818
20905
|
[k: string]: boolean | undefined;
|
|
20819
20906
|
};
|
|
20907
|
+
wrappers?: {
|
|
20908
|
+
[k: string]: string | undefined;
|
|
20909
|
+
};
|
|
20820
20910
|
ignore?: unknown[];
|
|
20911
|
+
[k: string]: unknown;
|
|
20821
20912
|
}];
|
|
20822
20913
|
// ----- unicorn/consistent-class-member-order -----
|
|
20823
20914
|
type UnicornConsistentClassMemberOrder = [] | [{
|
|
@@ -20851,6 +20942,7 @@ type UnicornConsistentFunctionScoping = [] | [{
|
|
|
20851
20942
|
// ----- unicorn/consistent-function-style -----
|
|
20852
20943
|
type UnicornConsistentFunctionStyle = [] | [{
|
|
20853
20944
|
default?: 'declaration' | 'function-expression' | 'arrow-function' | 'ignore';
|
|
20945
|
+
defaultExport?: 'declaration' | 'function-expression' | 'arrow-function' | 'ignore';
|
|
20854
20946
|
namedFunctions?: 'declaration' | 'function-expression' | 'arrow-function' | 'ignore';
|
|
20855
20947
|
namedExports?: 'declaration' | 'function-expression' | 'arrow-function' | 'ignore';
|
|
20856
20948
|
callbacks?: 'function-expression' | 'arrow-function' | 'ignore';
|
|
@@ -20874,7 +20966,9 @@ type UnicornEscapeCase = [] | ['uppercase' | 'lowercase'];
|
|
|
20874
20966
|
// ----- unicorn/expiring-todo-comments -----
|
|
20875
20967
|
type UnicornExpiringTodoComments = [] | [{
|
|
20876
20968
|
terms?: string[];
|
|
20877
|
-
ignore?:
|
|
20969
|
+
ignore?: (string | {
|
|
20970
|
+
[k: string]: unknown | undefined;
|
|
20971
|
+
})[];
|
|
20878
20972
|
checkDates?: boolean;
|
|
20879
20973
|
checkDatesOnPullRequests?: boolean;
|
|
20880
20974
|
allowWarningComments?: boolean;
|
|
@@ -20889,7 +20983,9 @@ type UnicornExplicitTimerDelay = [] | ['always' | 'never'];
|
|
|
20889
20983
|
// ----- unicorn/filename-case -----
|
|
20890
20984
|
type UnicornFilenameCase = [] | [{
|
|
20891
20985
|
case?: 'camelCase' | 'camelCaseWithAcronyms' | 'snakeCase' | 'kebabCase' | 'pascalCase';
|
|
20892
|
-
ignore?:
|
|
20986
|
+
ignore?: (string | {
|
|
20987
|
+
[k: string]: unknown | undefined;
|
|
20988
|
+
})[];
|
|
20893
20989
|
multipleFileExtensions?: boolean;
|
|
20894
20990
|
checkDirectories?: boolean;
|
|
20895
20991
|
} | {
|
|
@@ -20900,7 +20996,9 @@ type UnicornFilenameCase = [] | [{
|
|
|
20900
20996
|
kebabCase?: boolean;
|
|
20901
20997
|
pascalCase?: boolean;
|
|
20902
20998
|
};
|
|
20903
|
-
ignore?:
|
|
20999
|
+
ignore?: (string | {
|
|
21000
|
+
[k: string]: unknown | undefined;
|
|
21001
|
+
})[];
|
|
20904
21002
|
multipleFileExtensions?: boolean;
|
|
20905
21003
|
checkDirectories?: boolean;
|
|
20906
21004
|
}];
|
|
@@ -20937,6 +21035,8 @@ type UnicornIsolatedFunctions = [] | [{
|
|
|
20937
21035
|
selectors?: string[];
|
|
20938
21036
|
comments?: string[];
|
|
20939
21037
|
}];
|
|
21038
|
+
// ----- unicorn/iteration-fallback-style -----
|
|
21039
|
+
type UnicornIterationFallbackStyle = [] | ['guard' | 'fallback'];
|
|
20940
21040
|
// ----- unicorn/logical-assignment-operators -----
|
|
20941
21041
|
type UnicornLogicalAssignmentOperators = ([] | ['always'] | ['always', {
|
|
20942
21042
|
enforceForIfStatements?: boolean;
|
|
@@ -20957,7 +21057,9 @@ type UnicornNameReplacements = [] | [{
|
|
|
20957
21057
|
replacements?: _UnicornNameReplacements_NameReplacements;
|
|
20958
21058
|
extendDefaultAllowList?: boolean;
|
|
20959
21059
|
allowList?: _UnicornNameReplacements_BooleanObject;
|
|
20960
|
-
ignore?:
|
|
21060
|
+
ignore?: (string | {
|
|
21061
|
+
[k: string]: unknown | undefined;
|
|
21062
|
+
})[];
|
|
20961
21063
|
}];
|
|
20962
21064
|
type _UnicornNameReplacementsReplacements = (false | _UnicornNameReplacements_BooleanObject) | undefined;
|
|
20963
21065
|
interface _UnicornNameReplacements_NameReplacements {
|
|
@@ -21005,7 +21107,7 @@ type UnicornNoInvalidArgumentCount = [] | [{
|
|
|
21005
21107
|
}];
|
|
21006
21108
|
// ----- unicorn/no-keyword-prefix -----
|
|
21007
21109
|
type UnicornNoKeywordPrefix = [] | [{
|
|
21008
|
-
disallowedPrefixes?: []
|
|
21110
|
+
disallowedPrefixes?: string[];
|
|
21009
21111
|
checkProperties?: boolean;
|
|
21010
21112
|
onlyCamelCase?: boolean;
|
|
21011
21113
|
}];
|
|
@@ -21016,7 +21118,9 @@ type UnicornNoNegatedComparison = [] | [{
|
|
|
21016
21118
|
// ----- unicorn/no-non-function-verb-prefix -----
|
|
21017
21119
|
type UnicornNoNonFunctionVerbPrefix = [] | [{
|
|
21018
21120
|
verbs?: string[];
|
|
21019
|
-
ignore?:
|
|
21121
|
+
ignore?: (string | {
|
|
21122
|
+
[k: string]: unknown | undefined;
|
|
21123
|
+
})[];
|
|
21020
21124
|
}];
|
|
21021
21125
|
// ----- unicorn/no-null -----
|
|
21022
21126
|
type UnicornNoNull = [] | [{
|
|
@@ -21029,7 +21133,7 @@ type UnicornNoTypeofUndefined = [] | [{
|
|
|
21029
21133
|
}];
|
|
21030
21134
|
// ----- unicorn/no-unnecessary-polyfills -----
|
|
21031
21135
|
type UnicornNoUnnecessaryPolyfills = [] | [{
|
|
21032
|
-
targets?: string |
|
|
21136
|
+
targets?: string | string[] | {
|
|
21033
21137
|
[k: string]: unknown | undefined;
|
|
21034
21138
|
};
|
|
21035
21139
|
}];
|
|
@@ -21083,11 +21187,11 @@ type UnicornPreferArrayFind = [] | [{
|
|
|
21083
21187
|
}];
|
|
21084
21188
|
// ----- unicorn/prefer-array-flat -----
|
|
21085
21189
|
type UnicornPreferArrayFlat = [] | [{
|
|
21086
|
-
functions?:
|
|
21190
|
+
functions?: string[];
|
|
21087
21191
|
}];
|
|
21088
21192
|
// ----- unicorn/prefer-at -----
|
|
21089
21193
|
type UnicornPreferAt = [] | [{
|
|
21090
|
-
getLastElementFunctions?:
|
|
21194
|
+
getLastElementFunctions?: string[];
|
|
21091
21195
|
checkAllIndexAccess?: boolean;
|
|
21092
21196
|
}];
|
|
21093
21197
|
// ----- unicorn/prefer-continue -----
|
|
@@ -21111,6 +21215,12 @@ type UnicornPreferExplicitViewportUnits = [] | [{
|
|
|
21111
21215
|
type UnicornPreferExportFrom = [] | [{
|
|
21112
21216
|
checkUsedVariables?: boolean;
|
|
21113
21217
|
}];
|
|
21218
|
+
// ----- unicorn/prefer-https -----
|
|
21219
|
+
type UnicornPreferHttps = [] | [{
|
|
21220
|
+
ignore?: (string | {
|
|
21221
|
+
[k: string]: unknown | undefined;
|
|
21222
|
+
})[];
|
|
21223
|
+
}];
|
|
21114
21224
|
// ----- unicorn/prefer-includes-over-repeated-comparisons -----
|
|
21115
21225
|
type UnicornPreferIncludesOverRepeatedComparisons = [] | [{
|
|
21116
21226
|
minimumComparisons?: number;
|
|
@@ -21127,7 +21237,7 @@ type UnicornPreferNumberProperties = [] | [{
|
|
|
21127
21237
|
}];
|
|
21128
21238
|
// ----- unicorn/prefer-object-from-entries -----
|
|
21129
21239
|
type UnicornPreferObjectFromEntries = [] | [{
|
|
21130
|
-
functions?:
|
|
21240
|
+
functions?: string[];
|
|
21131
21241
|
}];
|
|
21132
21242
|
// ----- unicorn/prefer-query-selector -----
|
|
21133
21243
|
type UnicornPreferQuerySelector = [] | [{
|
|
@@ -21146,7 +21256,7 @@ type UnicornPreferSetHas = [] | [{
|
|
|
21146
21256
|
type UnicornPreferShortArrowMethod = [] | ['always' | 'consistent-as-needed'];
|
|
21147
21257
|
// ----- unicorn/prefer-single-call -----
|
|
21148
21258
|
type UnicornPreferSingleCall = [] | [{
|
|
21149
|
-
ignore?:
|
|
21259
|
+
ignore?: string[];
|
|
21150
21260
|
}];
|
|
21151
21261
|
// ----- unicorn/prefer-string-repeat -----
|
|
21152
21262
|
type UnicornPreferStringRepeat = [] | [{
|
|
@@ -21154,7 +21264,7 @@ type UnicornPreferStringRepeat = [] | [{
|
|
|
21154
21264
|
}];
|
|
21155
21265
|
// ----- unicorn/prefer-structured-clone -----
|
|
21156
21266
|
type UnicornPreferStructuredClone = [] | [{
|
|
21157
|
-
functions?:
|
|
21267
|
+
functions?: string[];
|
|
21158
21268
|
}];
|
|
21159
21269
|
// ----- unicorn/prefer-switch -----
|
|
21160
21270
|
type UnicornPreferSwitch = [] | [{
|
|
@@ -21179,6 +21289,12 @@ type UnicornRequireCssEscape = [] | [{
|
|
|
21179
21289
|
type UnicornRequireFrontmatterFields = [] | [{
|
|
21180
21290
|
fields?: string[];
|
|
21181
21291
|
}];
|
|
21292
|
+
// ----- unicorn/single-line-block-comment-style -----
|
|
21293
|
+
type UnicornSingleLineBlockCommentStyle = [] | ['multiline' | 'single-line'] | ['multiline' | 'single-line', {
|
|
21294
|
+
ignore?: (string | {
|
|
21295
|
+
[k: string]: unknown | undefined;
|
|
21296
|
+
})[];
|
|
21297
|
+
}];
|
|
21182
21298
|
// ----- unicorn/string-content -----
|
|
21183
21299
|
type UnicornStringContent = [] | [{
|
|
21184
21300
|
patterns?: {
|
|
@@ -21368,11 +21484,15 @@ type YamlSortKeys = [{
|
|
|
21368
21484
|
type?: 'asc' | 'desc';
|
|
21369
21485
|
caseSensitive?: boolean;
|
|
21370
21486
|
natural?: boolean;
|
|
21487
|
+
} | {
|
|
21488
|
+
type: 'ignore';
|
|
21371
21489
|
};
|
|
21372
21490
|
})[] | {
|
|
21373
21491
|
type?: 'asc' | 'desc';
|
|
21374
21492
|
caseSensitive?: boolean;
|
|
21375
21493
|
natural?: boolean;
|
|
21494
|
+
} | {
|
|
21495
|
+
type: 'ignore';
|
|
21376
21496
|
};
|
|
21377
21497
|
minKeys?: number;
|
|
21378
21498
|
allowLineSeparatedGroups?: boolean;
|
|
@@ -21385,11 +21505,15 @@ type YamlSortKeys = [{
|
|
|
21385
21505
|
type?: 'asc' | 'desc';
|
|
21386
21506
|
caseSensitive?: boolean;
|
|
21387
21507
|
natural?: boolean;
|
|
21508
|
+
} | {
|
|
21509
|
+
type: 'ignore';
|
|
21388
21510
|
};
|
|
21389
21511
|
})[] | {
|
|
21390
21512
|
type?: 'asc' | 'desc';
|
|
21391
21513
|
caseSensitive?: boolean;
|
|
21392
21514
|
natural?: boolean;
|
|
21515
|
+
} | {
|
|
21516
|
+
type: 'ignore';
|
|
21393
21517
|
};
|
|
21394
21518
|
minKeys?: number;
|
|
21395
21519
|
allowLineSeparatedGroups?: boolean;
|
|
@@ -21640,11 +21764,25 @@ declare const defaultPluginRenaming: {
|
|
|
21640
21764
|
};
|
|
21641
21765
|
type ResolvedOptions<T> = T extends boolean ? never : NonNullable<T>;
|
|
21642
21766
|
/**
|
|
21643
|
-
*
|
|
21767
|
+
* **@Kitschpatrol's Shared [ESLint](https://eslint.org/) Configuration***
|
|
21768
|
+
*
|
|
21769
|
+
* @example
|
|
21770
|
+
* import { eslintConfig } from '@kitschpatrol/eslint-config'
|
|
21771
|
+
*
|
|
21772
|
+
* export default eslintConfig(
|
|
21773
|
+
* {
|
|
21774
|
+
* // Option customizations here
|
|
21775
|
+
* },
|
|
21776
|
+
* {
|
|
21777
|
+
* // Additional flat config objects here
|
|
21778
|
+
* },
|
|
21779
|
+
* )
|
|
21644
21780
|
*
|
|
21645
21781
|
* @param options The options for generating the ESLint configurations.
|
|
21646
21782
|
* @param userConfigs The user configurations to be merged with the generated
|
|
21647
21783
|
* configurations.
|
|
21784
|
+
* @see [@kitschpatrol/eslint-config](https://github.com/kitschpatrol/shared-config/tree/main/packages/eslint-config)
|
|
21785
|
+
* @see [@kitschpatrol/shared-config](https://github.com/kitschpatrol/shared-config)*
|
|
21648
21786
|
*/
|
|
21649
21787
|
declare function eslintConfig(options?: Omit<TypedFlatConfigItem, 'files'> & OptionsConfig, ...userConfigs: Array<Awaitable<FlatConfigComposer<any, any> | Linter.Config[] | TypedFlatConfigItem | TypedFlatConfigItem[]>>): Promise<FlatConfigComposer<TypedFlatConfigItem, ConfigNames>>;
|
|
21650
21788
|
/**
|