@2digits/eslint-config 5.5.8 → 5.5.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +342 -334
- package/package.json +20 -20
package/dist/index.d.mts
CHANGED
|
@@ -3270,7 +3270,7 @@ interface RuleOptions {
|
|
|
3270
3270
|
*/
|
|
3271
3271
|
'react-extra/globals'?: Linter.RuleEntry<[]>;
|
|
3272
3272
|
/**
|
|
3273
|
-
* Validates against
|
|
3273
|
+
* Validates against passing functions that mutate captured local variables into frozen contexts such as JSX props, hook arguments, and hook return values.
|
|
3274
3274
|
* @see https://eslint-react.xyz/docs/rules/immutability
|
|
3275
3275
|
*/
|
|
3276
3276
|
'react-extra/immutability'?: Linter.RuleEntry<[]>;
|
|
@@ -3629,7 +3629,7 @@ interface RuleOptions {
|
|
|
3629
3629
|
*/
|
|
3630
3630
|
'react-extra/x-globals'?: Linter.RuleEntry<[]>;
|
|
3631
3631
|
/**
|
|
3632
|
-
* Validates against
|
|
3632
|
+
* Validates against passing functions that mutate captured local variables into frozen contexts such as JSX props, hook arguments, and hook return values.
|
|
3633
3633
|
* @see https://eslint-react.xyz/docs/rules/immutability
|
|
3634
3634
|
*/
|
|
3635
3635
|
'react-extra/x-immutability'?: Linter.RuleEntry<[]>;
|
|
@@ -7232,1670 +7232,1670 @@ interface RuleOptions {
|
|
|
7232
7232
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
|
|
7233
7233
|
/**
|
|
7234
7234
|
* Prefer better DOM traversal APIs.
|
|
7235
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7235
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/better-dom-traversing.md
|
|
7236
7236
|
*/
|
|
7237
7237
|
'unicorn/better-dom-traversing'?: Linter.RuleEntry<[]>;
|
|
7238
7238
|
/**
|
|
7239
7239
|
* Removed. Prefer `eslint-plugin-regexp`
|
|
7240
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7240
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/deleted-and-deprecated-rules.md#better-regex
|
|
7241
7241
|
* @deprecated
|
|
7242
7242
|
*/
|
|
7243
7243
|
'unicorn/better-regex'?: Linter.RuleEntry<[]>;
|
|
7244
7244
|
/**
|
|
7245
7245
|
* Enforce a specific parameter name in catch clauses.
|
|
7246
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7246
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/catch-error-name.md
|
|
7247
7247
|
*/
|
|
7248
7248
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
7249
7249
|
/**
|
|
7250
7250
|
* Enforce consistent class references in static methods.
|
|
7251
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7251
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/class-reference-in-static-methods.md
|
|
7252
7252
|
*/
|
|
7253
7253
|
'unicorn/class-reference-in-static-methods'?: Linter.RuleEntry<UnicornClassReferenceInStaticMethods>;
|
|
7254
7254
|
/**
|
|
7255
7255
|
* Enforce better comment content.
|
|
7256
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7256
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/comment-content.md
|
|
7257
7257
|
*/
|
|
7258
7258
|
'unicorn/comment-content'?: Linter.RuleEntry<UnicornCommentContent>;
|
|
7259
7259
|
/**
|
|
7260
7260
|
* Enforce consistent assertion style with `node:assert`.
|
|
7261
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7261
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/consistent-assert.md
|
|
7262
7262
|
*/
|
|
7263
7263
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
7264
7264
|
/**
|
|
7265
7265
|
* Enforce consistent naming for boolean names.
|
|
7266
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7266
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/consistent-boolean-name.md
|
|
7267
7267
|
*/
|
|
7268
7268
|
'unicorn/consistent-boolean-name'?: Linter.RuleEntry<UnicornConsistentBooleanName>;
|
|
7269
7269
|
/**
|
|
7270
7270
|
* Enforce consistent class member order.
|
|
7271
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7271
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/consistent-class-member-order.md
|
|
7272
7272
|
*/
|
|
7273
7273
|
'unicorn/consistent-class-member-order'?: Linter.RuleEntry<UnicornConsistentClassMemberOrder>;
|
|
7274
7274
|
/**
|
|
7275
7275
|
* Enforce consistent spelling of compound words in identifiers.
|
|
7276
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7276
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/consistent-compound-words.md
|
|
7277
7277
|
*/
|
|
7278
7278
|
'unicorn/consistent-compound-words'?: Linter.RuleEntry<UnicornConsistentCompoundWords>;
|
|
7279
7279
|
/**
|
|
7280
7280
|
* Enforce consistent conditional object spread style.
|
|
7281
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7281
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/consistent-conditional-object-spread.md
|
|
7282
7282
|
*/
|
|
7283
7283
|
'unicorn/consistent-conditional-object-spread'?: Linter.RuleEntry<UnicornConsistentConditionalObjectSpread>;
|
|
7284
7284
|
/**
|
|
7285
7285
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
7286
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7286
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/consistent-date-clone.md
|
|
7287
7287
|
*/
|
|
7288
7288
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
7289
7289
|
/**
|
|
7290
7290
|
* Use destructured variables over properties.
|
|
7291
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7291
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/consistent-destructuring.md
|
|
7292
7292
|
*/
|
|
7293
7293
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
7294
7294
|
/**
|
|
7295
7295
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
7296
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7296
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/consistent-empty-array-spread.md
|
|
7297
7297
|
*/
|
|
7298
7298
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
7299
7299
|
/**
|
|
7300
7300
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
7301
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7301
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/consistent-existence-index-check.md
|
|
7302
7302
|
*/
|
|
7303
7303
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
7304
7304
|
/**
|
|
7305
7305
|
* Enforce consistent decorator position on exported classes.
|
|
7306
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7306
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/consistent-export-decorator-position.md
|
|
7307
7307
|
*/
|
|
7308
7308
|
'unicorn/consistent-export-decorator-position'?: Linter.RuleEntry<UnicornConsistentExportDecoratorPosition>;
|
|
7309
7309
|
/**
|
|
7310
7310
|
* Move function definitions to the highest possible scope.
|
|
7311
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7311
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/consistent-function-scoping.md
|
|
7312
7312
|
*/
|
|
7313
7313
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
7314
7314
|
/**
|
|
7315
7315
|
* Enforce function syntax by role.
|
|
7316
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7316
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/consistent-function-style.md
|
|
7317
7317
|
*/
|
|
7318
7318
|
'unicorn/consistent-function-style'?: Linter.RuleEntry<UnicornConsistentFunctionStyle>;
|
|
7319
7319
|
/**
|
|
7320
7320
|
* Enforce consistent JSON file reads before `JSON.parse()`.
|
|
7321
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7321
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/consistent-json-file-read.md
|
|
7322
7322
|
*/
|
|
7323
7323
|
'unicorn/consistent-json-file-read'?: Linter.RuleEntry<UnicornConsistentJsonFileRead>;
|
|
7324
7324
|
/**
|
|
7325
7325
|
* Enforce consistent optional chaining for same-base member access.
|
|
7326
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7326
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/consistent-optional-chaining.md
|
|
7327
7327
|
*/
|
|
7328
7328
|
'unicorn/consistent-optional-chaining'?: Linter.RuleEntry<[]>;
|
|
7329
7329
|
/**
|
|
7330
7330
|
* Enforce consistent style for escaping `${` in template literals.
|
|
7331
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7331
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/consistent-template-literal-escape.md
|
|
7332
7332
|
*/
|
|
7333
7333
|
'unicorn/consistent-template-literal-escape'?: Linter.RuleEntry<[]>;
|
|
7334
7334
|
/**
|
|
7335
7335
|
* Enforce consistent labels on tuple type elements.
|
|
7336
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7336
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/consistent-tuple-labels.md
|
|
7337
7337
|
*/
|
|
7338
7338
|
'unicorn/consistent-tuple-labels'?: Linter.RuleEntry<[]>;
|
|
7339
7339
|
/**
|
|
7340
7340
|
* Enforce correct `Error` subclassing.
|
|
7341
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7341
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/custom-error-definition.md
|
|
7342
7342
|
*/
|
|
7343
7343
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
7344
7344
|
/**
|
|
7345
7345
|
* Enforce consistent default export declarations.
|
|
7346
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7346
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/default-export-style.md
|
|
7347
7347
|
*/
|
|
7348
7348
|
'unicorn/default-export-style'?: Linter.RuleEntry<UnicornDefaultExportStyle>;
|
|
7349
7349
|
/**
|
|
7350
7350
|
* Enforce consistent style for DOM element dataset access.
|
|
7351
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7351
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/dom-node-dataset.md
|
|
7352
7352
|
*/
|
|
7353
7353
|
'unicorn/dom-node-dataset'?: Linter.RuleEntry<UnicornDomNodeDataset>;
|
|
7354
7354
|
/**
|
|
7355
7355
|
* Enforce no spaces between braces.
|
|
7356
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7356
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/empty-brace-spaces.md
|
|
7357
7357
|
*/
|
|
7358
7358
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
7359
7359
|
/**
|
|
7360
7360
|
* Enforce passing a `message` value when creating a built-in error.
|
|
7361
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7361
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/error-message.md
|
|
7362
7362
|
*/
|
|
7363
7363
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
7364
7364
|
/**
|
|
7365
7365
|
* Require escape sequences to use uppercase or lowercase values.
|
|
7366
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7366
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/escape-case.md
|
|
7367
7367
|
*/
|
|
7368
7368
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
7369
7369
|
/**
|
|
7370
7370
|
* Add expiration conditions to TODO comments.
|
|
7371
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7371
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/expiring-todo-comments.md
|
|
7372
7372
|
*/
|
|
7373
7373
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
7374
7374
|
/**
|
|
7375
7375
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
7376
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7376
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/explicit-length-check.md
|
|
7377
7377
|
*/
|
|
7378
7378
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
7379
7379
|
/**
|
|
7380
7380
|
* Enforce or disallow explicit `delay` argument for `setTimeout()` and `setInterval()`.
|
|
7381
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7381
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/explicit-timer-delay.md
|
|
7382
7382
|
*/
|
|
7383
7383
|
'unicorn/explicit-timer-delay'?: Linter.RuleEntry<UnicornExplicitTimerDelay>;
|
|
7384
7384
|
/**
|
|
7385
7385
|
* Enforce a case style for filenames and directory names.
|
|
7386
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7386
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/filename-case.md
|
|
7387
7387
|
*/
|
|
7388
7388
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
7389
7389
|
/**
|
|
7390
7390
|
* Require identifiers to match a specified regular expression.
|
|
7391
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7391
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/id-match.md
|
|
7392
7392
|
*/
|
|
7393
7393
|
'unicorn/id-match'?: Linter.RuleEntry<UnicornIdMatch>;
|
|
7394
7394
|
/**
|
|
7395
7395
|
* Enforce specific import styles per module.
|
|
7396
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7396
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/import-style.md
|
|
7397
7397
|
*/
|
|
7398
7398
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
7399
7399
|
/**
|
|
7400
7400
|
* Prevent usage of variables from outside the scope of isolated functions.
|
|
7401
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7401
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/isolated-functions.md
|
|
7402
7402
|
*/
|
|
7403
7403
|
'unicorn/isolated-functions'?: Linter.RuleEntry<UnicornIsolatedFunctions>;
|
|
7404
7404
|
/**
|
|
7405
7405
|
* Require or disallow logical assignment operator shorthand
|
|
7406
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7406
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/logical-assignment-operators.md
|
|
7407
7407
|
*/
|
|
7408
7408
|
'unicorn/logical-assignment-operators'?: Linter.RuleEntry<UnicornLogicalAssignmentOperators>;
|
|
7409
7409
|
/**
|
|
7410
7410
|
* Limit the depth of nested calls.
|
|
7411
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7411
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/max-nested-calls.md
|
|
7412
7412
|
*/
|
|
7413
7413
|
'unicorn/max-nested-calls'?: Linter.RuleEntry<UnicornMaxNestedCalls>;
|
|
7414
7414
|
/**
|
|
7415
7415
|
* Enforce replacements for variable, property, and filenames.
|
|
7416
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7416
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/name-replacements.md
|
|
7417
7417
|
*/
|
|
7418
7418
|
'unicorn/name-replacements'?: Linter.RuleEntry<UnicornNameReplacements>;
|
|
7419
7419
|
/**
|
|
7420
7420
|
* Enforce correct use of `new` for builtin constructors.
|
|
7421
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7421
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/new-for-builtins.md
|
|
7422
7422
|
*/
|
|
7423
7423
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
7424
7424
|
/**
|
|
7425
7425
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
7426
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7426
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-abusive-eslint-disable.md
|
|
7427
7427
|
*/
|
|
7428
7428
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
7429
7429
|
/**
|
|
7430
7430
|
* Disallow recursive access to `this` within getters and setters.
|
|
7431
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7431
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-accessor-recursion.md
|
|
7432
7432
|
*/
|
|
7433
7433
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
7434
7434
|
/**
|
|
7435
7435
|
* Disallow bitwise operators where a logical operator was likely intended.
|
|
7436
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7436
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-accidental-bitwise-operator.md
|
|
7437
7437
|
*/
|
|
7438
7438
|
'unicorn/no-accidental-bitwise-operator'?: Linter.RuleEntry<[]>;
|
|
7439
7439
|
/**
|
|
7440
7440
|
* Disallow anonymous functions and classes as the default export.
|
|
7441
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7441
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-anonymous-default-export.md
|
|
7442
7442
|
*/
|
|
7443
7443
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
7444
7444
|
/**
|
|
7445
7445
|
* Prevent passing a function reference directly to iterator methods.
|
|
7446
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7446
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-array-callback-reference.md
|
|
7447
7447
|
*/
|
|
7448
7448
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<UnicornNoArrayCallbackReference>;
|
|
7449
7449
|
/**
|
|
7450
7450
|
* Disallow array accumulation with `Array#concat()` in loops.
|
|
7451
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7451
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-array-concat-in-loop.md
|
|
7452
7452
|
*/
|
|
7453
7453
|
'unicorn/no-array-concat-in-loop'?: Linter.RuleEntry<[]>;
|
|
7454
7454
|
/**
|
|
7455
7455
|
* Disallow using reference values as `Array#fill()` values.
|
|
7456
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7456
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-array-fill-with-reference-type.md
|
|
7457
7457
|
*/
|
|
7458
7458
|
'unicorn/no-array-fill-with-reference-type'?: Linter.RuleEntry<[]>;
|
|
7459
7459
|
/**
|
|
7460
7460
|
* Disallow `.fill()` after `Array.from({length: …})`.
|
|
7461
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7461
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-array-from-fill.md
|
|
7462
7462
|
*/
|
|
7463
7463
|
'unicorn/no-array-from-fill'?: Linter.RuleEntry<[]>;
|
|
7464
7464
|
/**
|
|
7465
7465
|
* Disallow front-of-array mutation.
|
|
7466
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7466
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-array-front-mutation.md
|
|
7467
7467
|
*/
|
|
7468
7468
|
'unicorn/no-array-front-mutation'?: Linter.RuleEntry<[]>;
|
|
7469
7469
|
/**
|
|
7470
7470
|
* Disallow using the `this` argument in array methods.
|
|
7471
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7471
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-array-method-this-argument.md
|
|
7472
7472
|
*/
|
|
7473
7473
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
7474
7474
|
/**
|
|
7475
7475
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
7476
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7476
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/deleted-and-deprecated-rules.md#no-array-push-push
|
|
7477
7477
|
* @deprecated
|
|
7478
7478
|
*/
|
|
7479
7479
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
7480
7480
|
/**
|
|
7481
7481
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
7482
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7482
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-array-reduce.md
|
|
7483
7483
|
*/
|
|
7484
7484
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
7485
7485
|
/**
|
|
7486
7486
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
7487
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7487
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-array-reverse.md
|
|
7488
7488
|
*/
|
|
7489
7489
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
7490
7490
|
/**
|
|
7491
7491
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
7492
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7492
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-array-sort.md
|
|
7493
7493
|
*/
|
|
7494
7494
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
7495
7495
|
/**
|
|
7496
7496
|
* Disallow sorting arrays to get the minimum or maximum value.
|
|
7497
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7497
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-array-sort-for-min-max.md
|
|
7498
7498
|
*/
|
|
7499
7499
|
'unicorn/no-array-sort-for-min-max'?: Linter.RuleEntry<[]>;
|
|
7500
7500
|
/**
|
|
7501
7501
|
* Prefer `Array#toSpliced()` over `Array#splice()`.
|
|
7502
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7502
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-array-splice.md
|
|
7503
7503
|
*/
|
|
7504
7504
|
'unicorn/no-array-splice'?: Linter.RuleEntry<[]>;
|
|
7505
7505
|
/**
|
|
7506
7506
|
* Disallow asterisk prefixes in documentation comments.
|
|
7507
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7507
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-asterisk-prefix-in-documentation-comments.md
|
|
7508
7508
|
*/
|
|
7509
7509
|
'unicorn/no-asterisk-prefix-in-documentation-comments'?: Linter.RuleEntry<[]>;
|
|
7510
7510
|
/**
|
|
7511
7511
|
* Disallow async functions as `Promise#finally()` callbacks.
|
|
7512
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7512
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-async-promise-finally.md
|
|
7513
7513
|
*/
|
|
7514
7514
|
'unicorn/no-async-promise-finally'?: Linter.RuleEntry<[]>;
|
|
7515
7515
|
/**
|
|
7516
7516
|
* Disallow member access from await expression.
|
|
7517
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7517
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-await-expression-member.md
|
|
7518
7518
|
*/
|
|
7519
7519
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
7520
7520
|
/**
|
|
7521
7521
|
* Disallow using `await` in `Promise` method parameters.
|
|
7522
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7522
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-await-in-promise-methods.md
|
|
7523
7523
|
*/
|
|
7524
7524
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
7525
7525
|
/**
|
|
7526
7526
|
* Disallow unnecessary `Blob` to `File` conversion.
|
|
7527
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7527
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-blob-to-file.md
|
|
7528
7528
|
*/
|
|
7529
7529
|
'unicorn/no-blob-to-file'?: Linter.RuleEntry<[]>;
|
|
7530
7530
|
/**
|
|
7531
7531
|
* Disallow boolean-returning sort comparators.
|
|
7532
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7532
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-boolean-sort-comparator.md
|
|
7533
7533
|
*/
|
|
7534
7534
|
'unicorn/no-boolean-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
7535
7535
|
/**
|
|
7536
7536
|
* Disallow `break` and `continue` in nested loops and switches inside loops.
|
|
7537
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7537
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-break-in-nested-loop.md
|
|
7538
7538
|
*/
|
|
7539
7539
|
'unicorn/no-break-in-nested-loop'?: Linter.RuleEntry<[]>;
|
|
7540
7540
|
/**
|
|
7541
7541
|
* Prefer drawing canvases directly instead of converting them to images.
|
|
7542
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7542
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-canvas-to-image.md
|
|
7543
7543
|
*/
|
|
7544
7544
|
'unicorn/no-canvas-to-image'?: Linter.RuleEntry<[]>;
|
|
7545
7545
|
/**
|
|
7546
7546
|
* Disallow chained comparisons such as `a < b < c`.
|
|
7547
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7547
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-chained-comparison.md
|
|
7548
7548
|
*/
|
|
7549
7549
|
'unicorn/no-chained-comparison'?: Linter.RuleEntry<[]>;
|
|
7550
7550
|
/**
|
|
7551
7551
|
* Disallow accessing `Map`, `Set`, `WeakMap`, and `WeakSet` entries with bracket notation.
|
|
7552
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7552
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-collection-bracket-access.md
|
|
7553
7553
|
*/
|
|
7554
7554
|
'unicorn/no-collection-bracket-access'?: Linter.RuleEntry<[]>;
|
|
7555
7555
|
/**
|
|
7556
7556
|
* Disallow dynamic object property existence checks.
|
|
7557
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7557
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-computed-property-existence-check.md
|
|
7558
7558
|
*/
|
|
7559
7559
|
'unicorn/no-computed-property-existence-check'?: Linter.RuleEntry<[]>;
|
|
7560
7560
|
/**
|
|
7561
7561
|
* Disallow confusing uses of `Array#{splice,toSpliced}()`.
|
|
7562
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7562
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-confusing-array-splice.md
|
|
7563
7563
|
*/
|
|
7564
7564
|
'unicorn/no-confusing-array-splice'?: Linter.RuleEntry<[]>;
|
|
7565
7565
|
/**
|
|
7566
7566
|
* Disallow confusing uses of `Array#with()`.
|
|
7567
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7567
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-confusing-array-with.md
|
|
7568
7568
|
*/
|
|
7569
7569
|
'unicorn/no-confusing-array-with'?: Linter.RuleEntry<[]>;
|
|
7570
7570
|
/**
|
|
7571
7571
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
7572
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7572
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-console-spaces.md
|
|
7573
7573
|
*/
|
|
7574
7574
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
7575
7575
|
/**
|
|
7576
7576
|
* Disallow arithmetic and bitwise operations that always evaluate to `0`.
|
|
7577
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7577
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-constant-zero-expression.md
|
|
7578
7578
|
*/
|
|
7579
7579
|
'unicorn/no-constant-zero-expression'?: Linter.RuleEntry<[]>;
|
|
7580
7580
|
/**
|
|
7581
7581
|
* Disallow declarations before conditional early exits when they are only used after the exit.
|
|
7582
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7582
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-declarations-before-early-exit.md
|
|
7583
7583
|
*/
|
|
7584
7584
|
'unicorn/no-declarations-before-early-exit'?: Linter.RuleEntry<[]>;
|
|
7585
7585
|
/**
|
|
7586
7586
|
* Do not use `document.cookie` directly.
|
|
7587
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7587
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-document-cookie.md
|
|
7588
7588
|
*/
|
|
7589
7589
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
7590
7590
|
/**
|
|
7591
7591
|
* Disallow two comparisons of the same operands that can be combined into one.
|
|
7592
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7592
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-double-comparison.md
|
|
7593
7593
|
*/
|
|
7594
7594
|
'unicorn/no-double-comparison'?: Linter.RuleEntry<[]>;
|
|
7595
7595
|
/**
|
|
7596
7596
|
* Disallow duplicate adjacent branches in if chains.
|
|
7597
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7597
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-duplicate-if-branches.md
|
|
7598
7598
|
*/
|
|
7599
7599
|
'unicorn/no-duplicate-if-branches'?: Linter.RuleEntry<[]>;
|
|
7600
7600
|
/**
|
|
7601
7601
|
* Disallow adjacent duplicate operands in logical expressions.
|
|
7602
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7602
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-duplicate-logical-operands.md
|
|
7603
7603
|
*/
|
|
7604
7604
|
'unicorn/no-duplicate-logical-operands'?: Linter.RuleEntry<[]>;
|
|
7605
7605
|
/**
|
|
7606
7606
|
* Disallow `.map()` and `.filter()` in `for…of` and `for await…of` loop headers.
|
|
7607
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7607
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-duplicate-loops.md
|
|
7608
7608
|
*/
|
|
7609
7609
|
'unicorn/no-duplicate-loops'?: Linter.RuleEntry<[]>;
|
|
7610
7610
|
/**
|
|
7611
7611
|
* Disallow duplicate values in `Set` constructor array literals.
|
|
7612
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7612
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-duplicate-set-values.md
|
|
7613
7613
|
*/
|
|
7614
7614
|
'unicorn/no-duplicate-set-values'?: Linter.RuleEntry<[]>;
|
|
7615
7615
|
/**
|
|
7616
7616
|
* Disallow empty files.
|
|
7617
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7617
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-empty-file.md
|
|
7618
7618
|
*/
|
|
7619
7619
|
'unicorn/no-empty-file'?: Linter.RuleEntry<UnicornNoEmptyFile>;
|
|
7620
7620
|
/**
|
|
7621
7621
|
* Disallow assigning to built-in error properties.
|
|
7622
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7622
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-error-property-assignment.md
|
|
7623
7623
|
*/
|
|
7624
7624
|
'unicorn/no-error-property-assignment'?: Linter.RuleEntry<[]>;
|
|
7625
7625
|
/**
|
|
7626
7626
|
* Disallow exports in scripts.
|
|
7627
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7627
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-exports-in-scripts.md
|
|
7628
7628
|
*/
|
|
7629
7629
|
'unicorn/no-exports-in-scripts'?: Linter.RuleEntry<[]>;
|
|
7630
7630
|
/**
|
|
7631
7631
|
* Prefer `for…of` over the `forEach` method.
|
|
7632
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7632
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-for-each.md
|
|
7633
7633
|
*/
|
|
7634
7634
|
'unicorn/no-for-each'?: Linter.RuleEntry<[]>;
|
|
7635
7635
|
/**
|
|
7636
7636
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
7637
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7637
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-for-loop.md
|
|
7638
7638
|
*/
|
|
7639
7639
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
7640
7640
|
/**
|
|
7641
7641
|
* Disallow assigning properties on the global object.
|
|
7642
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7642
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-global-object-property-assignment.md
|
|
7643
7643
|
*/
|
|
7644
7644
|
'unicorn/no-global-object-property-assignment'?: Linter.RuleEntry<[]>;
|
|
7645
7645
|
/**
|
|
7646
7646
|
* Replaced by `unicorn/prefer-unicode-code-point-escapes` which covers more cases.
|
|
7647
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7647
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/deleted-and-deprecated-rules.md#no-hex-escape
|
|
7648
7648
|
* @deprecated
|
|
7649
7649
|
*/
|
|
7650
7650
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
7651
7651
|
/**
|
|
7652
7652
|
* Disallow immediate mutation after variable assignment.
|
|
7653
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7653
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-immediate-mutation.md
|
|
7654
7654
|
*/
|
|
7655
7655
|
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]>;
|
|
7656
7656
|
/**
|
|
7657
7657
|
* Disallow impossible comparisons against `.length` or `.size`.
|
|
7658
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7658
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-impossible-length-comparison.md
|
|
7659
7659
|
*/
|
|
7660
7660
|
'unicorn/no-impossible-length-comparison'?: Linter.RuleEntry<[]>;
|
|
7661
7661
|
/**
|
|
7662
7662
|
* Disallow incorrect `querySelector()` and `querySelectorAll()` usage.
|
|
7663
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7663
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-incorrect-query-selector.md
|
|
7664
7664
|
*/
|
|
7665
7665
|
'unicorn/no-incorrect-query-selector'?: Linter.RuleEntry<[]>;
|
|
7666
7666
|
/**
|
|
7667
7667
|
* Disallow incorrect template literal interpolation syntax.
|
|
7668
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7668
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-incorrect-template-string-interpolation.md
|
|
7669
7669
|
*/
|
|
7670
7670
|
'unicorn/no-incorrect-template-string-interpolation'?: Linter.RuleEntry<[]>;
|
|
7671
7671
|
/**
|
|
7672
7672
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
7673
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7673
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array
|
|
7674
7674
|
* @deprecated
|
|
7675
7675
|
*/
|
|
7676
7676
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
7677
7677
|
/**
|
|
7678
7678
|
* Disallow `instanceof` with built-in objects
|
|
7679
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7679
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-instanceof-builtins.md
|
|
7680
7680
|
*/
|
|
7681
7681
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
7682
7682
|
/**
|
|
7683
7683
|
* Disallow calling functions and constructors with an invalid number of arguments.
|
|
7684
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7684
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-invalid-argument-count.md
|
|
7685
7685
|
*/
|
|
7686
7686
|
'unicorn/no-invalid-argument-count'?: Linter.RuleEntry<UnicornNoInvalidArgumentCount>;
|
|
7687
7687
|
/**
|
|
7688
7688
|
* Disallow comparing a single character from a string to a multi-character string.
|
|
7689
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7689
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-invalid-character-comparison.md
|
|
7690
7690
|
*/
|
|
7691
7691
|
'unicorn/no-invalid-character-comparison'?: Linter.RuleEntry<[]>;
|
|
7692
7692
|
/**
|
|
7693
7693
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
7694
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7694
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-invalid-fetch-options.md
|
|
7695
7695
|
*/
|
|
7696
7696
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
7697
7697
|
/**
|
|
7698
7698
|
* Disallow invalid `accept` values on file inputs.
|
|
7699
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7699
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-invalid-file-input-accept.md
|
|
7700
7700
|
*/
|
|
7701
7701
|
'unicorn/no-invalid-file-input-accept'?: Linter.RuleEntry<[]>;
|
|
7702
7702
|
/**
|
|
7703
7703
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
7704
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7704
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-invalid-remove-event-listener.md
|
|
7705
7705
|
*/
|
|
7706
7706
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
7707
7707
|
/**
|
|
7708
7708
|
* Disallow invalid implementations of well-known symbol methods.
|
|
7709
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7709
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-invalid-well-known-symbol-methods.md
|
|
7710
7710
|
*/
|
|
7711
7711
|
'unicorn/no-invalid-well-known-symbol-methods'?: Linter.RuleEntry<[]>;
|
|
7712
7712
|
/**
|
|
7713
7713
|
* Disallow identifiers starting with `new` or `class`.
|
|
7714
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7714
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-keyword-prefix.md
|
|
7715
7715
|
*/
|
|
7716
7716
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
7717
7717
|
/**
|
|
7718
7718
|
* Disallow accessing `event.currentTarget` after the synchronous event dispatch has finished.
|
|
7719
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7719
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-late-current-target-access.md
|
|
7720
7720
|
*/
|
|
7721
7721
|
'unicorn/no-late-current-target-access'?: Linter.RuleEntry<[]>;
|
|
7722
7722
|
/**
|
|
7723
7723
|
* Disallow event-control method calls after the synchronous event dispatch has finished.
|
|
7724
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7724
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-late-event-control.md
|
|
7725
7725
|
*/
|
|
7726
7726
|
'unicorn/no-late-event-control'?: Linter.RuleEntry<[]>;
|
|
7727
7727
|
/**
|
|
7728
7728
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
7729
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7729
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
|
|
7730
7730
|
* @deprecated
|
|
7731
7731
|
*/
|
|
7732
7732
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
7733
7733
|
/**
|
|
7734
7734
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
7735
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7735
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-lonely-if.md
|
|
7736
7736
|
*/
|
|
7737
7737
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
7738
7738
|
/**
|
|
7739
7739
|
* Disallow mutating a loop iterable during iteration.
|
|
7740
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7740
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-loop-iterable-mutation.md
|
|
7741
7741
|
*/
|
|
7742
7742
|
'unicorn/no-loop-iterable-mutation'?: Linter.RuleEntry<[]>;
|
|
7743
7743
|
/**
|
|
7744
7744
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
7745
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7745
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-magic-array-flat-depth.md
|
|
7746
7746
|
*/
|
|
7747
7747
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
7748
7748
|
/**
|
|
7749
7749
|
* Disallow manually wrapped comments.
|
|
7750
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7750
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-manually-wrapped-comments.md
|
|
7751
7751
|
*/
|
|
7752
7752
|
'unicorn/no-manually-wrapped-comments'?: Linter.RuleEntry<[]>;
|
|
7753
7753
|
/**
|
|
7754
7754
|
* Disallow checking a Map key before accessing a different key.
|
|
7755
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7755
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-mismatched-map-key.md
|
|
7756
7756
|
*/
|
|
7757
7757
|
'unicorn/no-mismatched-map-key'?: Linter.RuleEntry<[]>;
|
|
7758
7758
|
/**
|
|
7759
7759
|
* Disallow misrefactored compound assignments where the target is duplicated in the right-hand side.
|
|
7760
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7760
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-misrefactored-assignment.md
|
|
7761
7761
|
*/
|
|
7762
7762
|
'unicorn/no-misrefactored-assignment'?: Linter.RuleEntry<[]>;
|
|
7763
7763
|
/**
|
|
7764
7764
|
* Disallow named usage of default import and export.
|
|
7765
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7765
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-named-default.md
|
|
7766
7766
|
*/
|
|
7767
7767
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
7768
7768
|
/**
|
|
7769
7769
|
* Disallow negated array predicate calls.
|
|
7770
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7770
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-negated-array-predicate.md
|
|
7771
7771
|
*/
|
|
7772
7772
|
'unicorn/no-negated-array-predicate'?: Linter.RuleEntry<[]>;
|
|
7773
7773
|
/**
|
|
7774
7774
|
* Disallow negated comparisons.
|
|
7775
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7775
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-negated-comparison.md
|
|
7776
7776
|
*/
|
|
7777
7777
|
'unicorn/no-negated-comparison'?: Linter.RuleEntry<UnicornNoNegatedComparison>;
|
|
7778
7778
|
/**
|
|
7779
7779
|
* Disallow negated conditions.
|
|
7780
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7780
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-negated-condition.md
|
|
7781
7781
|
*/
|
|
7782
7782
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
7783
7783
|
/**
|
|
7784
7784
|
* Disallow negated expression in equality check.
|
|
7785
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7785
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-negation-in-equality-check.md
|
|
7786
7786
|
*/
|
|
7787
7787
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
7788
7788
|
/**
|
|
7789
7789
|
* Disallow nested ternary expressions.
|
|
7790
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7790
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-nested-ternary.md
|
|
7791
7791
|
*/
|
|
7792
7792
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
7793
7793
|
/**
|
|
7794
7794
|
* Disallow `new Array()`.
|
|
7795
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7795
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-new-array.md
|
|
7796
7796
|
*/
|
|
7797
7797
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
7798
7798
|
/**
|
|
7799
7799
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
7800
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7800
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-new-buffer.md
|
|
7801
7801
|
*/
|
|
7802
7802
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
7803
7803
|
/**
|
|
7804
7804
|
* Disallow non-function values with function-style verb prefixes.
|
|
7805
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7805
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-non-function-verb-prefix.md
|
|
7806
7806
|
*/
|
|
7807
7807
|
'unicorn/no-non-function-verb-prefix'?: Linter.RuleEntry<UnicornNoNonFunctionVerbPrefix>;
|
|
7808
7808
|
/**
|
|
7809
7809
|
* Disallow non-standard properties on built-in objects.
|
|
7810
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7810
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-nonstandard-builtin-properties.md
|
|
7811
7811
|
*/
|
|
7812
7812
|
'unicorn/no-nonstandard-builtin-properties'?: Linter.RuleEntry<[]>;
|
|
7813
7813
|
/**
|
|
7814
7814
|
* Disallow the use of the `null` literal.
|
|
7815
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7815
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-null.md
|
|
7816
7816
|
*/
|
|
7817
7817
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
7818
7818
|
/**
|
|
7819
7819
|
* Disallow the use of objects as default parameters.
|
|
7820
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7820
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-object-as-default-parameter.md
|
|
7821
7821
|
*/
|
|
7822
7822
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
7823
7823
|
/**
|
|
7824
7824
|
* Disallow `Object` methods with `Map` or `Set`.
|
|
7825
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7825
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-object-methods-with-collections.md
|
|
7826
7826
|
*/
|
|
7827
7827
|
'unicorn/no-object-methods-with-collections'?: Linter.RuleEntry<[]>;
|
|
7828
7828
|
/**
|
|
7829
7829
|
* Disallow optional chaining on undeclared variables.
|
|
7830
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7830
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-optional-chaining-on-undeclared-variable.md
|
|
7831
7831
|
*/
|
|
7832
7832
|
'unicorn/no-optional-chaining-on-undeclared-variable'?: Linter.RuleEntry<[]>;
|
|
7833
7833
|
/**
|
|
7834
7834
|
* Disallow `process.exit()`.
|
|
7835
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7835
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-process-exit.md
|
|
7836
7836
|
*/
|
|
7837
7837
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
7838
7838
|
/**
|
|
7839
7839
|
* Disallow comparisons made redundant by an equality check in the same logical AND.
|
|
7840
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7840
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-redundant-comparison.md
|
|
7841
7841
|
*/
|
|
7842
7842
|
'unicorn/no-redundant-comparison'?: Linter.RuleEntry<[]>;
|
|
7843
7843
|
/**
|
|
7844
7844
|
* Disallow using the return value of `Array#push()` and `Array#unshift()`.
|
|
7845
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7845
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-return-array-push.md
|
|
7846
7846
|
*/
|
|
7847
7847
|
'unicorn/no-return-array-push'?: Linter.RuleEntry<[]>;
|
|
7848
7848
|
/**
|
|
7849
7849
|
* Disallow selector syntax in DOM names.
|
|
7850
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7850
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-selector-as-dom-name.md
|
|
7851
7851
|
*/
|
|
7852
7852
|
'unicorn/no-selector-as-dom-name'?: Linter.RuleEntry<[]>;
|
|
7853
7853
|
/**
|
|
7854
7854
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
7855
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7855
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
7856
7856
|
*/
|
|
7857
7857
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
7858
7858
|
/**
|
|
7859
7859
|
* Disallow classes that only have static members.
|
|
7860
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7860
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-static-only-class.md
|
|
7861
7861
|
*/
|
|
7862
7862
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
7863
7863
|
/**
|
|
7864
7864
|
* Prefer comparing values directly over subtracting and comparing to `0`.
|
|
7865
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7865
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-subtraction-comparison.md
|
|
7866
7866
|
*/
|
|
7867
7867
|
'unicorn/no-subtraction-comparison'?: Linter.RuleEntry<[]>;
|
|
7868
7868
|
/**
|
|
7869
7869
|
* Disallow `then` property.
|
|
7870
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7870
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-thenable.md
|
|
7871
7871
|
*/
|
|
7872
7872
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
7873
7873
|
/**
|
|
7874
7874
|
* Disallow assigning `this` to a variable.
|
|
7875
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7875
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-this-assignment.md
|
|
7876
7876
|
*/
|
|
7877
7877
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
7878
7878
|
/**
|
|
7879
7879
|
* Disallow `this` outside of classes.
|
|
7880
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7880
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-this-outside-of-class.md
|
|
7881
7881
|
*/
|
|
7882
7882
|
'unicorn/no-this-outside-of-class'?: Linter.RuleEntry<[]>;
|
|
7883
7883
|
/**
|
|
7884
7884
|
* Disallow assigning to top-level variables from inside functions.
|
|
7885
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7885
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-top-level-assignment-in-function.md
|
|
7886
7886
|
*/
|
|
7887
7887
|
'unicorn/no-top-level-assignment-in-function'?: Linter.RuleEntry<[]>;
|
|
7888
7888
|
/**
|
|
7889
7889
|
* Disallow top-level side effects in exported modules.
|
|
7890
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7890
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-top-level-side-effects.md
|
|
7891
7891
|
*/
|
|
7892
7892
|
'unicorn/no-top-level-side-effects'?: Linter.RuleEntry<[]>;
|
|
7893
7893
|
/**
|
|
7894
7894
|
* Disallow comparing `undefined` using `typeof`.
|
|
7895
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7895
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-typeof-undefined.md
|
|
7896
7896
|
*/
|
|
7897
7897
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
7898
7898
|
/**
|
|
7899
7899
|
* Disallow referencing methods without calling them.
|
|
7900
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7900
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-uncalled-method.md
|
|
7901
7901
|
*/
|
|
7902
7902
|
'unicorn/no-uncalled-method'?: Linter.RuleEntry<[]>;
|
|
7903
7903
|
/**
|
|
7904
7904
|
* Require class members to be declared.
|
|
7905
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7905
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-undeclared-class-members.md
|
|
7906
7906
|
*/
|
|
7907
7907
|
'unicorn/no-undeclared-class-members'?: Linter.RuleEntry<[]>;
|
|
7908
7908
|
/**
|
|
7909
7909
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
7910
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7910
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
7911
7911
|
*/
|
|
7912
7912
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
7913
7913
|
/**
|
|
7914
7914
|
* Disallow `Array#flatMap()` callbacks that only wrap a single item.
|
|
7915
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7915
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unnecessary-array-flat-map.md
|
|
7916
7916
|
*/
|
|
7917
7917
|
'unicorn/no-unnecessary-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
7918
7918
|
/**
|
|
7919
7919
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
7920
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7920
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
7921
7921
|
*/
|
|
7922
7922
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
7923
7923
|
/**
|
|
7924
7924
|
* Disallow awaiting non-promise values.
|
|
7925
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7925
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unnecessary-await.md
|
|
7926
7926
|
*/
|
|
7927
7927
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
7928
7928
|
/**
|
|
7929
7929
|
* Disallow unnecessary comparisons against boolean literals.
|
|
7930
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7930
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unnecessary-boolean-comparison.md
|
|
7931
7931
|
*/
|
|
7932
7932
|
'unicorn/no-unnecessary-boolean-comparison'?: Linter.RuleEntry<[]>;
|
|
7933
7933
|
/**
|
|
7934
7934
|
* Disallow unnecessary options in `fetch()` and `new Request()`.
|
|
7935
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7935
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unnecessary-fetch-options.md
|
|
7936
7936
|
*/
|
|
7937
7937
|
'unicorn/no-unnecessary-fetch-options'?: Linter.RuleEntry<[]>;
|
|
7938
7938
|
/**
|
|
7939
7939
|
* Disallow unnecessary `globalThis` references.
|
|
7940
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7940
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unnecessary-global-this.md
|
|
7941
7941
|
*/
|
|
7942
7942
|
'unicorn/no-unnecessary-global-this'?: Linter.RuleEntry<[]>;
|
|
7943
7943
|
/**
|
|
7944
7944
|
* Disallow unnecessary nested ternary expressions.
|
|
7945
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7945
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unnecessary-nested-ternary.md
|
|
7946
7946
|
*/
|
|
7947
7947
|
'unicorn/no-unnecessary-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
7948
7948
|
/**
|
|
7949
7949
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
7950
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7950
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unnecessary-polyfills.md
|
|
7951
7951
|
*/
|
|
7952
7952
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
7953
7953
|
/**
|
|
7954
7954
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
7955
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7955
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unnecessary-slice-end.md
|
|
7956
7956
|
*/
|
|
7957
7957
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
7958
7958
|
/**
|
|
7959
7959
|
* Disallow `Array#splice()` when simpler alternatives exist.
|
|
7960
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7960
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unnecessary-splice.md
|
|
7961
7961
|
*/
|
|
7962
7962
|
'unicorn/no-unnecessary-splice'?: Linter.RuleEntry<[]>;
|
|
7963
7963
|
/**
|
|
7964
7964
|
* Disallow unreadable array destructuring.
|
|
7965
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7965
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unreadable-array-destructuring.md
|
|
7966
7966
|
*/
|
|
7967
7967
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<UnicornNoUnreadableArrayDestructuring>;
|
|
7968
7968
|
/**
|
|
7969
7969
|
* Disallow unreadable iterable expressions in `for…of` and `for await…of` loop headers.
|
|
7970
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7970
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unreadable-for-of-expression.md
|
|
7971
7971
|
*/
|
|
7972
7972
|
'unicorn/no-unreadable-for-of-expression'?: Linter.RuleEntry<[]>;
|
|
7973
7973
|
/**
|
|
7974
7974
|
* Disallow unreadable IIFEs.
|
|
7975
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7975
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unreadable-iife.md
|
|
7976
7976
|
*/
|
|
7977
7977
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
7978
7978
|
/**
|
|
7979
7979
|
* Disallow unreadable `new` expressions.
|
|
7980
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7980
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unreadable-new-expression.md
|
|
7981
7981
|
*/
|
|
7982
7982
|
'unicorn/no-unreadable-new-expression'?: Linter.RuleEntry<[]>;
|
|
7983
7983
|
/**
|
|
7984
7984
|
* Disallow unreadable object destructuring.
|
|
7985
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7985
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unreadable-object-destructuring.md
|
|
7986
7986
|
*/
|
|
7987
7987
|
'unicorn/no-unreadable-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
7988
7988
|
/**
|
|
7989
7989
|
* Prevent unsafe use of ArrayBuffer view `.buffer`.
|
|
7990
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7990
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unsafe-buffer-conversion.md
|
|
7991
7991
|
*/
|
|
7992
7992
|
'unicorn/no-unsafe-buffer-conversion'?: Linter.RuleEntry<[]>;
|
|
7993
7993
|
/**
|
|
7994
7994
|
* Disallow unsafe DOM HTML APIs.
|
|
7995
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7995
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unsafe-dom-html.md
|
|
7996
7996
|
*/
|
|
7997
7997
|
'unicorn/no-unsafe-dom-html'?: Linter.RuleEntry<[]>;
|
|
7998
7998
|
/**
|
|
7999
7999
|
* Disallow reading `.value` from `Promise.allSettled()` results without a fulfilled status guard.
|
|
8000
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8000
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unsafe-promise-all-settled-values.md
|
|
8001
8001
|
*/
|
|
8002
8002
|
'unicorn/no-unsafe-promise-all-settled-values'?: Linter.RuleEntry<[]>;
|
|
8003
8003
|
/**
|
|
8004
8004
|
* Disallow unsafe values as property keys.
|
|
8005
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8005
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unsafe-property-key.md
|
|
8006
8006
|
*/
|
|
8007
8007
|
'unicorn/no-unsafe-property-key'?: Linter.RuleEntry<[]>;
|
|
8008
8008
|
/**
|
|
8009
8009
|
* Disallow non-literal replacement values in `String#replace()` and `String#replaceAll()`.
|
|
8010
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8010
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unsafe-string-replacement.md
|
|
8011
8011
|
*/
|
|
8012
8012
|
'unicorn/no-unsafe-string-replacement'?: Linter.RuleEntry<[]>;
|
|
8013
8013
|
/**
|
|
8014
8014
|
* Disallow ignoring the return value of selected array methods.
|
|
8015
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8015
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unused-array-method-return.md
|
|
8016
8016
|
*/
|
|
8017
8017
|
'unicorn/no-unused-array-method-return'?: Linter.RuleEntry<[]>;
|
|
8018
8018
|
/**
|
|
8019
8019
|
* Disallow unused object properties.
|
|
8020
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8020
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unused-properties.md
|
|
8021
8021
|
*/
|
|
8022
8022
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
8023
8023
|
/**
|
|
8024
8024
|
* Disallow unnecessary `Boolean()` casts in array predicate callbacks.
|
|
8025
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8025
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-boolean-cast.md
|
|
8026
8026
|
*/
|
|
8027
8027
|
'unicorn/no-useless-boolean-cast'?: Linter.RuleEntry<[]>;
|
|
8028
8028
|
/**
|
|
8029
8029
|
* Disallow useless type coercions of values that are already of the target type.
|
|
8030
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8030
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-coercion.md
|
|
8031
8031
|
*/
|
|
8032
8032
|
'unicorn/no-useless-coercion'?: Linter.RuleEntry<[]>;
|
|
8033
8033
|
/**
|
|
8034
8034
|
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
8035
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8035
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-collection-argument.md
|
|
8036
8036
|
*/
|
|
8037
8037
|
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
|
|
8038
8038
|
/**
|
|
8039
8039
|
* Disallow useless compound assignments such as `x += 0`.
|
|
8040
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8040
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-compound-assignment.md
|
|
8041
8041
|
*/
|
|
8042
8042
|
'unicorn/no-useless-compound-assignment'?: Linter.RuleEntry<[]>;
|
|
8043
8043
|
/**
|
|
8044
8044
|
* Disallow useless concatenation of literals.
|
|
8045
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8045
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-concat.md
|
|
8046
8046
|
*/
|
|
8047
8047
|
'unicorn/no-useless-concat'?: Linter.RuleEntry<[]>;
|
|
8048
8048
|
/**
|
|
8049
8049
|
* Disallow useless `continue` statements.
|
|
8050
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8050
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-continue.md
|
|
8051
8051
|
*/
|
|
8052
8052
|
'unicorn/no-useless-continue'?: Linter.RuleEntry<[]>;
|
|
8053
8053
|
/**
|
|
8054
8054
|
* Disallow unnecessary existence checks before deletion.
|
|
8055
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8055
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-delete-check.md
|
|
8056
8056
|
*/
|
|
8057
8057
|
'unicorn/no-useless-delete-check'?: Linter.RuleEntry<[]>;
|
|
8058
8058
|
/**
|
|
8059
8059
|
* Disallow `else` after a statement that exits.
|
|
8060
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8060
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-else.md
|
|
8061
8061
|
*/
|
|
8062
8062
|
'unicorn/no-useless-else'?: Linter.RuleEntry<[]>;
|
|
8063
8063
|
/**
|
|
8064
8064
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
8065
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8065
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
8066
8066
|
*/
|
|
8067
8067
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
8068
8068
|
/**
|
|
8069
8069
|
* Disallow useless fallback when spreading in object literals.
|
|
8070
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8070
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-fallback-in-spread.md
|
|
8071
8071
|
*/
|
|
8072
8072
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
8073
8073
|
/**
|
|
8074
8074
|
* Disallow unnecessary `.toArray()` on iterators.
|
|
8075
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8075
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-iterator-to-array.md
|
|
8076
8076
|
*/
|
|
8077
8077
|
'unicorn/no-useless-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
8078
8078
|
/**
|
|
8079
8079
|
* Disallow useless array length check.
|
|
8080
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8080
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-length-check.md
|
|
8081
8081
|
*/
|
|
8082
8082
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
8083
8083
|
/**
|
|
8084
8084
|
* Disallow unnecessary operands in logical expressions involving boolean literals.
|
|
8085
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8085
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-logical-operand.md
|
|
8086
8086
|
*/
|
|
8087
8087
|
'unicorn/no-useless-logical-operand'?: Linter.RuleEntry<[]>;
|
|
8088
8088
|
/**
|
|
8089
8089
|
* Disallow useless overrides of class methods.
|
|
8090
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8090
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-override.md
|
|
8091
8091
|
*/
|
|
8092
8092
|
'unicorn/no-useless-override'?: Linter.RuleEntry<[]>;
|
|
8093
8093
|
/**
|
|
8094
8094
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
8095
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8095
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
8096
8096
|
*/
|
|
8097
8097
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
8098
8098
|
/**
|
|
8099
8099
|
* Disallow simple recursive function calls that can be replaced with a loop.
|
|
8100
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8100
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-recursion.md
|
|
8101
8101
|
*/
|
|
8102
8102
|
'unicorn/no-useless-recursion'?: Linter.RuleEntry<[]>;
|
|
8103
8103
|
/**
|
|
8104
8104
|
* Disallow unnecessary spread.
|
|
8105
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8105
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-spread.md
|
|
8106
8106
|
*/
|
|
8107
8107
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
8108
8108
|
/**
|
|
8109
8109
|
* Disallow useless case in switch statements.
|
|
8110
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8110
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-switch-case.md
|
|
8111
8111
|
*/
|
|
8112
8112
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
8113
8113
|
/**
|
|
8114
8114
|
* Disallow useless template literal expressions.
|
|
8115
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8115
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-template-literals.md
|
|
8116
8116
|
*/
|
|
8117
8117
|
'unicorn/no-useless-template-literals'?: Linter.RuleEntry<[]>;
|
|
8118
8118
|
/**
|
|
8119
8119
|
* Disallow useless `undefined`.
|
|
8120
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8120
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-undefined.md
|
|
8121
8121
|
*/
|
|
8122
8122
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
8123
8123
|
/**
|
|
8124
8124
|
* Disallow the bitwise XOR operator where exponentiation was likely intended.
|
|
8125
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8125
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-xor-as-exponentiation.md
|
|
8126
8126
|
*/
|
|
8127
8127
|
'unicorn/no-xor-as-exponentiation'?: Linter.RuleEntry<[]>;
|
|
8128
8128
|
/**
|
|
8129
8129
|
* Disallow number literals with zero fractions or dangling dots.
|
|
8130
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8130
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-zero-fractions.md
|
|
8131
8131
|
*/
|
|
8132
8132
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
8133
8133
|
/**
|
|
8134
8134
|
* Enforce proper case for numeric literals.
|
|
8135
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8135
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/number-literal-case.md
|
|
8136
8136
|
*/
|
|
8137
8137
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
8138
8138
|
/**
|
|
8139
8139
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
8140
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8140
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/numeric-separators-style.md
|
|
8141
8141
|
*/
|
|
8142
8142
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
8143
8143
|
/**
|
|
8144
8144
|
* Require assignment operator shorthand where possible.
|
|
8145
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8145
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/operator-assignment.md
|
|
8146
8146
|
*/
|
|
8147
8147
|
'unicorn/operator-assignment'?: Linter.RuleEntry<UnicornOperatorAssignment>;
|
|
8148
8148
|
/**
|
|
8149
8149
|
* Prefer `AbortSignal.any()` over manually forwarding abort events between signals.
|
|
8150
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8150
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-abort-signal-any.md
|
|
8151
8151
|
*/
|
|
8152
8152
|
'unicorn/prefer-abort-signal-any'?: Linter.RuleEntry<[]>;
|
|
8153
8153
|
/**
|
|
8154
8154
|
* Prefer `AbortSignal.timeout()` over manually aborting an `AbortController` with `setTimeout()`.
|
|
8155
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8155
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-abort-signal-timeout.md
|
|
8156
8156
|
*/
|
|
8157
8157
|
'unicorn/prefer-abort-signal-timeout'?: Linter.RuleEntry<[]>;
|
|
8158
8158
|
/**
|
|
8159
8159
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
8160
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8160
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-add-event-listener.md
|
|
8161
8161
|
*/
|
|
8162
8162
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
8163
8163
|
/**
|
|
8164
8164
|
* Prefer an options object over a boolean in `.addEventListener()`.
|
|
8165
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8165
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-add-event-listener-options.md
|
|
8166
8166
|
*/
|
|
8167
8167
|
'unicorn/prefer-add-event-listener-options'?: Linter.RuleEntry<[]>;
|
|
8168
8168
|
/**
|
|
8169
8169
|
* Prefer `AggregateError` when throwing collected errors.
|
|
8170
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8170
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-aggregate-error.md
|
|
8171
8171
|
*/
|
|
8172
8172
|
'unicorn/prefer-aggregate-error'?: Linter.RuleEntry<[]>;
|
|
8173
8173
|
/**
|
|
8174
8174
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
8175
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8175
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-array-find.md
|
|
8176
8176
|
*/
|
|
8177
8177
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
8178
8178
|
/**
|
|
8179
8179
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
8180
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8180
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-array-flat.md
|
|
8181
8181
|
*/
|
|
8182
8182
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
8183
8183
|
/**
|
|
8184
8184
|
* Prefer `.flatMap(…)` over `.map(…).flat()` and `.filter(…).flatMap(…)`.
|
|
8185
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8185
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-array-flat-map.md
|
|
8186
8186
|
*/
|
|
8187
8187
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
8188
8188
|
/**
|
|
8189
8189
|
* Prefer `Array.fromAsync()` over `for await…of` array accumulation.
|
|
8190
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8190
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-array-from-async.md
|
|
8191
8191
|
*/
|
|
8192
8192
|
'unicorn/prefer-array-from-async'?: Linter.RuleEntry<[]>;
|
|
8193
8193
|
/**
|
|
8194
8194
|
* Prefer using the `Array.from()` mapping function argument.
|
|
8195
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8195
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-array-from-map.md
|
|
8196
8196
|
*/
|
|
8197
8197
|
'unicorn/prefer-array-from-map'?: Linter.RuleEntry<[]>;
|
|
8198
8198
|
/**
|
|
8199
8199
|
* Prefer `Array.from({length}, …)` when creating range arrays.
|
|
8200
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8200
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-array-from-range.md
|
|
8201
8201
|
*/
|
|
8202
8202
|
'unicorn/prefer-array-from-range'?: Linter.RuleEntry<[]>;
|
|
8203
8203
|
/**
|
|
8204
8204
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
8205
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8205
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-array-index-of.md
|
|
8206
8206
|
*/
|
|
8207
8207
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
8208
8208
|
/**
|
|
8209
8209
|
* Prefer iterating an array directly or with `Array#keys()` over `Array#entries()` when the index or value is unused.
|
|
8210
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8210
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-array-iterable-methods.md
|
|
8211
8211
|
*/
|
|
8212
8212
|
'unicorn/prefer-array-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
8213
8213
|
/**
|
|
8214
8214
|
* Prefer last-oriented array methods over `Array#reverse()` or `Array#toReversed()` followed by a method.
|
|
8215
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8215
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-array-last-methods.md
|
|
8216
8216
|
*/
|
|
8217
8217
|
'unicorn/prefer-array-last-methods'?: Linter.RuleEntry<[]>;
|
|
8218
8218
|
/**
|
|
8219
8219
|
* Prefer `Array#slice()` over `Array#splice()` when reading from the returned array.
|
|
8220
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8220
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-array-slice.md
|
|
8221
8221
|
*/
|
|
8222
8222
|
'unicorn/prefer-array-slice'?: Linter.RuleEntry<[]>;
|
|
8223
8223
|
/**
|
|
8224
8224
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
8225
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8225
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-array-some.md
|
|
8226
8226
|
*/
|
|
8227
8227
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
8228
8228
|
/**
|
|
8229
8229
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
8230
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8230
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-at.md
|
|
8231
8231
|
*/
|
|
8232
8232
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
8233
8233
|
/**
|
|
8234
8234
|
* Prefer `await` over promise chaining.
|
|
8235
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8235
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-await.md
|
|
8236
8236
|
*/
|
|
8237
8237
|
'unicorn/prefer-await'?: Linter.RuleEntry<[]>;
|
|
8238
8238
|
/**
|
|
8239
8239
|
* Prefer `BigInt` literals over the constructor.
|
|
8240
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8240
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-bigint-literals.md
|
|
8241
8241
|
*/
|
|
8242
8242
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
8243
8243
|
/**
|
|
8244
8244
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
8245
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8245
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-blob-reading-methods.md
|
|
8246
8246
|
*/
|
|
8247
8247
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
8248
8248
|
/**
|
|
8249
8249
|
* Prefer block statements over IIFEs used only for scoping.
|
|
8250
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8250
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-block-statement-over-iife.md
|
|
8251
8251
|
*/
|
|
8252
8252
|
'unicorn/prefer-block-statement-over-iife'?: Linter.RuleEntry<[]>;
|
|
8253
8253
|
/**
|
|
8254
8254
|
* Prefer directly returning boolean expressions over `if` statements.
|
|
8255
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8255
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-boolean-return.md
|
|
8256
8256
|
*/
|
|
8257
8257
|
'unicorn/prefer-boolean-return'?: Linter.RuleEntry<[]>;
|
|
8258
8258
|
/**
|
|
8259
8259
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
8260
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8260
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-class-fields.md
|
|
8261
8261
|
*/
|
|
8262
8262
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
8263
8263
|
/**
|
|
8264
8264
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
8265
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8265
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-classlist-toggle.md
|
|
8266
8266
|
*/
|
|
8267
8267
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
8268
8268
|
/**
|
|
8269
8269
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
8270
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8270
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-code-point.md
|
|
8271
8271
|
*/
|
|
8272
8272
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
8273
8273
|
/**
|
|
8274
8274
|
* Prefer early continues over whole-loop conditional wrapping.
|
|
8275
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8275
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-continue.md
|
|
8276
8276
|
*/
|
|
8277
8277
|
'unicorn/prefer-continue'?: Linter.RuleEntry<UnicornPreferContinue>;
|
|
8278
8278
|
/**
|
|
8279
8279
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
8280
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8280
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-date-now.md
|
|
8281
8281
|
*/
|
|
8282
8282
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
8283
8283
|
/**
|
|
8284
8284
|
* Prefer default parameters over reassignment.
|
|
8285
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8285
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-default-parameters.md
|
|
8286
8286
|
*/
|
|
8287
8287
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
8288
8288
|
/**
|
|
8289
8289
|
* Prefer direct iteration over default iterator method calls.
|
|
8290
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8290
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-direct-iteration.md
|
|
8291
8291
|
*/
|
|
8292
8292
|
'unicorn/prefer-direct-iteration'?: Linter.RuleEntry<[]>;
|
|
8293
8293
|
/**
|
|
8294
8294
|
* Prefer using `using`/`await using` over manual `try`/`finally` resource disposal.
|
|
8295
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8295
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-dispose.md
|
|
8296
8296
|
*/
|
|
8297
8297
|
'unicorn/prefer-dispose'?: Linter.RuleEntry<[]>;
|
|
8298
8298
|
/**
|
|
8299
8299
|
* Prefer `Element#append()` over `Node#appendChild()`.
|
|
8300
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8300
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-dom-node-append.md
|
|
8301
8301
|
*/
|
|
8302
8302
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
8303
8303
|
/**
|
|
8304
8304
|
* Renamed to `unicorn/dom-node-dataset`.
|
|
8305
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8305
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/deleted-and-deprecated-rules.md#prefer-dom-node-dataset
|
|
8306
8306
|
* @deprecated
|
|
8307
8307
|
*/
|
|
8308
8308
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
8309
8309
|
/**
|
|
8310
8310
|
* Prefer `.getHTML()` and `.setHTML()` over `.innerHTML`.
|
|
8311
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8311
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-dom-node-html-methods.md
|
|
8312
8312
|
*/
|
|
8313
8313
|
'unicorn/prefer-dom-node-html-methods'?: Linter.RuleEntry<[]>;
|
|
8314
8314
|
/**
|
|
8315
8315
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
8316
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8316
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-dom-node-remove.md
|
|
8317
8317
|
*/
|
|
8318
8318
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
8319
8319
|
/**
|
|
8320
8320
|
* Prefer `.replaceChildren()` when emptying DOM children.
|
|
8321
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8321
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-dom-node-replace-children.md
|
|
8322
8322
|
*/
|
|
8323
8323
|
'unicorn/prefer-dom-node-replace-children'?: Linter.RuleEntry<[]>;
|
|
8324
8324
|
/**
|
|
8325
8325
|
* Prefer `.textContent` over `.innerText`.
|
|
8326
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8326
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-dom-node-text-content.md
|
|
8327
8327
|
*/
|
|
8328
8328
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
8329
8329
|
/**
|
|
8330
8330
|
* Prefer early returns over full-function conditional wrapping.
|
|
8331
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8331
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-early-return.md
|
|
8332
8332
|
*/
|
|
8333
8333
|
'unicorn/prefer-early-return'?: Linter.RuleEntry<UnicornPreferEarlyReturn>;
|
|
8334
8334
|
/**
|
|
8335
8335
|
* Prefer `else if` over adjacent `if` statements with related conditions.
|
|
8336
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8336
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-else-if.md
|
|
8337
8337
|
*/
|
|
8338
8338
|
'unicorn/prefer-else-if'?: Linter.RuleEntry<[]>;
|
|
8339
8339
|
/**
|
|
8340
8340
|
* Prefer `Error.isError()` when checking for errors.
|
|
8341
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8341
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-error-is-error.md
|
|
8342
8342
|
*/
|
|
8343
8343
|
'unicorn/prefer-error-is-error'?: Linter.RuleEntry<[]>;
|
|
8344
8344
|
/**
|
|
8345
8345
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
8346
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8346
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-event-target.md
|
|
8347
8347
|
*/
|
|
8348
8348
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
8349
8349
|
/**
|
|
8350
8350
|
* Prefer `export…from` when re-exporting.
|
|
8351
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8351
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-export-from.md
|
|
8352
8352
|
*/
|
|
8353
8353
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
8354
8354
|
/**
|
|
8355
8355
|
* Prefer flat `Math.min()` and `Math.max()` calls over nested calls.
|
|
8356
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8356
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-flat-math-min-max.md
|
|
8357
8357
|
*/
|
|
8358
8358
|
'unicorn/prefer-flat-math-min-max'?: Linter.RuleEntry<[]>;
|
|
8359
8359
|
/**
|
|
8360
8360
|
* Prefer `.getOrInsertComputed()` when the default value has side effects.
|
|
8361
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8361
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-get-or-insert-computed.md
|
|
8362
8362
|
*/
|
|
8363
8363
|
'unicorn/prefer-get-or-insert-computed'?: Linter.RuleEntry<[]>;
|
|
8364
8364
|
/**
|
|
8365
8365
|
* Prefer global numeric constants over `Number` static properties.
|
|
8366
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8366
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-global-number-constants.md
|
|
8367
8367
|
*/
|
|
8368
8368
|
'unicorn/prefer-global-number-constants'?: Linter.RuleEntry<[]>;
|
|
8369
8369
|
/**
|
|
8370
8370
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
8371
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8371
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-global-this.md
|
|
8372
8372
|
*/
|
|
8373
8373
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
8374
8374
|
/**
|
|
8375
8375
|
* Prefer `Object.groupBy()` or `Map.groupBy()` over reduce-based grouping.
|
|
8376
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8376
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-group-by.md
|
|
8377
8377
|
*/
|
|
8378
8378
|
'unicorn/prefer-group-by'?: Linter.RuleEntry<[]>;
|
|
8379
8379
|
/**
|
|
8380
8380
|
* Prefer `.has()` when checking existence.
|
|
8381
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8381
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-has-check.md
|
|
8382
8382
|
*/
|
|
8383
8383
|
'unicorn/prefer-has-check'?: Linter.RuleEntry<[]>;
|
|
8384
8384
|
/**
|
|
8385
8385
|
* Prefer moving code shared by all branches of an `if` statement out of the branches.
|
|
8386
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8386
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-hoisting-branch-code.md
|
|
8387
8387
|
*/
|
|
8388
8388
|
'unicorn/prefer-hoisting-branch-code'?: Linter.RuleEntry<[]>;
|
|
8389
8389
|
/**
|
|
8390
8390
|
* Prefer HTTPS over HTTP.
|
|
8391
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8391
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-https.md
|
|
8392
8392
|
*/
|
|
8393
8393
|
'unicorn/prefer-https'?: Linter.RuleEntry<[]>;
|
|
8394
8394
|
/**
|
|
8395
8395
|
* Prefer identifiers over string literals in import and export specifiers.
|
|
8396
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8396
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-identifier-import-export-specifiers.md
|
|
8397
8397
|
*/
|
|
8398
8398
|
'unicorn/prefer-identifier-import-export-specifiers'?: Linter.RuleEntry<[]>;
|
|
8399
8399
|
/**
|
|
8400
8400
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
8401
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8401
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-import-meta-properties.md
|
|
8402
8402
|
*/
|
|
8403
8403
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
8404
8404
|
/**
|
|
8405
8405
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
8406
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8406
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-includes.md
|
|
8407
8407
|
*/
|
|
8408
8408
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
8409
8409
|
/**
|
|
8410
8410
|
* Prefer `.includes()` over repeated equality comparisons.
|
|
8411
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8411
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-includes-over-repeated-comparisons.md
|
|
8412
8412
|
*/
|
|
8413
8413
|
'unicorn/prefer-includes-over-repeated-comparisons'?: Linter.RuleEntry<UnicornPreferIncludesOverRepeatedComparisons>;
|
|
8414
8414
|
/**
|
|
8415
8415
|
* Prefer passing iterables directly to constructors instead of filling empty collections.
|
|
8416
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8416
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-iterable-in-constructor.md
|
|
8417
8417
|
*/
|
|
8418
8418
|
'unicorn/prefer-iterable-in-constructor'?: Linter.RuleEntry<[]>;
|
|
8419
8419
|
/**
|
|
8420
8420
|
* Prefer `Iterator.concat(…)` over temporary spread arrays.
|
|
8421
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8421
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-iterator-concat.md
|
|
8422
8422
|
*/
|
|
8423
8423
|
'unicorn/prefer-iterator-concat'?: Linter.RuleEntry<[]>;
|
|
8424
8424
|
/**
|
|
8425
8425
|
* Prefer iterator helpers over temporary arrays from iterators.
|
|
8426
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8426
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-iterator-helpers.md
|
|
8427
8427
|
*/
|
|
8428
8428
|
'unicorn/prefer-iterator-helpers'?: Linter.RuleEntry<[]>;
|
|
8429
8429
|
/**
|
|
8430
8430
|
* Prefer `Iterator#toArray()` over temporary arrays from iterator spreads.
|
|
8431
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8431
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-iterator-to-array.md
|
|
8432
8432
|
*/
|
|
8433
8433
|
'unicorn/prefer-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
8434
8434
|
/**
|
|
8435
8435
|
* Prefer moving `.toArray()` to the end of iterator helper chains.
|
|
8436
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8436
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-iterator-to-array-at-end.md
|
|
8437
8437
|
*/
|
|
8438
8438
|
'unicorn/prefer-iterator-to-array-at-end'?: Linter.RuleEntry<[]>;
|
|
8439
8439
|
/**
|
|
8440
8440
|
* Renamed to `unicorn/consistent-json-file-read`.
|
|
8441
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8441
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/deleted-and-deprecated-rules.md#prefer-json-parse-buffer
|
|
8442
8442
|
* @deprecated
|
|
8443
8443
|
*/
|
|
8444
8444
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
8445
8445
|
/**
|
|
8446
8446
|
* Prefer `KeyboardEvent#key` over deprecated keyboard event properties.
|
|
8447
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8447
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-keyboard-event-key.md
|
|
8448
8448
|
*/
|
|
8449
8449
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
8450
8450
|
/**
|
|
8451
8451
|
* Prefer `location.assign()` over assigning to `location.href`.
|
|
8452
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8452
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-location-assign.md
|
|
8453
8453
|
*/
|
|
8454
8454
|
'unicorn/prefer-location-assign'?: Linter.RuleEntry<[]>;
|
|
8455
8455
|
/**
|
|
8456
8456
|
* Prefer using a logical operator over a ternary.
|
|
8457
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8457
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
8458
8458
|
*/
|
|
8459
8459
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
8460
8460
|
/**
|
|
8461
8461
|
* Prefer `new Map()` over `Object.fromEntries()` when using the result as a map.
|
|
8462
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8462
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-map-from-entries.md
|
|
8463
8463
|
*/
|
|
8464
8464
|
'unicorn/prefer-map-from-entries'?: Linter.RuleEntry<[]>;
|
|
8465
8465
|
/**
|
|
8466
8466
|
* Prefer `Math.abs()` over manual absolute value expressions and symmetric range checks.
|
|
8467
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8467
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-math-abs.md
|
|
8468
8468
|
*/
|
|
8469
8469
|
'unicorn/prefer-math-abs'?: Linter.RuleEntry<[]>;
|
|
8470
8470
|
/**
|
|
8471
8471
|
* Prefer `Math` constants over their approximate numeric values.
|
|
8472
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8472
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-math-constants.md
|
|
8473
8473
|
*/
|
|
8474
8474
|
'unicorn/prefer-math-constants'?: Linter.RuleEntry<[]>;
|
|
8475
8475
|
/**
|
|
8476
8476
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
8477
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8477
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-math-min-max.md
|
|
8478
8478
|
*/
|
|
8479
8479
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
8480
8480
|
/**
|
|
8481
8481
|
* Prefer `Math.trunc()` for truncating numbers.
|
|
8482
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8482
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-math-trunc.md
|
|
8483
8483
|
*/
|
|
8484
8484
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
8485
8485
|
/**
|
|
8486
8486
|
* Prefer moving ternaries into the minimal varying part of an expression.
|
|
8487
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8487
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-minimal-ternary.md
|
|
8488
8488
|
*/
|
|
8489
8489
|
'unicorn/prefer-minimal-ternary'?: Linter.RuleEntry<UnicornPreferMinimalTernary>;
|
|
8490
8490
|
/**
|
|
8491
8491
|
* Prefer modern DOM APIs.
|
|
8492
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8492
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-modern-dom-apis.md
|
|
8493
8493
|
*/
|
|
8494
8494
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
8495
8495
|
/**
|
|
8496
8496
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
8497
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8497
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-modern-math-apis.md
|
|
8498
8498
|
*/
|
|
8499
8499
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
8500
8500
|
/**
|
|
8501
8501
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
8502
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8502
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-module.md
|
|
8503
8503
|
*/
|
|
8504
8504
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
8505
8505
|
/**
|
|
8506
8506
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
8507
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8507
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-native-coercion-functions.md
|
|
8508
8508
|
*/
|
|
8509
8509
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
8510
8510
|
/**
|
|
8511
8511
|
* Prefer negative index over `.length - index` when possible.
|
|
8512
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8512
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-negative-index.md
|
|
8513
8513
|
*/
|
|
8514
8514
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
8515
8515
|
/**
|
|
8516
8516
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
8517
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8517
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-node-protocol.md
|
|
8518
8518
|
*/
|
|
8519
8519
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
8520
8520
|
/**
|
|
8521
8521
|
* Prefer `Number()` over `parseFloat()` and base-10 `parseInt()`.
|
|
8522
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8522
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-number-coercion.md
|
|
8523
8523
|
*/
|
|
8524
8524
|
'unicorn/prefer-number-coercion'?: Linter.RuleEntry<[]>;
|
|
8525
8525
|
/**
|
|
8526
8526
|
* Prefer `Number.isSafeInteger()` over integer checks.
|
|
8527
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8527
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-number-is-safe-integer.md
|
|
8528
8528
|
*/
|
|
8529
8529
|
'unicorn/prefer-number-is-safe-integer'?: Linter.RuleEntry<[]>;
|
|
8530
8530
|
/**
|
|
8531
8531
|
* Prefer `Number` static methods over global functions and optionally static properties over global constants.
|
|
8532
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8532
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-number-properties.md
|
|
8533
8533
|
*/
|
|
8534
8534
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
8535
8535
|
/**
|
|
8536
8536
|
* Prefer `Object.defineProperties()` over multiple `Object.defineProperty()` calls.
|
|
8537
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8537
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-object-define-properties.md
|
|
8538
8538
|
*/
|
|
8539
8539
|
'unicorn/prefer-object-define-properties'?: Linter.RuleEntry<[]>;
|
|
8540
8540
|
/**
|
|
8541
8541
|
* Prefer object destructuring defaults over default object literals with spread.
|
|
8542
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8542
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-object-destructuring-defaults.md
|
|
8543
8543
|
*/
|
|
8544
8544
|
'unicorn/prefer-object-destructuring-defaults'?: Linter.RuleEntry<[]>;
|
|
8545
8545
|
/**
|
|
8546
8546
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
8547
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8547
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-object-from-entries.md
|
|
8548
8548
|
*/
|
|
8549
8549
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
8550
8550
|
/**
|
|
8551
8551
|
* Prefer the most specific `Object` iterable method.
|
|
8552
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8552
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-object-iterable-methods.md
|
|
8553
8553
|
*/
|
|
8554
8554
|
'unicorn/prefer-object-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
8555
8555
|
/**
|
|
8556
8556
|
* Prefer observer APIs over resize and scroll listeners with layout reads.
|
|
8557
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8557
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-observer-apis.md
|
|
8558
8558
|
*/
|
|
8559
8559
|
'unicorn/prefer-observer-apis'?: Linter.RuleEntry<[]>;
|
|
8560
8560
|
/**
|
|
8561
8561
|
* Prefer omitting the `catch` binding parameter.
|
|
8562
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8562
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-optional-catch-binding.md
|
|
8563
8563
|
*/
|
|
8564
8564
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
8565
8565
|
/**
|
|
8566
8566
|
* Prefer `Path2D` for repeatedly drawn canvas paths.
|
|
8567
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8567
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-path2d.md
|
|
8568
8568
|
*/
|
|
8569
8569
|
'unicorn/prefer-path2d'?: Linter.RuleEntry<[]>;
|
|
8570
8570
|
/**
|
|
8571
8571
|
* Prefer private class fields over the underscore-prefix convention.
|
|
8572
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8572
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-private-class-fields.md
|
|
8573
8573
|
*/
|
|
8574
8574
|
'unicorn/prefer-private-class-fields'?: Linter.RuleEntry<[]>;
|
|
8575
8575
|
/**
|
|
8576
8576
|
* Prefer `Promise.try()` over promise-wrapping boilerplate.
|
|
8577
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8577
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-promise-try.md
|
|
8578
8578
|
*/
|
|
8579
8579
|
'unicorn/prefer-promise-try'?: Linter.RuleEntry<[]>;
|
|
8580
8580
|
/**
|
|
8581
8581
|
* Prefer `Promise.withResolvers()` when extracting resolver functions from `new Promise()`.
|
|
8582
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8582
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-promise-with-resolvers.md
|
|
8583
8583
|
*/
|
|
8584
8584
|
'unicorn/prefer-promise-with-resolvers'?: Linter.RuleEntry<[]>;
|
|
8585
8585
|
/**
|
|
8586
8586
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
8587
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8587
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-prototype-methods.md
|
|
8588
8588
|
*/
|
|
8589
8589
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
8590
8590
|
/**
|
|
8591
8591
|
* Prefer `.querySelector()` and `.querySelectorAll()` over older DOM query methods.
|
|
8592
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8592
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-query-selector.md
|
|
8593
8593
|
*/
|
|
8594
8594
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<UnicornPreferQuerySelector>;
|
|
8595
8595
|
/**
|
|
8596
8596
|
* Prefer `queueMicrotask()` over `process.nextTick()`, `setImmediate()`, and `setTimeout(…, 0)`.
|
|
8597
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8597
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-queue-microtask.md
|
|
8598
8598
|
*/
|
|
8599
8599
|
'unicorn/prefer-queue-microtask'?: Linter.RuleEntry<UnicornPreferQueueMicrotask>;
|
|
8600
8600
|
/**
|
|
8601
8601
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
8602
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8602
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-reflect-apply.md
|
|
8603
8603
|
*/
|
|
8604
8604
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
8605
8605
|
/**
|
|
8606
8606
|
* Prefer `RegExp.escape()` for escaping strings to use in regular expressions.
|
|
8607
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8607
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-regexp-escape.md
|
|
8608
8608
|
*/
|
|
8609
8609
|
'unicorn/prefer-regexp-escape'?: Linter.RuleEntry<[]>;
|
|
8610
8610
|
/**
|
|
8611
8611
|
* Prefer `RegExp#test()` over `String#match()`, `String#search()`, and `RegExp#exec()`.
|
|
8612
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8612
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-regexp-test.md
|
|
8613
8613
|
*/
|
|
8614
8614
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
8615
8615
|
/**
|
|
8616
8616
|
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
8617
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8617
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-response-static-json.md
|
|
8618
8618
|
*/
|
|
8619
8619
|
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
|
|
8620
8620
|
/**
|
|
8621
8621
|
* Prefer `:scope` when using element query selector methods.
|
|
8622
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8622
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-scoped-selector.md
|
|
8623
8623
|
*/
|
|
8624
8624
|
'unicorn/prefer-scoped-selector'?: Linter.RuleEntry<[]>;
|
|
8625
8625
|
/**
|
|
8626
8626
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
8627
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8627
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-set-has.md
|
|
8628
8628
|
*/
|
|
8629
8629
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<UnicornPreferSetHas>;
|
|
8630
8630
|
/**
|
|
8631
8631
|
* Prefer `Set` methods for Set operations.
|
|
8632
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8632
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-set-methods.md
|
|
8633
8633
|
*/
|
|
8634
8634
|
'unicorn/prefer-set-methods'?: Linter.RuleEntry<[]>;
|
|
8635
8635
|
/**
|
|
8636
8636
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
8637
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8637
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-set-size.md
|
|
8638
8638
|
*/
|
|
8639
8639
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
8640
8640
|
/**
|
|
8641
8641
|
* Prefer arrow function properties over methods with a single return.
|
|
8642
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8642
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-short-arrow-method.md
|
|
8643
8643
|
*/
|
|
8644
8644
|
'unicorn/prefer-short-arrow-method'?: Linter.RuleEntry<[]>;
|
|
8645
8645
|
/**
|
|
8646
8646
|
* Prefer simple conditions first in logical expressions.
|
|
8647
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8647
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-simple-condition-first.md
|
|
8648
8648
|
*/
|
|
8649
8649
|
'unicorn/prefer-simple-condition-first'?: Linter.RuleEntry<[]>;
|
|
8650
8650
|
/**
|
|
8651
8651
|
* Prefer a simple comparison function for `Array#sort()`.
|
|
8652
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8652
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-simple-sort-comparator.md
|
|
8653
8653
|
*/
|
|
8654
8654
|
'unicorn/prefer-simple-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
8655
8655
|
/**
|
|
8656
8656
|
* Prefer simplified conditions.
|
|
8657
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8657
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-simplified-conditions.md
|
|
8658
8658
|
*/
|
|
8659
8659
|
'unicorn/prefer-simplified-conditions'?: Linter.RuleEntry<[]>;
|
|
8660
8660
|
/**
|
|
8661
8661
|
* Prefer a single `Array#some()` or `Array#every()` with a combined predicate.
|
|
8662
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8662
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-single-array-predicate.md
|
|
8663
8663
|
*/
|
|
8664
8664
|
'unicorn/prefer-single-array-predicate'?: Linter.RuleEntry<[]>;
|
|
8665
8665
|
/**
|
|
8666
8666
|
* Enforce combining multiple `Array#{push,unshift}()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
8667
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8667
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-single-call.md
|
|
8668
8668
|
*/
|
|
8669
8669
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
8670
8670
|
/**
|
|
8671
8671
|
* Prefer a single object destructuring declaration per local const source.
|
|
8672
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8672
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-single-object-destructuring.md
|
|
8673
8673
|
*/
|
|
8674
8674
|
'unicorn/prefer-single-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
8675
8675
|
/**
|
|
8676
8676
|
* Enforce combining multiple single-character replacements into a single `String#replaceAll()` with a regular expression.
|
|
8677
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8677
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-single-replace.md
|
|
8678
8678
|
*/
|
|
8679
8679
|
'unicorn/prefer-single-replace'?: Linter.RuleEntry<[]>;
|
|
8680
8680
|
/**
|
|
8681
8681
|
* Prefer declaring variables in the smallest possible scope.
|
|
8682
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8682
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-smaller-scope.md
|
|
8683
8683
|
*/
|
|
8684
8684
|
'unicorn/prefer-smaller-scope'?: Linter.RuleEntry<[]>;
|
|
8685
8685
|
/**
|
|
8686
8686
|
* Prefer `String#split()` with a limit.
|
|
8687
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8687
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-split-limit.md
|
|
8688
8688
|
*/
|
|
8689
8689
|
'unicorn/prefer-split-limit'?: Linter.RuleEntry<[]>;
|
|
8690
8690
|
/**
|
|
8691
8691
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()`, and trivial `for…of` copies.
|
|
8692
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8692
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-spread.md
|
|
8693
8693
|
*/
|
|
8694
8694
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
8695
8695
|
/**
|
|
8696
8696
|
* Prefer `String#matchAll()` over `RegExp#exec()` loops.
|
|
8697
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8697
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-string-match-all.md
|
|
8698
8698
|
*/
|
|
8699
8699
|
'unicorn/prefer-string-match-all'?: Linter.RuleEntry<[]>;
|
|
8700
8700
|
/**
|
|
8701
8701
|
* Prefer `String#padStart()` and `String#padEnd()` over manual string padding.
|
|
8702
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8702
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-string-pad-start-end.md
|
|
8703
8703
|
*/
|
|
8704
8704
|
'unicorn/prefer-string-pad-start-end'?: Linter.RuleEntry<[]>;
|
|
8705
8705
|
/**
|
|
8706
8706
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
8707
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8707
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-string-raw.md
|
|
8708
8708
|
*/
|
|
8709
8709
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
8710
8710
|
/**
|
|
8711
8711
|
* Prefer `String#repeat()` for repeated whitespace.
|
|
8712
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8712
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-string-repeat.md
|
|
8713
8713
|
*/
|
|
8714
8714
|
'unicorn/prefer-string-repeat'?: Linter.RuleEntry<UnicornPreferStringRepeat>;
|
|
8715
8715
|
/**
|
|
8716
8716
|
* Prefer `String#replaceAll()` over regex searches with the global flag and `String#split().join()`.
|
|
8717
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8717
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-string-replace-all.md
|
|
8718
8718
|
*/
|
|
8719
8719
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
8720
8720
|
/**
|
|
8721
8721
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
8722
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8722
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-string-slice.md
|
|
8723
8723
|
*/
|
|
8724
8724
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
8725
8725
|
/**
|
|
8726
8726
|
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()` and `String#indexOf() === 0`.
|
|
8727
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8727
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-string-starts-ends-with.md
|
|
8728
8728
|
*/
|
|
8729
8729
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
8730
8730
|
/**
|
|
8731
8731
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
8732
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8732
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-string-trim-start-end.md
|
|
8733
8733
|
*/
|
|
8734
8734
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
8735
8735
|
/**
|
|
8736
8736
|
* Prefer using `structuredClone` to create a deep clone.
|
|
8737
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8737
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-structured-clone.md
|
|
8738
8738
|
*/
|
|
8739
8739
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
8740
8740
|
/**
|
|
8741
8741
|
* Prefer `switch` over multiple `else-if`.
|
|
8742
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8742
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-switch.md
|
|
8743
8743
|
*/
|
|
8744
8744
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
8745
8745
|
/**
|
|
8746
8746
|
* Prefer `Temporal` over `Date`.
|
|
8747
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8747
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-temporal.md
|
|
8748
8748
|
*/
|
|
8749
8749
|
'unicorn/prefer-temporal'?: Linter.RuleEntry<UnicornPreferTemporal>;
|
|
8750
8750
|
/**
|
|
8751
8751
|
* Prefer ternary expressions over simple `if` statements that return or assign values.
|
|
8752
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8752
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-ternary.md
|
|
8753
8753
|
*/
|
|
8754
8754
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
8755
8755
|
/**
|
|
8756
8756
|
* Prefer using `Element#toggleAttribute()` to toggle attributes.
|
|
8757
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8757
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-toggle-attribute.md
|
|
8758
8758
|
*/
|
|
8759
8759
|
'unicorn/prefer-toggle-attribute'?: Linter.RuleEntry<[]>;
|
|
8760
8760
|
/**
|
|
8761
8761
|
* Prefer top-level await over top-level promises and async function calls.
|
|
8762
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8762
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-top-level-await.md
|
|
8763
8763
|
*/
|
|
8764
8764
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
8765
8765
|
/**
|
|
8766
8766
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
8767
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8767
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-type-error.md
|
|
8768
8768
|
*/
|
|
8769
8769
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
8770
8770
|
/**
|
|
8771
8771
|
* Require type literals to be last in union types.
|
|
8772
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8772
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-type-literal-last.md
|
|
8773
8773
|
*/
|
|
8774
8774
|
'unicorn/prefer-type-literal-last'?: Linter.RuleEntry<[]>;
|
|
8775
8775
|
/**
|
|
8776
8776
|
* Prefer `Uint8Array#toBase64()` and `Uint8Array.fromBase64()` over `atob()`, `btoa()`, and `Buffer` base64 conversions.
|
|
8777
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8777
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-uint8array-base64.md
|
|
8778
8778
|
*/
|
|
8779
8779
|
'unicorn/prefer-uint8array-base64'?: Linter.RuleEntry<[]>;
|
|
8780
8780
|
/**
|
|
8781
8781
|
* Prefer the unary minus operator over multiplying or dividing by `-1`.
|
|
8782
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8782
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-unary-minus.md
|
|
8783
8783
|
*/
|
|
8784
8784
|
'unicorn/prefer-unary-minus'?: Linter.RuleEntry<[]>;
|
|
8785
8785
|
/**
|
|
8786
8786
|
* Prefer Unicode code point escapes over legacy escape sequences.
|
|
8787
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8787
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-unicode-code-point-escapes.md
|
|
8788
8788
|
*/
|
|
8789
8789
|
'unicorn/prefer-unicode-code-point-escapes'?: Linter.RuleEntry<[]>;
|
|
8790
8790
|
/**
|
|
8791
8791
|
* Prefer `URL.canParse()` over constructing a `URL` in a try/catch for validation.
|
|
8792
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8792
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-url-can-parse.md
|
|
8793
8793
|
*/
|
|
8794
8794
|
'unicorn/prefer-url-can-parse'?: Linter.RuleEntry<[]>;
|
|
8795
8795
|
/**
|
|
8796
8796
|
* Prefer `URL#href` over stringifying a `URL`.
|
|
8797
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8797
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-url-href.md
|
|
8798
8798
|
*/
|
|
8799
8799
|
'unicorn/prefer-url-href'?: Linter.RuleEntry<[]>;
|
|
8800
8800
|
/**
|
|
8801
8801
|
* Prefer `URLSearchParams` over manually splitting query strings.
|
|
8802
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8802
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-url-search-parameters.md
|
|
8803
8803
|
*/
|
|
8804
8804
|
'unicorn/prefer-url-search-parameters'?: Linter.RuleEntry<[]>;
|
|
8805
8805
|
/**
|
|
8806
8806
|
* Prefer putting the condition in the while statement.
|
|
8807
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8807
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-while-loop-condition.md
|
|
8808
8808
|
*/
|
|
8809
8809
|
'unicorn/prefer-while-loop-condition'?: Linter.RuleEntry<[]>;
|
|
8810
8810
|
/**
|
|
8811
8811
|
* Renamed to `unicorn/name-replacements`.
|
|
8812
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8812
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/deleted-and-deprecated-rules.md#prevent-abbreviations
|
|
8813
8813
|
* @deprecated
|
|
8814
8814
|
*/
|
|
8815
8815
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<[]>;
|
|
8816
8816
|
/**
|
|
8817
8817
|
* Enforce consistent relative URL style.
|
|
8818
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8818
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/relative-url-style.md
|
|
8819
8819
|
*/
|
|
8820
8820
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
8821
8821
|
/**
|
|
8822
8822
|
* Enforce using the separator argument with `Array#join()`.
|
|
8823
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8823
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/require-array-join-separator.md
|
|
8824
8824
|
*/
|
|
8825
8825
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
8826
8826
|
/**
|
|
8827
8827
|
* Require a compare function when calling `Array#sort()` or `Array#toSorted()`.
|
|
8828
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8828
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/require-array-sort-compare.md
|
|
8829
8829
|
*/
|
|
8830
8830
|
'unicorn/require-array-sort-compare'?: Linter.RuleEntry<[]>;
|
|
8831
8831
|
/**
|
|
8832
8832
|
* Require `CSS.escape()` for interpolated values in CSS selectors.
|
|
8833
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8833
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/require-css-escape.md
|
|
8834
8834
|
*/
|
|
8835
8835
|
'unicorn/require-css-escape'?: Linter.RuleEntry<UnicornRequireCssEscape>;
|
|
8836
8836
|
/**
|
|
8837
8837
|
* Require non-empty module attributes for imports and exports
|
|
8838
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8838
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/require-module-attributes.md
|
|
8839
8839
|
*/
|
|
8840
8840
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
8841
8841
|
/**
|
|
8842
8842
|
* Require non-empty specifier list in import and export statements.
|
|
8843
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8843
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/require-module-specifiers.md
|
|
8844
8844
|
*/
|
|
8845
8845
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
8846
8846
|
/**
|
|
8847
8847
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
8848
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8848
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
8849
8849
|
*/
|
|
8850
8850
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
8851
8851
|
/**
|
|
8852
8852
|
* Require passive event listeners for high-frequency events.
|
|
8853
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8853
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/require-passive-events.md
|
|
8854
8854
|
*/
|
|
8855
8855
|
'unicorn/require-passive-events'?: Linter.RuleEntry<[]>;
|
|
8856
8856
|
/**
|
|
8857
8857
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
8858
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8858
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/require-post-message-target-origin.md
|
|
8859
8859
|
*/
|
|
8860
8860
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
8861
8861
|
/**
|
|
8862
8862
|
* Require boolean-returning Proxy traps to return booleans.
|
|
8863
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8863
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/require-proxy-trap-boolean-return.md
|
|
8864
8864
|
*/
|
|
8865
8865
|
'unicorn/require-proxy-trap-boolean-return'?: Linter.RuleEntry<[]>;
|
|
8866
8866
|
/**
|
|
8867
8867
|
* Enforce better string content.
|
|
8868
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8868
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/string-content.md
|
|
8869
8869
|
*/
|
|
8870
8870
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
8871
8871
|
/**
|
|
8872
8872
|
* Enforce consistent brace style for `case` clauses.
|
|
8873
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8873
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/switch-case-braces.md
|
|
8874
8874
|
*/
|
|
8875
8875
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
8876
8876
|
/**
|
|
8877
8877
|
* Enforce consistent `break`/`return`/`continue`/`throw` position in `case` clauses.
|
|
8878
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8878
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/switch-case-break-position.md
|
|
8879
8879
|
*/
|
|
8880
8880
|
'unicorn/switch-case-break-position'?: Linter.RuleEntry<[]>;
|
|
8881
8881
|
/**
|
|
8882
8882
|
* Fix whitespace-insensitive template indentation.
|
|
8883
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8883
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/template-indent.md
|
|
8884
8884
|
*/
|
|
8885
8885
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
8886
8886
|
/**
|
|
8887
8887
|
* Enforce consistent case for text encoding identifiers.
|
|
8888
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8888
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/text-encoding-identifier-case.md
|
|
8889
8889
|
*/
|
|
8890
8890
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
8891
8891
|
/**
|
|
8892
8892
|
* Require `new` when creating an error.
|
|
8893
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8893
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/throw-new-error.md
|
|
8894
8894
|
*/
|
|
8895
8895
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
8896
8896
|
/**
|
|
8897
8897
|
* Limit the complexity of `try` blocks.
|
|
8898
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8898
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/try-complexity.md
|
|
8899
8899
|
*/
|
|
8900
8900
|
'unicorn/try-complexity'?: Linter.RuleEntry<UnicornTryComplexity>;
|
|
8901
8901
|
/**
|
|
@@ -11262,11 +11262,13 @@ type JsoncSortArrayValues = [{
|
|
|
11262
11262
|
type?: ("asc" | "desc");
|
|
11263
11263
|
caseSensitive?: boolean;
|
|
11264
11264
|
natural?: boolean;
|
|
11265
|
+
key?: string;
|
|
11265
11266
|
};
|
|
11266
11267
|
})[] | {
|
|
11267
11268
|
type?: ("asc" | "desc");
|
|
11268
11269
|
caseSensitive?: boolean;
|
|
11269
11270
|
natural?: boolean;
|
|
11271
|
+
key?: string;
|
|
11270
11272
|
});
|
|
11271
11273
|
minValues?: number;
|
|
11272
11274
|
}, ...({
|
|
@@ -11277,11 +11279,13 @@ type JsoncSortArrayValues = [{
|
|
|
11277
11279
|
type?: ("asc" | "desc");
|
|
11278
11280
|
caseSensitive?: boolean;
|
|
11279
11281
|
natural?: boolean;
|
|
11282
|
+
key?: string;
|
|
11280
11283
|
};
|
|
11281
11284
|
})[] | {
|
|
11282
11285
|
type?: ("asc" | "desc");
|
|
11283
11286
|
caseSensitive?: boolean;
|
|
11284
11287
|
natural?: boolean;
|
|
11288
|
+
key?: string;
|
|
11285
11289
|
});
|
|
11286
11290
|
minValues?: number;
|
|
11287
11291
|
})[]]; // ----- jsonc/sort-keys -----
|
|
@@ -15792,11 +15796,13 @@ type YmlSortSequenceValues = [{
|
|
|
15792
15796
|
type?: ("asc" | "desc");
|
|
15793
15797
|
caseSensitive?: boolean;
|
|
15794
15798
|
natural?: boolean;
|
|
15799
|
+
key?: string;
|
|
15795
15800
|
};
|
|
15796
15801
|
})[] | {
|
|
15797
15802
|
type?: ("asc" | "desc");
|
|
15798
15803
|
caseSensitive?: boolean;
|
|
15799
15804
|
natural?: boolean;
|
|
15805
|
+
key?: string;
|
|
15800
15806
|
});
|
|
15801
15807
|
minValues?: number;
|
|
15802
15808
|
}, ...({
|
|
@@ -15807,11 +15813,13 @@ type YmlSortSequenceValues = [{
|
|
|
15807
15813
|
type?: ("asc" | "desc");
|
|
15808
15814
|
caseSensitive?: boolean;
|
|
15809
15815
|
natural?: boolean;
|
|
15816
|
+
key?: string;
|
|
15810
15817
|
};
|
|
15811
15818
|
})[] | {
|
|
15812
15819
|
type?: ("asc" | "desc");
|
|
15813
15820
|
caseSensitive?: boolean;
|
|
15814
15821
|
natural?: boolean;
|
|
15822
|
+
key?: string;
|
|
15815
15823
|
});
|
|
15816
15824
|
minValues?: number;
|
|
15817
15825
|
})[]]; // ----- yml/spaced-comment -----
|