@2digits/eslint-config 5.5.5 → 5.5.6
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 +397 -173
- package/dist/index.mjs +1 -1
- package/package.json +19 -19
package/dist/index.d.mts
CHANGED
|
@@ -7220,753 +7220,921 @@ interface RuleOptions {
|
|
|
7220
7220
|
*/
|
|
7221
7221
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
|
|
7222
7222
|
/**
|
|
7223
|
-
*
|
|
7224
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7223
|
+
* Prefer better DOM traversal APIs.
|
|
7224
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/better-dom-traversing.md
|
|
7225
7225
|
*/
|
|
7226
|
-
'unicorn/better-
|
|
7226
|
+
'unicorn/better-dom-traversing'?: Linter.RuleEntry<[]>;
|
|
7227
|
+
/**
|
|
7228
|
+
* Removed. Prefer `eslint-plugin-regexp`
|
|
7229
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/deleted-and-deprecated-rules.md#better-regex
|
|
7230
|
+
* @deprecated
|
|
7231
|
+
*/
|
|
7232
|
+
'unicorn/better-regex'?: Linter.RuleEntry<[]>;
|
|
7227
7233
|
/**
|
|
7228
7234
|
* Enforce a specific parameter name in catch clauses.
|
|
7229
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7235
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/catch-error-name.md
|
|
7230
7236
|
*/
|
|
7231
7237
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
7232
7238
|
/**
|
|
7233
7239
|
* Enforce consistent assertion style with `node:assert`.
|
|
7234
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7240
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/consistent-assert.md
|
|
7235
7241
|
*/
|
|
7236
7242
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
7243
|
+
/**
|
|
7244
|
+
* Enforce consistent spelling of compound words in identifiers.
|
|
7245
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/consistent-compound-words.md
|
|
7246
|
+
*/
|
|
7247
|
+
'unicorn/consistent-compound-words'?: Linter.RuleEntry<UnicornConsistentCompoundWords>;
|
|
7237
7248
|
/**
|
|
7238
7249
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
7239
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7250
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/consistent-date-clone.md
|
|
7240
7251
|
*/
|
|
7241
7252
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
7242
7253
|
/**
|
|
7243
7254
|
* Use destructured variables over properties.
|
|
7244
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7255
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/consistent-destructuring.md
|
|
7245
7256
|
*/
|
|
7246
7257
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
7247
7258
|
/**
|
|
7248
7259
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
7249
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7260
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/consistent-empty-array-spread.md
|
|
7250
7261
|
*/
|
|
7251
7262
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
7252
7263
|
/**
|
|
7253
7264
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
7254
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7265
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/consistent-existence-index-check.md
|
|
7255
7266
|
*/
|
|
7256
7267
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
7257
7268
|
/**
|
|
7258
7269
|
* Move function definitions to the highest possible scope.
|
|
7259
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7270
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/consistent-function-scoping.md
|
|
7260
7271
|
*/
|
|
7261
7272
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
7273
|
+
/**
|
|
7274
|
+
* Enforce consistent JSON file reads before `JSON.parse()`.
|
|
7275
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/consistent-json-file-read.md
|
|
7276
|
+
*/
|
|
7277
|
+
'unicorn/consistent-json-file-read'?: Linter.RuleEntry<UnicornConsistentJsonFileRead>;
|
|
7262
7278
|
/**
|
|
7263
7279
|
* Enforce consistent style for escaping `${` in template literals.
|
|
7264
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7280
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/consistent-template-literal-escape.md
|
|
7265
7281
|
*/
|
|
7266
7282
|
'unicorn/consistent-template-literal-escape'?: Linter.RuleEntry<[]>;
|
|
7267
7283
|
/**
|
|
7268
7284
|
* Enforce correct `Error` subclassing.
|
|
7269
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7285
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/custom-error-definition.md
|
|
7270
7286
|
*/
|
|
7271
7287
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
7288
|
+
/**
|
|
7289
|
+
* Enforce consistent style for DOM element dataset access.
|
|
7290
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/dom-node-dataset.md
|
|
7291
|
+
*/
|
|
7292
|
+
'unicorn/dom-node-dataset'?: Linter.RuleEntry<UnicornDomNodeDataset>;
|
|
7272
7293
|
/**
|
|
7273
7294
|
* Enforce no spaces between braces.
|
|
7274
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7295
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/empty-brace-spaces.md
|
|
7275
7296
|
*/
|
|
7276
7297
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
7277
7298
|
/**
|
|
7278
7299
|
* Enforce passing a `message` value when creating a built-in error.
|
|
7279
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7300
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/error-message.md
|
|
7280
7301
|
*/
|
|
7281
7302
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
7282
7303
|
/**
|
|
7283
7304
|
* Require escape sequences to use uppercase or lowercase values.
|
|
7284
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7305
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/escape-case.md
|
|
7285
7306
|
*/
|
|
7286
7307
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
7287
7308
|
/**
|
|
7288
7309
|
* Add expiration conditions to TODO comments.
|
|
7289
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7310
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/expiring-todo-comments.md
|
|
7290
7311
|
*/
|
|
7291
7312
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
7292
7313
|
/**
|
|
7293
7314
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
7294
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7315
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/explicit-length-check.md
|
|
7295
7316
|
*/
|
|
7296
7317
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
7297
7318
|
/**
|
|
7298
|
-
* Enforce a case style for filenames.
|
|
7299
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7319
|
+
* Enforce a case style for filenames and directory names.
|
|
7320
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/filename-case.md
|
|
7300
7321
|
*/
|
|
7301
7322
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
7302
7323
|
/**
|
|
7303
7324
|
* Enforce specific import styles per module.
|
|
7304
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7325
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/import-style.md
|
|
7305
7326
|
*/
|
|
7306
7327
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
7307
7328
|
/**
|
|
7308
7329
|
* Prevent usage of variables from outside the scope of isolated functions.
|
|
7309
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7330
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/isolated-functions.md
|
|
7310
7331
|
*/
|
|
7311
7332
|
'unicorn/isolated-functions'?: Linter.RuleEntry<UnicornIsolatedFunctions>;
|
|
7312
7333
|
/**
|
|
7313
7334
|
* Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
|
|
7314
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7335
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/new-for-builtins.md
|
|
7315
7336
|
*/
|
|
7316
7337
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
7317
7338
|
/**
|
|
7318
7339
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
7319
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7340
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-abusive-eslint-disable.md
|
|
7320
7341
|
*/
|
|
7321
7342
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
7322
7343
|
/**
|
|
7323
7344
|
* Disallow recursive access to `this` within getters and setters.
|
|
7324
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7345
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-accessor-recursion.md
|
|
7325
7346
|
*/
|
|
7326
7347
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
7327
7348
|
/**
|
|
7328
7349
|
* Disallow anonymous functions and classes as the default export.
|
|
7329
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7350
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-anonymous-default-export.md
|
|
7330
7351
|
*/
|
|
7331
7352
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
7332
7353
|
/**
|
|
7333
7354
|
* Prevent passing a function reference directly to iterator methods.
|
|
7334
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7355
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-array-callback-reference.md
|
|
7356
|
+
*/
|
|
7357
|
+
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<UnicornNoArrayCallbackReference>;
|
|
7358
|
+
/**
|
|
7359
|
+
* Disallow using reference values as `Array#fill()` values.
|
|
7360
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-array-fill-with-reference-type.md
|
|
7335
7361
|
*/
|
|
7336
|
-
'unicorn/no-array-
|
|
7362
|
+
'unicorn/no-array-fill-with-reference-type'?: Linter.RuleEntry<[]>;
|
|
7337
7363
|
/**
|
|
7338
7364
|
* Prefer `for…of` over the `forEach` method.
|
|
7339
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7365
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-array-for-each.md
|
|
7340
7366
|
*/
|
|
7341
7367
|
'unicorn/no-array-for-each'?: Linter.RuleEntry<[]>;
|
|
7368
|
+
/**
|
|
7369
|
+
* Disallow `.fill()` after `Array.from({length: …})`.
|
|
7370
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-array-from-fill.md
|
|
7371
|
+
*/
|
|
7372
|
+
'unicorn/no-array-from-fill'?: Linter.RuleEntry<[]>;
|
|
7342
7373
|
/**
|
|
7343
7374
|
* Disallow using the `this` argument in array methods.
|
|
7344
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7375
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-array-method-this-argument.md
|
|
7345
7376
|
*/
|
|
7346
7377
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
7347
7378
|
/**
|
|
7348
7379
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
7349
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7380
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/deleted-and-deprecated-rules.md#no-array-push-push
|
|
7350
7381
|
* @deprecated
|
|
7351
7382
|
*/
|
|
7352
7383
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
7353
7384
|
/**
|
|
7354
7385
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
7355
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7386
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-array-reduce.md
|
|
7356
7387
|
*/
|
|
7357
7388
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
7358
7389
|
/**
|
|
7359
7390
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
7360
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7391
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-array-reverse.md
|
|
7361
7392
|
*/
|
|
7362
7393
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
7363
7394
|
/**
|
|
7364
7395
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
7365
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7396
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-array-sort.md
|
|
7366
7397
|
*/
|
|
7367
7398
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
7368
7399
|
/**
|
|
7369
7400
|
* Disallow member access from await expression.
|
|
7370
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7401
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-await-expression-member.md
|
|
7371
7402
|
*/
|
|
7372
7403
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
7373
7404
|
/**
|
|
7374
7405
|
* Disallow using `await` in `Promise` method parameters.
|
|
7375
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7406
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-await-in-promise-methods.md
|
|
7376
7407
|
*/
|
|
7377
7408
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
7409
|
+
/**
|
|
7410
|
+
* Disallow unnecessary `Blob` to `File` conversion.
|
|
7411
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-blob-to-file.md
|
|
7412
|
+
*/
|
|
7413
|
+
'unicorn/no-blob-to-file'?: Linter.RuleEntry<[]>;
|
|
7414
|
+
/**
|
|
7415
|
+
* Prefer drawing canvases directly instead of converting them to images.
|
|
7416
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-canvas-to-image.md
|
|
7417
|
+
*/
|
|
7418
|
+
'unicorn/no-canvas-to-image'?: Linter.RuleEntry<[]>;
|
|
7419
|
+
/**
|
|
7420
|
+
* Disallow confusing uses of `Array#{splice,toSpliced}()`.
|
|
7421
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-confusing-array-splice.md
|
|
7422
|
+
*/
|
|
7423
|
+
'unicorn/no-confusing-array-splice'?: Linter.RuleEntry<[]>;
|
|
7378
7424
|
/**
|
|
7379
7425
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
7380
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7426
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-console-spaces.md
|
|
7381
7427
|
*/
|
|
7382
7428
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
7383
7429
|
/**
|
|
7384
7430
|
* Do not use `document.cookie` directly.
|
|
7385
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7431
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-document-cookie.md
|
|
7386
7432
|
*/
|
|
7387
7433
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
7434
|
+
/**
|
|
7435
|
+
* Disallow duplicate values in `Set` constructor array literals.
|
|
7436
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-duplicate-set-values.md
|
|
7437
|
+
*/
|
|
7438
|
+
'unicorn/no-duplicate-set-values'?: Linter.RuleEntry<[]>;
|
|
7388
7439
|
/**
|
|
7389
7440
|
* Disallow empty files.
|
|
7390
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7441
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-empty-file.md
|
|
7391
7442
|
*/
|
|
7392
|
-
'unicorn/no-empty-file'?: Linter.RuleEntry<
|
|
7443
|
+
'unicorn/no-empty-file'?: Linter.RuleEntry<UnicornNoEmptyFile>;
|
|
7444
|
+
/**
|
|
7445
|
+
* Disallow exports in scripts.
|
|
7446
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-exports-in-scripts.md
|
|
7447
|
+
*/
|
|
7448
|
+
'unicorn/no-exports-in-scripts'?: Linter.RuleEntry<[]>;
|
|
7393
7449
|
/**
|
|
7394
7450
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
7395
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7451
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-for-loop.md
|
|
7396
7452
|
*/
|
|
7397
7453
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
7398
7454
|
/**
|
|
7399
7455
|
* Enforce the use of Unicode escapes instead of hexadecimal escapes.
|
|
7400
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7456
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-hex-escape.md
|
|
7401
7457
|
*/
|
|
7402
7458
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
7403
7459
|
/**
|
|
7404
7460
|
* Disallow immediate mutation after variable assignment.
|
|
7405
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7461
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-immediate-mutation.md
|
|
7406
7462
|
*/
|
|
7407
7463
|
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]>;
|
|
7464
|
+
/**
|
|
7465
|
+
* Disallow incorrect `querySelector()` and `querySelectorAll()` usage.
|
|
7466
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-incorrect-query-selector.md
|
|
7467
|
+
*/
|
|
7468
|
+
'unicorn/no-incorrect-query-selector'?: Linter.RuleEntry<[]>;
|
|
7408
7469
|
/**
|
|
7409
7470
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
7410
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7471
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/deleted-and-deprecated-rules.md#no-instanceof-array
|
|
7411
7472
|
* @deprecated
|
|
7412
7473
|
*/
|
|
7413
7474
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
7414
7475
|
/**
|
|
7415
7476
|
* Disallow `instanceof` with built-in objects
|
|
7416
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7477
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-instanceof-builtins.md
|
|
7417
7478
|
*/
|
|
7418
7479
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
7419
7480
|
/**
|
|
7420
7481
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
7421
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7482
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-invalid-fetch-options.md
|
|
7422
7483
|
*/
|
|
7423
7484
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
7485
|
+
/**
|
|
7486
|
+
* Disallow invalid `accept` values on file inputs.
|
|
7487
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-invalid-file-input-accept.md
|
|
7488
|
+
*/
|
|
7489
|
+
'unicorn/no-invalid-file-input-accept'?: Linter.RuleEntry<[]>;
|
|
7424
7490
|
/**
|
|
7425
7491
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
7426
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7492
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-invalid-remove-event-listener.md
|
|
7427
7493
|
*/
|
|
7428
7494
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
7429
7495
|
/**
|
|
7430
7496
|
* Disallow identifiers starting with `new` or `class`.
|
|
7431
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7497
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-keyword-prefix.md
|
|
7432
7498
|
*/
|
|
7433
7499
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
7500
|
+
/**
|
|
7501
|
+
* Disallow accessing `event.currentTarget` after the synchronous event dispatch has finished.
|
|
7502
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-late-current-target-access.md
|
|
7503
|
+
*/
|
|
7504
|
+
'unicorn/no-late-current-target-access'?: Linter.RuleEntry<[]>;
|
|
7434
7505
|
/**
|
|
7435
7506
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
7436
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7507
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
|
|
7437
7508
|
* @deprecated
|
|
7438
7509
|
*/
|
|
7439
7510
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
7440
7511
|
/**
|
|
7441
7512
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
7442
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7513
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-lonely-if.md
|
|
7443
7514
|
*/
|
|
7444
7515
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
7445
7516
|
/**
|
|
7446
7517
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
7447
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7518
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-magic-array-flat-depth.md
|
|
7448
7519
|
*/
|
|
7449
7520
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
7521
|
+
/**
|
|
7522
|
+
* Disallow manually wrapped comments.
|
|
7523
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-manually-wrapped-comments.md
|
|
7524
|
+
*/
|
|
7525
|
+
'unicorn/no-manually-wrapped-comments'?: Linter.RuleEntry<[]>;
|
|
7450
7526
|
/**
|
|
7451
7527
|
* Disallow named usage of default import and export.
|
|
7452
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7528
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-named-default.md
|
|
7453
7529
|
*/
|
|
7454
7530
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
7455
7531
|
/**
|
|
7456
7532
|
* Disallow negated conditions.
|
|
7457
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7533
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-negated-condition.md
|
|
7458
7534
|
*/
|
|
7459
7535
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
7460
7536
|
/**
|
|
7461
7537
|
* Disallow negated expression in equality check.
|
|
7462
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7538
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-negation-in-equality-check.md
|
|
7463
7539
|
*/
|
|
7464
7540
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
7465
7541
|
/**
|
|
7466
7542
|
* Disallow nested ternary expressions.
|
|
7467
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7543
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-nested-ternary.md
|
|
7468
7544
|
*/
|
|
7469
7545
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
7470
7546
|
/**
|
|
7471
7547
|
* Disallow `new Array()`.
|
|
7472
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7548
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-new-array.md
|
|
7473
7549
|
*/
|
|
7474
7550
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
7475
7551
|
/**
|
|
7476
7552
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
7477
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7553
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-new-buffer.md
|
|
7478
7554
|
*/
|
|
7479
7555
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
7480
7556
|
/**
|
|
7481
7557
|
* Disallow the use of the `null` literal.
|
|
7482
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7558
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-null.md
|
|
7483
7559
|
*/
|
|
7484
7560
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
7485
7561
|
/**
|
|
7486
7562
|
* Disallow the use of objects as default parameters.
|
|
7487
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7563
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-object-as-default-parameter.md
|
|
7488
7564
|
*/
|
|
7489
7565
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
7490
7566
|
/**
|
|
7491
7567
|
* Disallow `process.exit()`.
|
|
7492
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7568
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-process-exit.md
|
|
7493
7569
|
*/
|
|
7494
7570
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
7495
7571
|
/**
|
|
7496
7572
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
7497
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7573
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-single-promise-in-promise-methods.md
|
|
7498
7574
|
*/
|
|
7499
7575
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
7500
7576
|
/**
|
|
7501
7577
|
* Disallow classes that only have static members.
|
|
7502
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7578
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-static-only-class.md
|
|
7503
7579
|
*/
|
|
7504
7580
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
7505
7581
|
/**
|
|
7506
7582
|
* Disallow `then` property.
|
|
7507
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7583
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-thenable.md
|
|
7508
7584
|
*/
|
|
7509
7585
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
7510
7586
|
/**
|
|
7511
7587
|
* Disallow assigning `this` to a variable.
|
|
7512
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7588
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-this-assignment.md
|
|
7513
7589
|
*/
|
|
7514
7590
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
7591
|
+
/**
|
|
7592
|
+
* Disallow `this` outside of classes.
|
|
7593
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-this-outside-of-class.md
|
|
7594
|
+
*/
|
|
7595
|
+
'unicorn/no-this-outside-of-class'?: Linter.RuleEntry<[]>;
|
|
7515
7596
|
/**
|
|
7516
7597
|
* Disallow comparing `undefined` using `typeof`.
|
|
7517
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7598
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-typeof-undefined.md
|
|
7518
7599
|
*/
|
|
7519
7600
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
7520
7601
|
/**
|
|
7521
7602
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
7522
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7603
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-unnecessary-array-flat-depth.md
|
|
7523
7604
|
*/
|
|
7524
7605
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
7525
7606
|
/**
|
|
7526
7607
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
7527
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7608
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-unnecessary-array-splice-count.md
|
|
7528
7609
|
*/
|
|
7529
7610
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
7530
7611
|
/**
|
|
7531
7612
|
* Disallow awaiting non-promise values.
|
|
7532
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7613
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-unnecessary-await.md
|
|
7533
7614
|
*/
|
|
7534
7615
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
7616
|
+
/**
|
|
7617
|
+
* Disallow unnecessary nested ternary expressions.
|
|
7618
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-unnecessary-nested-ternary.md
|
|
7619
|
+
*/
|
|
7620
|
+
'unicorn/no-unnecessary-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
7535
7621
|
/**
|
|
7536
7622
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
7537
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7623
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-unnecessary-polyfills.md
|
|
7538
7624
|
*/
|
|
7539
7625
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
7540
7626
|
/**
|
|
7541
7627
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
7542
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7628
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-unnecessary-slice-end.md
|
|
7543
7629
|
*/
|
|
7544
7630
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
7545
7631
|
/**
|
|
7546
7632
|
* Disallow unreadable array destructuring.
|
|
7547
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7633
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-unreadable-array-destructuring.md
|
|
7548
7634
|
*/
|
|
7549
7635
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<[]>;
|
|
7550
7636
|
/**
|
|
7551
7637
|
* Disallow unreadable IIFEs.
|
|
7552
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7638
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-unreadable-iife.md
|
|
7553
7639
|
*/
|
|
7554
7640
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
7641
|
+
/**
|
|
7642
|
+
* Disallow ignoring the return value of selected array methods.
|
|
7643
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-unused-array-method-return.md
|
|
7644
|
+
*/
|
|
7645
|
+
'unicorn/no-unused-array-method-return'?: Linter.RuleEntry<[]>;
|
|
7555
7646
|
/**
|
|
7556
7647
|
* Disallow unused object properties.
|
|
7557
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7648
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-unused-properties.md
|
|
7558
7649
|
*/
|
|
7559
7650
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
7560
7651
|
/**
|
|
7561
7652
|
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
7562
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7653
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-useless-collection-argument.md
|
|
7563
7654
|
*/
|
|
7564
7655
|
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
|
|
7565
7656
|
/**
|
|
7566
7657
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
7567
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7658
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-useless-error-capture-stack-trace.md
|
|
7568
7659
|
*/
|
|
7569
7660
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
7570
7661
|
/**
|
|
7571
7662
|
* Disallow useless fallback when spreading in object literals.
|
|
7572
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7663
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-useless-fallback-in-spread.md
|
|
7573
7664
|
*/
|
|
7574
7665
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
7575
7666
|
/**
|
|
7576
7667
|
* Disallow unnecessary `.toArray()` on iterators.
|
|
7577
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7668
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-useless-iterator-to-array.md
|
|
7578
7669
|
*/
|
|
7579
7670
|
'unicorn/no-useless-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
7580
7671
|
/**
|
|
7581
7672
|
* Disallow useless array length check.
|
|
7582
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7673
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-useless-length-check.md
|
|
7583
7674
|
*/
|
|
7584
7675
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
7585
7676
|
/**
|
|
7586
7677
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
7587
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7678
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-useless-promise-resolve-reject.md
|
|
7588
7679
|
*/
|
|
7589
7680
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
7590
7681
|
/**
|
|
7591
7682
|
* Disallow unnecessary spread.
|
|
7592
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7683
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-useless-spread.md
|
|
7593
7684
|
*/
|
|
7594
7685
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
7595
7686
|
/**
|
|
7596
7687
|
* Disallow useless case in switch statements.
|
|
7597
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7688
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-useless-switch-case.md
|
|
7598
7689
|
*/
|
|
7599
7690
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
7600
7691
|
/**
|
|
7601
7692
|
* Disallow useless `undefined`.
|
|
7602
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7693
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-useless-undefined.md
|
|
7603
7694
|
*/
|
|
7604
7695
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
7605
7696
|
/**
|
|
7606
7697
|
* Disallow number literals with zero fractions or dangling dots.
|
|
7607
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7698
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/no-zero-fractions.md
|
|
7608
7699
|
*/
|
|
7609
7700
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
7610
7701
|
/**
|
|
7611
7702
|
* Enforce proper case for numeric literals.
|
|
7612
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7703
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/number-literal-case.md
|
|
7613
7704
|
*/
|
|
7614
7705
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
7615
7706
|
/**
|
|
7616
7707
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
7617
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7708
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/numeric-separators-style.md
|
|
7618
7709
|
*/
|
|
7619
7710
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
7620
7711
|
/**
|
|
7621
7712
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
7622
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7713
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-add-event-listener.md
|
|
7623
7714
|
*/
|
|
7624
7715
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
7625
7716
|
/**
|
|
7626
7717
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
7627
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7718
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-array-find.md
|
|
7628
7719
|
*/
|
|
7629
7720
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
7630
7721
|
/**
|
|
7631
7722
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
7632
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7723
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-array-flat.md
|
|
7633
7724
|
*/
|
|
7634
7725
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
7635
7726
|
/**
|
|
7636
7727
|
* Prefer `.flatMap(…)` over `.map(…).flat()`.
|
|
7637
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7728
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-array-flat-map.md
|
|
7638
7729
|
*/
|
|
7639
7730
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
7640
7731
|
/**
|
|
7641
7732
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
7642
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7733
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-array-index-of.md
|
|
7643
7734
|
*/
|
|
7644
7735
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
7736
|
+
/**
|
|
7737
|
+
* Prefer last-oriented array methods over `Array#reverse()` or `Array#toReversed()` followed by a method.
|
|
7738
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-array-last-methods.md
|
|
7739
|
+
*/
|
|
7740
|
+
'unicorn/prefer-array-last-methods'?: Linter.RuleEntry<[]>;
|
|
7645
7741
|
/**
|
|
7646
7742
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
7647
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7743
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-array-some.md
|
|
7648
7744
|
*/
|
|
7649
7745
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
7650
7746
|
/**
|
|
7651
7747
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
7652
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7748
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-at.md
|
|
7653
7749
|
*/
|
|
7654
7750
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
7655
7751
|
/**
|
|
7656
7752
|
* Prefer `BigInt` literals over the constructor.
|
|
7657
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7753
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-bigint-literals.md
|
|
7658
7754
|
*/
|
|
7659
7755
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
7660
7756
|
/**
|
|
7661
7757
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
7662
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7758
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-blob-reading-methods.md
|
|
7663
7759
|
*/
|
|
7664
7760
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
7665
7761
|
/**
|
|
7666
7762
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
7667
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7763
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-class-fields.md
|
|
7668
7764
|
*/
|
|
7669
7765
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
7670
7766
|
/**
|
|
7671
7767
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
7672
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7768
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-classlist-toggle.md
|
|
7673
7769
|
*/
|
|
7674
7770
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
7675
7771
|
/**
|
|
7676
7772
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
7677
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7773
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-code-point.md
|
|
7678
7774
|
*/
|
|
7679
7775
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
7680
7776
|
/**
|
|
7681
7777
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
7682
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7778
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-date-now.md
|
|
7683
7779
|
*/
|
|
7684
7780
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
7685
7781
|
/**
|
|
7686
7782
|
* Prefer default parameters over reassignment.
|
|
7687
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7783
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-default-parameters.md
|
|
7688
7784
|
*/
|
|
7689
7785
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
7690
7786
|
/**
|
|
7691
|
-
* Prefer `
|
|
7692
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7787
|
+
* Prefer `Element#append()` over `Node#appendChild()`.
|
|
7788
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-dom-node-append.md
|
|
7693
7789
|
*/
|
|
7694
7790
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
7695
7791
|
/**
|
|
7696
|
-
*
|
|
7697
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7792
|
+
* Renamed to `unicorn/dom-node-dataset`.
|
|
7793
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/deleted-and-deprecated-rules.md#prefer-dom-node-dataset
|
|
7794
|
+
* @deprecated
|
|
7698
7795
|
*/
|
|
7699
7796
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
7700
7797
|
/**
|
|
7701
7798
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
7702
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7799
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-dom-node-remove.md
|
|
7703
7800
|
*/
|
|
7704
7801
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
7705
7802
|
/**
|
|
7706
7803
|
* Prefer `.textContent` over `.innerText`.
|
|
7707
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7804
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-dom-node-text-content.md
|
|
7708
7805
|
*/
|
|
7709
7806
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
7710
7807
|
/**
|
|
7711
7808
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
7712
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7809
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-event-target.md
|
|
7713
7810
|
*/
|
|
7714
7811
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
7715
7812
|
/**
|
|
7716
7813
|
* Prefer `export…from` when re-exporting.
|
|
7717
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7814
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-export-from.md
|
|
7718
7815
|
*/
|
|
7719
7816
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
7817
|
+
/**
|
|
7818
|
+
* Prefer `.getOrInsertComputed()` when the default value has side effects.
|
|
7819
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-get-or-insert-computed.md
|
|
7820
|
+
*/
|
|
7821
|
+
'unicorn/prefer-get-or-insert-computed'?: Linter.RuleEntry<[]>;
|
|
7720
7822
|
/**
|
|
7721
7823
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
7722
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7824
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-global-this.md
|
|
7723
7825
|
*/
|
|
7724
7826
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
7827
|
+
/**
|
|
7828
|
+
* Prefer HTTPS over HTTP.
|
|
7829
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-https.md
|
|
7830
|
+
*/
|
|
7831
|
+
'unicorn/prefer-https'?: Linter.RuleEntry<[]>;
|
|
7725
7832
|
/**
|
|
7726
7833
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
7727
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7834
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-import-meta-properties.md
|
|
7728
7835
|
*/
|
|
7729
7836
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
7730
7837
|
/**
|
|
7731
7838
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
7732
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7839
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-includes.md
|
|
7733
7840
|
*/
|
|
7734
7841
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
7735
7842
|
/**
|
|
7736
|
-
* Prefer
|
|
7737
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7843
|
+
* Prefer `.includes()` over repeated equality comparisons.
|
|
7844
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-includes-over-repeated-comparisons.md
|
|
7845
|
+
*/
|
|
7846
|
+
'unicorn/prefer-includes-over-repeated-comparisons'?: Linter.RuleEntry<UnicornPreferIncludesOverRepeatedComparisons>;
|
|
7847
|
+
/**
|
|
7848
|
+
* Prefer `Iterator.concat(…)` over temporary spread arrays.
|
|
7849
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-iterator-concat.md
|
|
7850
|
+
*/
|
|
7851
|
+
'unicorn/prefer-iterator-concat'?: Linter.RuleEntry<[]>;
|
|
7852
|
+
/**
|
|
7853
|
+
* Prefer moving `.toArray()` to the end of iterator helper chains.
|
|
7854
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-iterator-to-array-at-end.md
|
|
7855
|
+
*/
|
|
7856
|
+
'unicorn/prefer-iterator-to-array-at-end'?: Linter.RuleEntry<[]>;
|
|
7857
|
+
/**
|
|
7858
|
+
* Renamed to `unicorn/consistent-json-file-read`.
|
|
7859
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/deleted-and-deprecated-rules.md#prefer-json-parse-buffer
|
|
7860
|
+
* @deprecated
|
|
7738
7861
|
*/
|
|
7739
7862
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
7740
7863
|
/**
|
|
7741
|
-
* Prefer `KeyboardEvent#key` over
|
|
7742
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7864
|
+
* Prefer `KeyboardEvent#key` over deprecated keyboard event properties.
|
|
7865
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-keyboard-event-key.md
|
|
7743
7866
|
*/
|
|
7744
7867
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
7745
7868
|
/**
|
|
7746
7869
|
* Prefer using a logical operator over a ternary.
|
|
7747
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7870
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-logical-operator-over-ternary.md
|
|
7748
7871
|
*/
|
|
7749
7872
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
7873
|
+
/**
|
|
7874
|
+
* Prefer `Math.abs()` over manual absolute value expressions and symmetric range checks.
|
|
7875
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-math-abs.md
|
|
7876
|
+
*/
|
|
7877
|
+
'unicorn/prefer-math-abs'?: Linter.RuleEntry<[]>;
|
|
7750
7878
|
/**
|
|
7751
7879
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
7752
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7880
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-math-min-max.md
|
|
7753
7881
|
*/
|
|
7754
7882
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
7755
7883
|
/**
|
|
7756
7884
|
* Enforce the use of `Math.trunc` instead of bitwise operators.
|
|
7757
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7885
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-math-trunc.md
|
|
7758
7886
|
*/
|
|
7759
7887
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
7760
7888
|
/**
|
|
7761
7889
|
* Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
|
|
7762
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7890
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-modern-dom-apis.md
|
|
7763
7891
|
*/
|
|
7764
7892
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
7765
7893
|
/**
|
|
7766
7894
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
7767
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7895
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-modern-math-apis.md
|
|
7768
7896
|
*/
|
|
7769
7897
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
7770
7898
|
/**
|
|
7771
7899
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
7772
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7900
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-module.md
|
|
7773
7901
|
*/
|
|
7774
7902
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
7775
7903
|
/**
|
|
7776
7904
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
7777
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7905
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-native-coercion-functions.md
|
|
7778
7906
|
*/
|
|
7779
7907
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
7780
7908
|
/**
|
|
7781
7909
|
* Prefer negative index over `.length - index` when possible.
|
|
7782
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7910
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-negative-index.md
|
|
7783
7911
|
*/
|
|
7784
7912
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
7785
7913
|
/**
|
|
7786
7914
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
7787
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7915
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-node-protocol.md
|
|
7788
7916
|
*/
|
|
7789
7917
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
7790
7918
|
/**
|
|
7791
7919
|
* Prefer `Number` static properties over global ones.
|
|
7792
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7920
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-number-properties.md
|
|
7793
7921
|
*/
|
|
7794
7922
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
7795
7923
|
/**
|
|
7796
7924
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
7797
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7925
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-object-from-entries.md
|
|
7798
7926
|
*/
|
|
7799
7927
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
7800
7928
|
/**
|
|
7801
7929
|
* Prefer omitting the `catch` binding parameter.
|
|
7802
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7930
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-optional-catch-binding.md
|
|
7803
7931
|
*/
|
|
7804
7932
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
7805
7933
|
/**
|
|
7806
7934
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
7807
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7935
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-prototype-methods.md
|
|
7808
7936
|
*/
|
|
7809
7937
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
7810
7938
|
/**
|
|
7811
|
-
* Prefer `.querySelector()`
|
|
7812
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7939
|
+
* Prefer `.querySelector()` and `.querySelectorAll()` over older DOM query methods.
|
|
7940
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-query-selector.md
|
|
7941
|
+
*/
|
|
7942
|
+
'unicorn/prefer-query-selector'?: Linter.RuleEntry<UnicornPreferQuerySelector>;
|
|
7943
|
+
/**
|
|
7944
|
+
* Prefer `queueMicrotask()` over `process.nextTick()`, `setImmediate()`, and `setTimeout(…, 0)`.
|
|
7945
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-queue-microtask.md
|
|
7813
7946
|
*/
|
|
7814
|
-
'unicorn/prefer-
|
|
7947
|
+
'unicorn/prefer-queue-microtask'?: Linter.RuleEntry<UnicornPreferQueueMicrotask>;
|
|
7815
7948
|
/**
|
|
7816
7949
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
7817
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7950
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-reflect-apply.md
|
|
7818
7951
|
*/
|
|
7819
7952
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
7820
7953
|
/**
|
|
7821
7954
|
* Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
|
|
7822
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7955
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-regexp-test.md
|
|
7823
7956
|
*/
|
|
7824
7957
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
7825
7958
|
/**
|
|
7826
7959
|
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
7827
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7960
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-response-static-json.md
|
|
7828
7961
|
*/
|
|
7829
7962
|
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
|
|
7830
7963
|
/**
|
|
7831
7964
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
7832
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7965
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-set-has.md
|
|
7833
7966
|
*/
|
|
7834
|
-
'unicorn/prefer-set-has'?: Linter.RuleEntry<
|
|
7967
|
+
'unicorn/prefer-set-has'?: Linter.RuleEntry<UnicornPreferSetHas>;
|
|
7835
7968
|
/**
|
|
7836
7969
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
7837
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7970
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-set-size.md
|
|
7838
7971
|
*/
|
|
7839
7972
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
7840
7973
|
/**
|
|
7841
7974
|
* Prefer simple conditions first in logical expressions.
|
|
7842
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7975
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-simple-condition-first.md
|
|
7843
7976
|
*/
|
|
7844
7977
|
'unicorn/prefer-simple-condition-first'?: Linter.RuleEntry<[]>;
|
|
7845
7978
|
/**
|
|
7846
|
-
* Enforce combining multiple `Array#push()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
7847
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7979
|
+
* Enforce combining multiple `Array#{push,unshift}()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
7980
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-single-call.md
|
|
7848
7981
|
*/
|
|
7849
7982
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
7983
|
+
/**
|
|
7984
|
+
* Prefer `String#split()` with a limit.
|
|
7985
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-split-limit.md
|
|
7986
|
+
*/
|
|
7987
|
+
'unicorn/prefer-split-limit'?: Linter.RuleEntry<[]>;
|
|
7850
7988
|
/**
|
|
7851
7989
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
|
|
7852
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7990
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-spread.md
|
|
7853
7991
|
*/
|
|
7854
7992
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
7993
|
+
/**
|
|
7994
|
+
* Prefer `String#matchAll()` over `RegExp#exec()` loops.
|
|
7995
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-string-match-all.md
|
|
7996
|
+
*/
|
|
7997
|
+
'unicorn/prefer-string-match-all'?: Linter.RuleEntry<[]>;
|
|
7998
|
+
/**
|
|
7999
|
+
* Prefer `String#padStart()` and `String#padEnd()` over manual string padding.
|
|
8000
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-string-pad-start-end.md
|
|
8001
|
+
*/
|
|
8002
|
+
'unicorn/prefer-string-pad-start-end'?: Linter.RuleEntry<[]>;
|
|
7855
8003
|
/**
|
|
7856
8004
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
7857
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8005
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-string-raw.md
|
|
7858
8006
|
*/
|
|
7859
8007
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
7860
8008
|
/**
|
|
7861
|
-
* Prefer `String#
|
|
7862
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8009
|
+
* Prefer `String#repeat()` for repeated whitespace.
|
|
8010
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-string-repeat.md
|
|
8011
|
+
*/
|
|
8012
|
+
'unicorn/prefer-string-repeat'?: Linter.RuleEntry<UnicornPreferStringRepeat>;
|
|
8013
|
+
/**
|
|
8014
|
+
* Prefer `String#replaceAll()` over regex searches with the global flag and `String#split().join()`.
|
|
8015
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-string-replace-all.md
|
|
7863
8016
|
*/
|
|
7864
8017
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
7865
8018
|
/**
|
|
7866
8019
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
7867
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8020
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-string-slice.md
|
|
7868
8021
|
*/
|
|
7869
8022
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
7870
8023
|
/**
|
|
7871
8024
|
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
|
|
7872
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8025
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-string-starts-ends-with.md
|
|
7873
8026
|
*/
|
|
7874
8027
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
7875
8028
|
/**
|
|
7876
8029
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
7877
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8030
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-string-trim-start-end.md
|
|
7878
8031
|
*/
|
|
7879
8032
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
7880
8033
|
/**
|
|
7881
8034
|
* Prefer using `structuredClone` to create a deep clone.
|
|
7882
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8035
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-structured-clone.md
|
|
7883
8036
|
*/
|
|
7884
8037
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
7885
8038
|
/**
|
|
7886
8039
|
* Prefer `switch` over multiple `else-if`.
|
|
7887
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8040
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-switch.md
|
|
7888
8041
|
*/
|
|
7889
8042
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
7890
8043
|
/**
|
|
7891
8044
|
* Prefer ternary expressions over simple `if-else` statements.
|
|
7892
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8045
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-ternary.md
|
|
7893
8046
|
*/
|
|
7894
8047
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
7895
8048
|
/**
|
|
7896
8049
|
* Prefer top-level await over top-level promises and async function calls.
|
|
7897
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8050
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-top-level-await.md
|
|
7898
8051
|
*/
|
|
7899
8052
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
7900
8053
|
/**
|
|
7901
8054
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
7902
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8055
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prefer-type-error.md
|
|
7903
8056
|
*/
|
|
7904
8057
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
7905
8058
|
/**
|
|
7906
8059
|
* Prevent abbreviations.
|
|
7907
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8060
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/prevent-abbreviations.md
|
|
7908
8061
|
*/
|
|
7909
8062
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<UnicornPreventAbbreviations>;
|
|
7910
8063
|
/**
|
|
7911
8064
|
* Enforce consistent relative URL style.
|
|
7912
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8065
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/relative-url-style.md
|
|
7913
8066
|
*/
|
|
7914
8067
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
7915
8068
|
/**
|
|
7916
8069
|
* Enforce using the separator argument with `Array#join()`.
|
|
7917
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8070
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/require-array-join-separator.md
|
|
7918
8071
|
*/
|
|
7919
8072
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
8073
|
+
/**
|
|
8074
|
+
* Require `CSS.escape()` for interpolated values in CSS selectors.
|
|
8075
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/require-css-escape.md
|
|
8076
|
+
*/
|
|
8077
|
+
'unicorn/require-css-escape'?: Linter.RuleEntry<UnicornRequireCssEscape>;
|
|
7920
8078
|
/**
|
|
7921
8079
|
* Require non-empty module attributes for imports and exports
|
|
7922
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8080
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/require-module-attributes.md
|
|
7923
8081
|
*/
|
|
7924
8082
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
7925
8083
|
/**
|
|
7926
8084
|
* Require non-empty specifier list in import and export statements.
|
|
7927
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8085
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/require-module-specifiers.md
|
|
7928
8086
|
*/
|
|
7929
8087
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
7930
8088
|
/**
|
|
7931
8089
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
7932
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8090
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/require-number-to-fixed-digits-argument.md
|
|
7933
8091
|
*/
|
|
7934
8092
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
8093
|
+
/**
|
|
8094
|
+
* Require passive event listeners for high-frequency events.
|
|
8095
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/require-passive-events.md
|
|
8096
|
+
*/
|
|
8097
|
+
'unicorn/require-passive-events'?: Linter.RuleEntry<[]>;
|
|
7935
8098
|
/**
|
|
7936
8099
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
7937
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8100
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/require-post-message-target-origin.md
|
|
7938
8101
|
*/
|
|
7939
8102
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
7940
8103
|
/**
|
|
7941
8104
|
* Enforce better string content.
|
|
7942
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8105
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/string-content.md
|
|
7943
8106
|
*/
|
|
7944
8107
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
7945
8108
|
/**
|
|
7946
8109
|
* Enforce consistent brace style for `case` clauses.
|
|
7947
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8110
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/switch-case-braces.md
|
|
7948
8111
|
*/
|
|
7949
8112
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
7950
8113
|
/**
|
|
7951
8114
|
* Enforce consistent `break`/`return`/`continue`/`throw` position in `case` clauses.
|
|
7952
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8115
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/switch-case-break-position.md
|
|
7953
8116
|
*/
|
|
7954
8117
|
'unicorn/switch-case-break-position'?: Linter.RuleEntry<[]>;
|
|
7955
8118
|
/**
|
|
7956
8119
|
* Fix whitespace-insensitive template indentation.
|
|
7957
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8120
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/template-indent.md
|
|
7958
8121
|
*/
|
|
7959
8122
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
7960
8123
|
/**
|
|
7961
8124
|
* Enforce consistent case for text encoding identifiers.
|
|
7962
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8125
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/text-encoding-identifier-case.md
|
|
7963
8126
|
*/
|
|
7964
8127
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
7965
8128
|
/**
|
|
7966
8129
|
* Require `new` when creating an error.
|
|
7967
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8130
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/throw-new-error.md
|
|
7968
8131
|
*/
|
|
7969
8132
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
8133
|
+
/**
|
|
8134
|
+
* Limit the complexity of `try` blocks.
|
|
8135
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v65.0.1/docs/rules/try-complexity.md
|
|
8136
|
+
*/
|
|
8137
|
+
'unicorn/try-complexity'?: Linter.RuleEntry<UnicornTryComplexity>;
|
|
7970
8138
|
/**
|
|
7971
8139
|
* Require calls to `isNaN()` when checking for `NaN`
|
|
7972
8140
|
* @see https://eslint.org/docs/latest/rules/use-isnan
|
|
@@ -8591,6 +8759,11 @@ interface RuleOptions {
|
|
|
8591
8759
|
* @see https://github.com/marcalexiei/eslint-zod/blob/HEAD/plugins/eslint-plugin-zod/docs/rules/no-any-schema.md
|
|
8592
8760
|
*/
|
|
8593
8761
|
'zod/no-any-schema'?: Linter.RuleEntry<[]>;
|
|
8762
|
+
/**
|
|
8763
|
+
* Disallow `z.coerce.boolean()` because it treats any non-empty string as `true`.
|
|
8764
|
+
* @see https://github.com/marcalexiei/eslint-zod/blob/HEAD/plugins/eslint-plugin-zod/docs/rules/no-coerce-boolean.md
|
|
8765
|
+
*/
|
|
8766
|
+
'zod/no-coerce-boolean'?: Linter.RuleEntry<[]>;
|
|
8594
8767
|
/**
|
|
8595
8768
|
* Disallow calling the same schema method more than once in a single chain
|
|
8596
8769
|
* @see https://github.com/marcalexiei/eslint-zod/blob/HEAD/plugins/eslint-plugin-zod/docs/rules/no-duplicate-schema-methods.md
|
|
@@ -14201,23 +14374,40 @@ type TurboNoUndeclaredEnvVars = [] | [{
|
|
|
14201
14374
|
cwd?: string;
|
|
14202
14375
|
allowList?: string[];
|
|
14203
14376
|
}]; // ----- unicode-bom -----
|
|
14204
|
-
type UnicodeBom = [] | [("always" | "never")]; // ----- unicorn/
|
|
14205
|
-
type UnicornBetterRegex = [] | [{
|
|
14206
|
-
sortCharacterClasses?: boolean;
|
|
14207
|
-
}]; // ----- unicorn/catch-error-name -----
|
|
14377
|
+
type UnicodeBom = [] | [("always" | "never")]; // ----- unicorn/catch-error-name -----
|
|
14208
14378
|
type UnicornCatchErrorName = [] | [{
|
|
14209
14379
|
name?: string;
|
|
14210
14380
|
ignore?: unknown[];
|
|
14211
|
-
}]; // ----- unicorn/consistent-
|
|
14381
|
+
}]; // ----- unicorn/consistent-compound-words -----
|
|
14382
|
+
type UnicornConsistentCompoundWords = [] | [{
|
|
14383
|
+
checkProperties?: boolean;
|
|
14384
|
+
checkVariables?: boolean;
|
|
14385
|
+
checkDefaultAndNamespaceImports?: (boolean | "internal");
|
|
14386
|
+
checkShorthandImports?: (boolean | "internal");
|
|
14387
|
+
checkShorthandProperties?: boolean;
|
|
14388
|
+
extendDefaultReplacements?: boolean;
|
|
14389
|
+
replacements?: _UnicornConsistentCompoundWords_Replacements;
|
|
14390
|
+
allowList?: _UnicornConsistentCompoundWords_TrueObject;
|
|
14391
|
+
}];
|
|
14392
|
+
interface _UnicornConsistentCompoundWords_Replacements {
|
|
14393
|
+
[k: string]: (false | string) | undefined;
|
|
14394
|
+
}
|
|
14395
|
+
interface _UnicornConsistentCompoundWords_TrueObject {
|
|
14396
|
+
[k: string]: true | undefined;
|
|
14397
|
+
} // ----- unicorn/consistent-function-scoping -----
|
|
14212
14398
|
type UnicornConsistentFunctionScoping = [] | [{
|
|
14213
14399
|
checkArrowFunctions?: boolean;
|
|
14400
|
+
}]; // ----- unicorn/consistent-json-file-read -----
|
|
14401
|
+
type UnicornConsistentJsonFileRead = [] | [("string" | "buffer")]; // ----- unicorn/dom-node-dataset -----
|
|
14402
|
+
type UnicornDomNodeDataset = [] | [{
|
|
14403
|
+
preferAttributes?: boolean;
|
|
14214
14404
|
}]; // ----- unicorn/escape-case -----
|
|
14215
14405
|
type UnicornEscapeCase = [] | [("uppercase" | "lowercase")]; // ----- unicorn/expiring-todo-comments -----
|
|
14216
14406
|
type UnicornExpiringTodoComments = [] | [{
|
|
14217
14407
|
terms?: string[];
|
|
14218
14408
|
ignore?: unknown[];
|
|
14219
|
-
|
|
14220
|
-
|
|
14409
|
+
checkDates?: boolean;
|
|
14410
|
+
checkDatesOnPullRequests?: boolean;
|
|
14221
14411
|
allowWarningComments?: boolean;
|
|
14222
14412
|
date?: string;
|
|
14223
14413
|
}]; // ----- unicorn/explicit-length-check -----
|
|
@@ -14228,6 +14418,7 @@ type UnicornFilenameCase = [] | [({
|
|
|
14228
14418
|
case?: ("camelCase" | "snakeCase" | "kebabCase" | "pascalCase");
|
|
14229
14419
|
ignore?: unknown[];
|
|
14230
14420
|
multipleFileExtensions?: boolean;
|
|
14421
|
+
checkDirectories?: boolean;
|
|
14231
14422
|
} | {
|
|
14232
14423
|
cases?: {
|
|
14233
14424
|
camelCase?: boolean;
|
|
@@ -14237,6 +14428,7 @@ type UnicornFilenameCase = [] | [({
|
|
|
14237
14428
|
};
|
|
14238
14429
|
ignore?: unknown[];
|
|
14239
14430
|
multipleFileExtensions?: boolean;
|
|
14431
|
+
checkDirectories?: boolean;
|
|
14240
14432
|
})]; // ----- unicorn/import-style -----
|
|
14241
14433
|
type UnicornImportStyle = [] | [{
|
|
14242
14434
|
checkImport?: boolean;
|
|
@@ -14260,6 +14452,9 @@ type UnicornIsolatedFunctions = [] | [{
|
|
|
14260
14452
|
functions?: string[];
|
|
14261
14453
|
selectors?: string[];
|
|
14262
14454
|
comments?: string[];
|
|
14455
|
+
}]; // ----- unicorn/no-array-callback-reference -----
|
|
14456
|
+
type UnicornNoArrayCallbackReference = [] | [{
|
|
14457
|
+
ignore?: string[];
|
|
14263
14458
|
}]; // ----- unicorn/no-array-reduce -----
|
|
14264
14459
|
type UnicornNoArrayReduce = [] | [{
|
|
14265
14460
|
allowSimpleOperations?: boolean;
|
|
@@ -14269,6 +14464,9 @@ type UnicornNoArrayReverse = [] | [{
|
|
|
14269
14464
|
}]; // ----- unicorn/no-array-sort -----
|
|
14270
14465
|
type UnicornNoArraySort = [] | [{
|
|
14271
14466
|
allowExpressionStatement?: boolean;
|
|
14467
|
+
}]; // ----- unicorn/no-empty-file -----
|
|
14468
|
+
type UnicornNoEmptyFile = [] | [{
|
|
14469
|
+
allowComments?: boolean;
|
|
14272
14470
|
}]; // ----- unicorn/no-instanceof-builtins -----
|
|
14273
14471
|
type UnicornNoInstanceofBuiltins = [] | [{
|
|
14274
14472
|
useErrorIsError?: boolean;
|
|
@@ -14282,13 +14480,14 @@ type UnicornNoKeywordPrefix = [] | [{
|
|
|
14282
14480
|
onlyCamelCase?: boolean;
|
|
14283
14481
|
}]; // ----- unicorn/no-null -----
|
|
14284
14482
|
type UnicornNoNull = [] | [{
|
|
14483
|
+
checkArguments?: boolean;
|
|
14285
14484
|
checkStrictEquality?: boolean;
|
|
14286
14485
|
}]; // ----- unicorn/no-typeof-undefined -----
|
|
14287
14486
|
type UnicornNoTypeofUndefined = [] | [{
|
|
14288
14487
|
checkGlobalVariables?: boolean;
|
|
14289
14488
|
}]; // ----- unicorn/no-unnecessary-polyfills -----
|
|
14290
14489
|
type UnicornNoUnnecessaryPolyfills = [] | [{
|
|
14291
|
-
targets
|
|
14490
|
+
targets?: (string | unknown[] | {
|
|
14292
14491
|
[k: string]: unknown | undefined;
|
|
14293
14492
|
});
|
|
14294
14493
|
}]; // ----- unicorn/no-useless-undefined -----
|
|
@@ -14319,6 +14518,7 @@ type UnicornNumericSeparatorsStyle = [] | [{
|
|
|
14319
14518
|
onlyIfContainsSeparator?: boolean;
|
|
14320
14519
|
minimumDigits?: number;
|
|
14321
14520
|
groupLength?: number;
|
|
14521
|
+
fractionGroupLength?: number;
|
|
14322
14522
|
};
|
|
14323
14523
|
onlyIfContainsSeparator?: boolean;
|
|
14324
14524
|
}]; // ----- unicorn/prefer-add-event-listener -----
|
|
@@ -14336,7 +14536,10 @@ type UnicornPreferAt = [] | [{
|
|
|
14336
14536
|
checkAllIndexAccess?: boolean;
|
|
14337
14537
|
}]; // ----- unicorn/prefer-export-from -----
|
|
14338
14538
|
type UnicornPreferExportFrom = [] | [{
|
|
14339
|
-
|
|
14539
|
+
checkUsedVariables?: boolean;
|
|
14540
|
+
}]; // ----- unicorn/prefer-includes-over-repeated-comparisons -----
|
|
14541
|
+
type UnicornPreferIncludesOverRepeatedComparisons = [] | [{
|
|
14542
|
+
minimumComparisons?: number;
|
|
14340
14543
|
}]; // ----- unicorn/prefer-number-properties -----
|
|
14341
14544
|
type UnicornPreferNumberProperties = [] | [{
|
|
14342
14545
|
checkInfinity?: boolean;
|
|
@@ -14344,9 +14547,22 @@ type UnicornPreferNumberProperties = [] | [{
|
|
|
14344
14547
|
}]; // ----- unicorn/prefer-object-from-entries -----
|
|
14345
14548
|
type UnicornPreferObjectFromEntries = [] | [{
|
|
14346
14549
|
functions?: unknown[];
|
|
14550
|
+
}]; // ----- unicorn/prefer-query-selector -----
|
|
14551
|
+
type UnicornPreferQuerySelector = [] | [{
|
|
14552
|
+
allowWithVariables?: boolean;
|
|
14553
|
+
}]; // ----- unicorn/prefer-queue-microtask -----
|
|
14554
|
+
type UnicornPreferQueueMicrotask = [] | [{
|
|
14555
|
+
checkSetImmediate?: boolean;
|
|
14556
|
+
checkSetTimeout?: boolean;
|
|
14557
|
+
}]; // ----- unicorn/prefer-set-has -----
|
|
14558
|
+
type UnicornPreferSetHas = [] | [{
|
|
14559
|
+
minimumItems?: number;
|
|
14347
14560
|
}]; // ----- unicorn/prefer-single-call -----
|
|
14348
14561
|
type UnicornPreferSingleCall = [] | [{
|
|
14349
14562
|
ignore?: unknown[];
|
|
14563
|
+
}]; // ----- unicorn/prefer-string-repeat -----
|
|
14564
|
+
type UnicornPreferStringRepeat = [] | [{
|
|
14565
|
+
minimumRepetitions?: number;
|
|
14350
14566
|
}]; // ----- unicorn/prefer-structured-clone -----
|
|
14351
14567
|
type UnicornPreferStructuredClone = [] | [{
|
|
14352
14568
|
functions?: unknown[];
|
|
@@ -14379,15 +14595,20 @@ interface _UnicornPreventAbbreviations_BooleanObject {
|
|
|
14379
14595
|
interface _UnicornPreventAbbreviations_BooleanObject {
|
|
14380
14596
|
[k: string]: boolean | undefined;
|
|
14381
14597
|
} // ----- unicorn/relative-url-style -----
|
|
14382
|
-
type UnicornRelativeUrlStyle = [] | [("never" | "always")]; // ----- unicorn/
|
|
14598
|
+
type UnicornRelativeUrlStyle = [] | [("never" | "always")]; // ----- unicorn/require-css-escape -----
|
|
14599
|
+
type UnicornRequireCssEscape = [] | [{
|
|
14600
|
+
checkAllSelectors?: boolean;
|
|
14601
|
+
}]; // ----- unicorn/string-content -----
|
|
14383
14602
|
type UnicornStringContent = [] | [{
|
|
14384
14603
|
patterns?: {
|
|
14385
14604
|
[k: string]: (string | {
|
|
14386
14605
|
suggest: string;
|
|
14387
14606
|
fix?: boolean;
|
|
14607
|
+
caseSensitive?: boolean;
|
|
14388
14608
|
message?: string;
|
|
14389
14609
|
}) | undefined;
|
|
14390
14610
|
};
|
|
14611
|
+
selectors?: string[];
|
|
14391
14612
|
}]; // ----- unicorn/switch-case-braces -----
|
|
14392
14613
|
type UnicornSwitchCaseBraces = [] | [("always" | "avoid")]; // ----- unicorn/template-indent -----
|
|
14393
14614
|
type UnicornTemplateIndent = [] | [{
|
|
@@ -14399,6 +14620,9 @@ type UnicornTemplateIndent = [] | [{
|
|
|
14399
14620
|
}]; // ----- unicorn/text-encoding-identifier-case -----
|
|
14400
14621
|
type UnicornTextEncodingIdentifierCase = [] | [{
|
|
14401
14622
|
withDash?: boolean;
|
|
14623
|
+
}]; // ----- unicorn/try-complexity -----
|
|
14624
|
+
type UnicornTryComplexity = [] | [{
|
|
14625
|
+
max?: number;
|
|
14402
14626
|
}]; // ----- use-isnan -----
|
|
14403
14627
|
type UseIsnan = [] | [{
|
|
14404
14628
|
enforceForSwitchCase?: boolean;
|