@shayanthenerd/eslint-config 0.27.1 → 0.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/configs/css.mjs +6 -2
- package/dist/configs/markdown.mjs +6 -2
- package/dist/rules/astro.mjs +0 -2
- package/dist/rules/css.mjs +8 -3
- package/dist/rules/markdown.mjs +4 -2
- package/dist/rules/tailwind.mjs +1 -1
- package/dist/rules/unicorn.mjs +3 -0
- package/dist/types/eslint-schema.d.mts +400 -337
- package/package.json +11 -11
|
@@ -1796,6 +1796,7 @@ interface ESLintSchema {
|
|
|
1796
1796
|
/**
|
|
1797
1797
|
* Disallow function declarations that contain unsafe references inside loop statements
|
|
1798
1798
|
* @see https://typescript-eslint.io/rules/no-loop-func
|
|
1799
|
+
* @deprecated
|
|
1799
1800
|
*/
|
|
1800
1801
|
'@typescript-eslint/no-loop-func'?: Linter.RuleEntry<[]>;
|
|
1801
1802
|
/**
|
|
@@ -2497,6 +2498,7 @@ interface ESLintSchema {
|
|
|
2497
2498
|
/**
|
|
2498
2499
|
* disallow omitted end tags
|
|
2499
2500
|
* @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-omitted-end-tags/
|
|
2501
|
+
* @deprecated
|
|
2500
2502
|
*/
|
|
2501
2503
|
'astro/no-omitted-end-tags'?: Linter.RuleEntry<[]>;
|
|
2502
2504
|
/**
|
|
@@ -2557,6 +2559,7 @@ interface ESLintSchema {
|
|
|
2557
2559
|
/**
|
|
2558
2560
|
* disallow warnings when compiling.
|
|
2559
2561
|
* @see https://ota-meshi.github.io/eslint-plugin-astro/rules/valid-compile/
|
|
2562
|
+
* @deprecated
|
|
2560
2563
|
*/
|
|
2561
2564
|
'astro/valid-compile'?: Linter.RuleEntry<[]>;
|
|
2562
2565
|
/**
|
|
@@ -2821,7 +2824,7 @@ interface ESLintSchema {
|
|
|
2821
2824
|
*/
|
|
2822
2825
|
'cypress/assertion-before-screenshot'?: Linter.RuleEntry<[]>;
|
|
2823
2826
|
/**
|
|
2824
|
-
* enforce
|
|
2827
|
+
* enforce `.should()` over `.and()` for starting assertion chains
|
|
2825
2828
|
* @see https://github.com/cypress-io/eslint-plugin-cypress/blob/master/docs/rules/no-and.md
|
|
2826
2829
|
*/
|
|
2827
2830
|
'cypress/no-and'?: Linter.RuleEntry<[]>;
|
|
@@ -6176,1670 +6179,1715 @@ interface ESLintSchema {
|
|
|
6176
6179
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
|
|
6177
6180
|
/**
|
|
6178
6181
|
* Prefer better DOM traversal APIs.
|
|
6179
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6182
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/better-dom-traversing.md
|
|
6180
6183
|
*/
|
|
6181
6184
|
'unicorn/better-dom-traversing'?: Linter.RuleEntry<[]>;
|
|
6182
6185
|
/**
|
|
6183
6186
|
* Removed. Prefer `eslint-plugin-regexp`
|
|
6184
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6187
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/deleted-and-deprecated-rules.md#better-regex
|
|
6185
6188
|
* @deprecated
|
|
6186
6189
|
*/
|
|
6187
6190
|
'unicorn/better-regex'?: Linter.RuleEntry<[]>;
|
|
6188
6191
|
/**
|
|
6189
6192
|
* Enforce a specific parameter name in catch clauses.
|
|
6190
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6193
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/catch-error-name.md
|
|
6191
6194
|
*/
|
|
6192
6195
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
6193
6196
|
/**
|
|
6194
6197
|
* Enforce consistent class references in static methods.
|
|
6195
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6198
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/class-reference-in-static-methods.md
|
|
6196
6199
|
*/
|
|
6197
6200
|
'unicorn/class-reference-in-static-methods'?: Linter.RuleEntry<UnicornClassReferenceInStaticMethods>;
|
|
6198
6201
|
/**
|
|
6199
6202
|
* Enforce better comment content.
|
|
6200
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6203
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/comment-content.md
|
|
6201
6204
|
*/
|
|
6202
6205
|
'unicorn/comment-content'?: Linter.RuleEntry<UnicornCommentContent>;
|
|
6203
6206
|
/**
|
|
6204
6207
|
* Enforce consistent assertion style with `node:assert`.
|
|
6205
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6208
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-assert.md
|
|
6206
6209
|
*/
|
|
6207
6210
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
6208
6211
|
/**
|
|
6209
6212
|
* Enforce consistent naming for boolean names.
|
|
6210
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6213
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-boolean-name.md
|
|
6211
6214
|
*/
|
|
6212
6215
|
'unicorn/consistent-boolean-name'?: Linter.RuleEntry<UnicornConsistentBooleanName>;
|
|
6213
6216
|
/**
|
|
6214
6217
|
* Enforce consistent class member order.
|
|
6215
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6218
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-class-member-order.md
|
|
6216
6219
|
*/
|
|
6217
6220
|
'unicorn/consistent-class-member-order'?: Linter.RuleEntry<UnicornConsistentClassMemberOrder>;
|
|
6218
6221
|
/**
|
|
6219
6222
|
* Enforce consistent spelling of compound words in identifiers.
|
|
6220
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6223
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-compound-words.md
|
|
6221
6224
|
*/
|
|
6222
6225
|
'unicorn/consistent-compound-words'?: Linter.RuleEntry<UnicornConsistentCompoundWords>;
|
|
6223
6226
|
/**
|
|
6224
6227
|
* Enforce consistent conditional object spread style.
|
|
6225
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6228
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-conditional-object-spread.md
|
|
6226
6229
|
*/
|
|
6227
6230
|
'unicorn/consistent-conditional-object-spread'?: Linter.RuleEntry<UnicornConsistentConditionalObjectSpread>;
|
|
6228
6231
|
/**
|
|
6229
6232
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
6230
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6233
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-date-clone.md
|
|
6231
6234
|
*/
|
|
6232
6235
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
6233
6236
|
/**
|
|
6234
6237
|
* Use destructured variables over properties.
|
|
6235
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6238
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-destructuring.md
|
|
6236
6239
|
*/
|
|
6237
6240
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
6238
6241
|
/**
|
|
6239
6242
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
6240
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6243
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-empty-array-spread.md
|
|
6241
6244
|
*/
|
|
6242
6245
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
6243
6246
|
/**
|
|
6244
6247
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
6245
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6248
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-existence-index-check.md
|
|
6246
6249
|
*/
|
|
6247
6250
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
6248
6251
|
/**
|
|
6249
6252
|
* Enforce consistent decorator position on exported classes.
|
|
6250
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6253
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-export-decorator-position.md
|
|
6251
6254
|
*/
|
|
6252
6255
|
'unicorn/consistent-export-decorator-position'?: Linter.RuleEntry<UnicornConsistentExportDecoratorPosition>;
|
|
6253
6256
|
/**
|
|
6254
6257
|
* Move function definitions to the highest possible scope.
|
|
6255
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6258
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-function-scoping.md
|
|
6256
6259
|
*/
|
|
6257
6260
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
6258
6261
|
/**
|
|
6259
6262
|
* Enforce function syntax by role.
|
|
6260
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6263
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-function-style.md
|
|
6261
6264
|
*/
|
|
6262
6265
|
'unicorn/consistent-function-style'?: Linter.RuleEntry<UnicornConsistentFunctionStyle>;
|
|
6263
6266
|
/**
|
|
6264
6267
|
* Enforce consistent JSON file reads before `JSON.parse()`.
|
|
6265
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6268
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-json-file-read.md
|
|
6266
6269
|
*/
|
|
6267
6270
|
'unicorn/consistent-json-file-read'?: Linter.RuleEntry<UnicornConsistentJsonFileRead>;
|
|
6268
6271
|
/**
|
|
6269
6272
|
* Enforce consistent optional chaining for same-base member access.
|
|
6270
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6273
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-optional-chaining.md
|
|
6271
6274
|
*/
|
|
6272
6275
|
'unicorn/consistent-optional-chaining'?: Linter.RuleEntry<[]>;
|
|
6273
6276
|
/**
|
|
6274
6277
|
* Enforce consistent style for escaping `${` in template literals.
|
|
6275
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6278
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-template-literal-escape.md
|
|
6276
6279
|
*/
|
|
6277
6280
|
'unicorn/consistent-template-literal-escape'?: Linter.RuleEntry<[]>;
|
|
6278
6281
|
/**
|
|
6279
6282
|
* Enforce consistent labels on tuple type elements.
|
|
6280
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6283
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/consistent-tuple-labels.md
|
|
6281
6284
|
*/
|
|
6282
6285
|
'unicorn/consistent-tuple-labels'?: Linter.RuleEntry<[]>;
|
|
6283
6286
|
/**
|
|
6284
6287
|
* Enforce correct `Error` subclassing.
|
|
6285
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6288
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/custom-error-definition.md
|
|
6286
6289
|
*/
|
|
6287
6290
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
6288
6291
|
/**
|
|
6289
6292
|
* Enforce consistent default export declarations.
|
|
6290
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6293
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/default-export-style.md
|
|
6291
6294
|
*/
|
|
6292
6295
|
'unicorn/default-export-style'?: Linter.RuleEntry<UnicornDefaultExportStyle>;
|
|
6293
6296
|
/**
|
|
6294
6297
|
* Enforce consistent style for DOM element dataset access.
|
|
6295
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6298
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/dom-node-dataset.md
|
|
6296
6299
|
*/
|
|
6297
6300
|
'unicorn/dom-node-dataset'?: Linter.RuleEntry<UnicornDomNodeDataset>;
|
|
6298
6301
|
/**
|
|
6299
6302
|
* Enforce no spaces between braces.
|
|
6300
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6303
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/empty-brace-spaces.md
|
|
6301
6304
|
*/
|
|
6302
6305
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
6303
6306
|
/**
|
|
6304
6307
|
* Enforce passing a `message` value when creating a built-in error.
|
|
6305
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6308
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/error-message.md
|
|
6306
6309
|
*/
|
|
6307
6310
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
6308
6311
|
/**
|
|
6309
6312
|
* Require escape sequences to use uppercase or lowercase values.
|
|
6310
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6313
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/escape-case.md
|
|
6311
6314
|
*/
|
|
6312
6315
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
6313
6316
|
/**
|
|
6314
6317
|
* Add expiration conditions to TODO comments.
|
|
6315
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6318
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/expiring-todo-comments.md
|
|
6316
6319
|
*/
|
|
6317
6320
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
6318
6321
|
/**
|
|
6319
6322
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
6320
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6323
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/explicit-length-check.md
|
|
6321
6324
|
*/
|
|
6322
6325
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
6323
6326
|
/**
|
|
6324
6327
|
* Enforce or disallow explicit `delay` argument for `setTimeout()` and `setInterval()`.
|
|
6325
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6328
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/explicit-timer-delay.md
|
|
6326
6329
|
*/
|
|
6327
6330
|
'unicorn/explicit-timer-delay'?: Linter.RuleEntry<UnicornExplicitTimerDelay>;
|
|
6328
6331
|
/**
|
|
6329
6332
|
* Enforce a case style for filenames and directory names.
|
|
6330
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6333
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/filename-case.md
|
|
6331
6334
|
*/
|
|
6332
6335
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
6333
6336
|
/**
|
|
6334
6337
|
* Require identifiers to match a specified regular expression.
|
|
6335
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6338
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/id-match.md
|
|
6336
6339
|
*/
|
|
6337
6340
|
'unicorn/id-match'?: Linter.RuleEntry<UnicornIdMatch>;
|
|
6338
6341
|
/**
|
|
6339
6342
|
* Enforce specific import styles per module.
|
|
6340
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6343
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/import-style.md
|
|
6341
6344
|
*/
|
|
6342
6345
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
6343
6346
|
/**
|
|
6344
6347
|
* Prevent usage of variables from outside the scope of isolated functions.
|
|
6345
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6348
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/isolated-functions.md
|
|
6346
6349
|
*/
|
|
6347
6350
|
'unicorn/isolated-functions'?: Linter.RuleEntry<UnicornIsolatedFunctions>;
|
|
6348
6351
|
/**
|
|
6349
6352
|
* Require or disallow logical assignment operator shorthand
|
|
6350
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6353
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/logical-assignment-operators.md
|
|
6351
6354
|
*/
|
|
6352
6355
|
'unicorn/logical-assignment-operators'?: Linter.RuleEntry<UnicornLogicalAssignmentOperators>;
|
|
6353
6356
|
/**
|
|
6354
6357
|
* Limit the depth of nested calls.
|
|
6355
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6358
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/max-nested-calls.md
|
|
6356
6359
|
*/
|
|
6357
6360
|
'unicorn/max-nested-calls'?: Linter.RuleEntry<UnicornMaxNestedCalls>;
|
|
6358
6361
|
/**
|
|
6359
6362
|
* Enforce replacements for variable, property, and filenames.
|
|
6360
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6363
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/name-replacements.md
|
|
6361
6364
|
*/
|
|
6362
6365
|
'unicorn/name-replacements'?: Linter.RuleEntry<UnicornNameReplacements>;
|
|
6363
6366
|
/**
|
|
6364
6367
|
* Enforce correct use of `new` for builtin constructors.
|
|
6365
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6368
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/new-for-builtins.md
|
|
6366
6369
|
*/
|
|
6367
6370
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
6368
6371
|
/**
|
|
6369
6372
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
6370
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6373
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
6371
6374
|
*/
|
|
6372
6375
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
6373
6376
|
/**
|
|
6374
6377
|
* Disallow recursive access to `this` within getters and setters.
|
|
6375
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6378
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-accessor-recursion.md
|
|
6376
6379
|
*/
|
|
6377
6380
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
6378
6381
|
/**
|
|
6379
6382
|
* Disallow bitwise operators where a logical operator was likely intended.
|
|
6380
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6383
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-accidental-bitwise-operator.md
|
|
6381
6384
|
*/
|
|
6382
6385
|
'unicorn/no-accidental-bitwise-operator'?: Linter.RuleEntry<[]>;
|
|
6383
6386
|
/**
|
|
6384
6387
|
* Disallow anonymous functions and classes as the default export.
|
|
6385
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6388
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-anonymous-default-export.md
|
|
6386
6389
|
*/
|
|
6387
6390
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
6388
6391
|
/**
|
|
6389
6392
|
* Prevent passing a function reference directly to iterator methods.
|
|
6390
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6393
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-array-callback-reference.md
|
|
6391
6394
|
*/
|
|
6392
6395
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<UnicornNoArrayCallbackReference>;
|
|
6393
6396
|
/**
|
|
6394
6397
|
* Disallow array accumulation with `Array#concat()` in loops.
|
|
6395
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6398
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-array-concat-in-loop.md
|
|
6396
6399
|
*/
|
|
6397
6400
|
'unicorn/no-array-concat-in-loop'?: Linter.RuleEntry<[]>;
|
|
6398
6401
|
/**
|
|
6399
6402
|
* Disallow using reference values as `Array#fill()` values.
|
|
6400
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6403
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-array-fill-with-reference-type.md
|
|
6401
6404
|
*/
|
|
6402
6405
|
'unicorn/no-array-fill-with-reference-type'?: Linter.RuleEntry<[]>;
|
|
6403
6406
|
/**
|
|
6404
6407
|
* Disallow `.fill()` after `Array.from({length: …})`.
|
|
6405
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6408
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-array-from-fill.md
|
|
6406
6409
|
*/
|
|
6407
6410
|
'unicorn/no-array-from-fill'?: Linter.RuleEntry<[]>;
|
|
6408
6411
|
/**
|
|
6409
6412
|
* Disallow front-of-array mutation.
|
|
6410
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6413
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-array-front-mutation.md
|
|
6411
6414
|
*/
|
|
6412
6415
|
'unicorn/no-array-front-mutation'?: Linter.RuleEntry<[]>;
|
|
6413
6416
|
/**
|
|
6414
6417
|
* Disallow using the `this` argument in array methods.
|
|
6415
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6418
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-array-method-this-argument.md
|
|
6416
6419
|
*/
|
|
6417
6420
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
6418
6421
|
/**
|
|
6419
6422
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
6420
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6423
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/deleted-and-deprecated-rules.md#no-array-push-push
|
|
6421
6424
|
* @deprecated
|
|
6422
6425
|
*/
|
|
6423
6426
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
6424
6427
|
/**
|
|
6425
6428
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
6426
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6429
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-array-reduce.md
|
|
6427
6430
|
*/
|
|
6428
6431
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
6429
6432
|
/**
|
|
6430
6433
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
6431
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6434
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-array-reverse.md
|
|
6432
6435
|
*/
|
|
6433
6436
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
6434
6437
|
/**
|
|
6435
6438
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
6436
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6439
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-array-sort.md
|
|
6437
6440
|
*/
|
|
6438
6441
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
6439
6442
|
/**
|
|
6440
6443
|
* Disallow sorting arrays to get the minimum or maximum value.
|
|
6441
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6444
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-array-sort-for-min-max.md
|
|
6442
6445
|
*/
|
|
6443
6446
|
'unicorn/no-array-sort-for-min-max'?: Linter.RuleEntry<[]>;
|
|
6444
6447
|
/**
|
|
6445
6448
|
* Prefer `Array#toSpliced()` over `Array#splice()`.
|
|
6446
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6449
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-array-splice.md
|
|
6447
6450
|
*/
|
|
6448
6451
|
'unicorn/no-array-splice'?: Linter.RuleEntry<[]>;
|
|
6449
6452
|
/**
|
|
6450
6453
|
* Disallow asterisk prefixes in documentation comments.
|
|
6451
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6454
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-asterisk-prefix-in-documentation-comments.md
|
|
6452
6455
|
*/
|
|
6453
6456
|
'unicorn/no-asterisk-prefix-in-documentation-comments'?: Linter.RuleEntry<[]>;
|
|
6454
6457
|
/**
|
|
6455
6458
|
* Disallow async functions as `Promise#finally()` callbacks.
|
|
6456
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6459
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-async-promise-finally.md
|
|
6457
6460
|
*/
|
|
6458
6461
|
'unicorn/no-async-promise-finally'?: Linter.RuleEntry<[]>;
|
|
6459
6462
|
/**
|
|
6460
6463
|
* Disallow member access from await expression.
|
|
6461
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6464
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-await-expression-member.md
|
|
6462
6465
|
*/
|
|
6463
6466
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
6464
6467
|
/**
|
|
6465
6468
|
* Disallow using `await` in `Promise` method parameters.
|
|
6466
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6469
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-await-in-promise-methods.md
|
|
6467
6470
|
*/
|
|
6468
6471
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
6469
6472
|
/**
|
|
6470
6473
|
* Disallow unnecessary `Blob` to `File` conversion.
|
|
6471
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6474
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-blob-to-file.md
|
|
6472
6475
|
*/
|
|
6473
6476
|
'unicorn/no-blob-to-file'?: Linter.RuleEntry<[]>;
|
|
6474
6477
|
/**
|
|
6475
6478
|
* Disallow boolean-returning sort comparators.
|
|
6476
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6479
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-boolean-sort-comparator.md
|
|
6477
6480
|
*/
|
|
6478
6481
|
'unicorn/no-boolean-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
6479
6482
|
/**
|
|
6480
6483
|
* Disallow `break` and `continue` in nested loops and switches inside loops.
|
|
6481
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6484
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-break-in-nested-loop.md
|
|
6482
6485
|
*/
|
|
6483
6486
|
'unicorn/no-break-in-nested-loop'?: Linter.RuleEntry<[]>;
|
|
6484
6487
|
/**
|
|
6485
6488
|
* Prefer drawing canvases directly instead of converting them to images.
|
|
6486
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6489
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-canvas-to-image.md
|
|
6487
6490
|
*/
|
|
6488
6491
|
'unicorn/no-canvas-to-image'?: Linter.RuleEntry<[]>;
|
|
6489
6492
|
/**
|
|
6490
6493
|
* Disallow chained comparisons such as `a < b < c`.
|
|
6491
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6494
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-chained-comparison.md
|
|
6492
6495
|
*/
|
|
6493
6496
|
'unicorn/no-chained-comparison'?: Linter.RuleEntry<[]>;
|
|
6494
6497
|
/**
|
|
6495
6498
|
* Disallow accessing `Map`, `Set`, `WeakMap`, and `WeakSet` entries with bracket notation.
|
|
6496
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6499
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-collection-bracket-access.md
|
|
6497
6500
|
*/
|
|
6498
6501
|
'unicorn/no-collection-bracket-access'?: Linter.RuleEntry<[]>;
|
|
6499
6502
|
/**
|
|
6500
6503
|
* Disallow dynamic object property existence checks.
|
|
6501
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6504
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-computed-property-existence-check.md
|
|
6502
6505
|
*/
|
|
6503
6506
|
'unicorn/no-computed-property-existence-check'?: Linter.RuleEntry<[]>;
|
|
6504
6507
|
/**
|
|
6505
6508
|
* Disallow confusing uses of `Array#{splice,toSpliced}()`.
|
|
6506
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6509
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-confusing-array-splice.md
|
|
6507
6510
|
*/
|
|
6508
6511
|
'unicorn/no-confusing-array-splice'?: Linter.RuleEntry<[]>;
|
|
6509
6512
|
/**
|
|
6510
6513
|
* Disallow confusing uses of `Array#with()`.
|
|
6511
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6514
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-confusing-array-with.md
|
|
6512
6515
|
*/
|
|
6513
6516
|
'unicorn/no-confusing-array-with'?: Linter.RuleEntry<[]>;
|
|
6514
6517
|
/**
|
|
6515
6518
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
6516
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6519
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-console-spaces.md
|
|
6517
6520
|
*/
|
|
6518
6521
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
6519
6522
|
/**
|
|
6520
6523
|
* Disallow arithmetic and bitwise operations that always evaluate to `0`.
|
|
6521
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6524
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-constant-zero-expression.md
|
|
6522
6525
|
*/
|
|
6523
6526
|
'unicorn/no-constant-zero-expression'?: Linter.RuleEntry<[]>;
|
|
6524
6527
|
/**
|
|
6525
6528
|
* Disallow declarations before conditional early exits when they are only used after the exit.
|
|
6526
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6529
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-declarations-before-early-exit.md
|
|
6527
6530
|
*/
|
|
6528
6531
|
'unicorn/no-declarations-before-early-exit'?: Linter.RuleEntry<[]>;
|
|
6529
6532
|
/**
|
|
6530
6533
|
* Do not use `document.cookie` directly.
|
|
6531
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6534
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-document-cookie.md
|
|
6532
6535
|
*/
|
|
6533
6536
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
6534
6537
|
/**
|
|
6535
6538
|
* Disallow two comparisons of the same operands that can be combined into one.
|
|
6536
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6539
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-double-comparison.md
|
|
6537
6540
|
*/
|
|
6538
6541
|
'unicorn/no-double-comparison'?: Linter.RuleEntry<[]>;
|
|
6539
6542
|
/**
|
|
6540
6543
|
* Disallow duplicate adjacent branches in if chains.
|
|
6541
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6544
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-duplicate-if-branches.md
|
|
6542
6545
|
*/
|
|
6543
6546
|
'unicorn/no-duplicate-if-branches'?: Linter.RuleEntry<[]>;
|
|
6544
6547
|
/**
|
|
6545
6548
|
* Disallow adjacent duplicate operands in logical expressions.
|
|
6546
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6549
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-duplicate-logical-operands.md
|
|
6547
6550
|
*/
|
|
6548
6551
|
'unicorn/no-duplicate-logical-operands'?: Linter.RuleEntry<[]>;
|
|
6549
6552
|
/**
|
|
6550
6553
|
* Disallow `.map()` and `.filter()` in `for…of` and `for await…of` loop headers.
|
|
6551
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6554
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-duplicate-loops.md
|
|
6552
6555
|
*/
|
|
6553
6556
|
'unicorn/no-duplicate-loops'?: Linter.RuleEntry<[]>;
|
|
6554
6557
|
/**
|
|
6555
6558
|
* Disallow duplicate values in `Set` constructor array literals.
|
|
6556
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6559
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-duplicate-set-values.md
|
|
6557
6560
|
*/
|
|
6558
6561
|
'unicorn/no-duplicate-set-values'?: Linter.RuleEntry<[]>;
|
|
6559
6562
|
/**
|
|
6560
6563
|
* Disallow empty files.
|
|
6561
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6564
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-empty-file.md
|
|
6562
6565
|
*/
|
|
6563
6566
|
'unicorn/no-empty-file'?: Linter.RuleEntry<UnicornNoEmptyFile>;
|
|
6564
6567
|
/**
|
|
6565
6568
|
* Disallow assigning to built-in error properties.
|
|
6566
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6569
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-error-property-assignment.md
|
|
6567
6570
|
*/
|
|
6568
6571
|
'unicorn/no-error-property-assignment'?: Linter.RuleEntry<[]>;
|
|
6569
6572
|
/**
|
|
6570
6573
|
* Disallow exports in scripts.
|
|
6571
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6574
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-exports-in-scripts.md
|
|
6572
6575
|
*/
|
|
6573
6576
|
'unicorn/no-exports-in-scripts'?: Linter.RuleEntry<[]>;
|
|
6574
6577
|
/**
|
|
6575
6578
|
* Prefer `for…of` over the `forEach` method.
|
|
6576
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6579
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-for-each.md
|
|
6577
6580
|
*/
|
|
6578
6581
|
'unicorn/no-for-each'?: Linter.RuleEntry<[]>;
|
|
6579
6582
|
/**
|
|
6580
6583
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
6581
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6584
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-for-loop.md
|
|
6582
6585
|
*/
|
|
6583
6586
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
6584
6587
|
/**
|
|
6585
6588
|
* Disallow assigning properties on the global object.
|
|
6586
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6589
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-global-object-property-assignment.md
|
|
6587
6590
|
*/
|
|
6588
6591
|
'unicorn/no-global-object-property-assignment'?: Linter.RuleEntry<[]>;
|
|
6589
6592
|
/**
|
|
6590
6593
|
* Replaced by `unicorn/prefer-unicode-code-point-escapes` which covers more cases.
|
|
6591
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6594
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/deleted-and-deprecated-rules.md#no-hex-escape
|
|
6592
6595
|
* @deprecated
|
|
6593
6596
|
*/
|
|
6594
6597
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
6595
6598
|
/**
|
|
6596
6599
|
* Disallow immediate mutation after variable assignment.
|
|
6597
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6600
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-immediate-mutation.md
|
|
6598
6601
|
*/
|
|
6599
6602
|
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]>;
|
|
6600
6603
|
/**
|
|
6601
6604
|
* Disallow impossible comparisons against `.length` or `.size`.
|
|
6602
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6605
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-impossible-length-comparison.md
|
|
6603
6606
|
*/
|
|
6604
6607
|
'unicorn/no-impossible-length-comparison'?: Linter.RuleEntry<[]>;
|
|
6605
6608
|
/**
|
|
6606
6609
|
* Disallow incorrect `querySelector()` and `querySelectorAll()` usage.
|
|
6607
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6610
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-incorrect-query-selector.md
|
|
6608
6611
|
*/
|
|
6609
6612
|
'unicorn/no-incorrect-query-selector'?: Linter.RuleEntry<[]>;
|
|
6610
6613
|
/**
|
|
6611
6614
|
* Disallow incorrect template literal interpolation syntax.
|
|
6612
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6615
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-incorrect-template-string-interpolation.md
|
|
6613
6616
|
*/
|
|
6614
6617
|
'unicorn/no-incorrect-template-string-interpolation'?: Linter.RuleEntry<[]>;
|
|
6615
6618
|
/**
|
|
6616
6619
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
6617
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6620
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array
|
|
6618
6621
|
* @deprecated
|
|
6619
6622
|
*/
|
|
6620
6623
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
6621
6624
|
/**
|
|
6622
6625
|
* Disallow `instanceof` with built-in objects
|
|
6623
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6626
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-instanceof-builtins.md
|
|
6624
6627
|
*/
|
|
6625
6628
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
6626
6629
|
/**
|
|
6627
6630
|
* Disallow calling functions and constructors with an invalid number of arguments.
|
|
6628
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6631
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-invalid-argument-count.md
|
|
6629
6632
|
*/
|
|
6630
6633
|
'unicorn/no-invalid-argument-count'?: Linter.RuleEntry<UnicornNoInvalidArgumentCount>;
|
|
6631
6634
|
/**
|
|
6632
6635
|
* Disallow comparing a single character from a string to a multi-character string.
|
|
6633
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6636
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-invalid-character-comparison.md
|
|
6634
6637
|
*/
|
|
6635
6638
|
'unicorn/no-invalid-character-comparison'?: Linter.RuleEntry<[]>;
|
|
6636
6639
|
/**
|
|
6637
6640
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
6638
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6641
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-invalid-fetch-options.md
|
|
6639
6642
|
*/
|
|
6640
6643
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
6641
6644
|
/**
|
|
6642
6645
|
* Disallow invalid `accept` values on file inputs.
|
|
6643
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6646
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-invalid-file-input-accept.md
|
|
6644
6647
|
*/
|
|
6645
6648
|
'unicorn/no-invalid-file-input-accept'?: Linter.RuleEntry<[]>;
|
|
6646
6649
|
/**
|
|
6647
6650
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
6648
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6651
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
6649
6652
|
*/
|
|
6650
6653
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
6651
6654
|
/**
|
|
6652
6655
|
* Disallow invalid implementations of well-known symbol methods.
|
|
6653
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6656
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-invalid-well-known-symbol-methods.md
|
|
6654
6657
|
*/
|
|
6655
6658
|
'unicorn/no-invalid-well-known-symbol-methods'?: Linter.RuleEntry<[]>;
|
|
6656
6659
|
/**
|
|
6657
6660
|
* Disallow identifiers starting with `new` or `class`.
|
|
6658
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6661
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-keyword-prefix.md
|
|
6659
6662
|
*/
|
|
6660
6663
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
6661
6664
|
/**
|
|
6662
6665
|
* Disallow accessing `event.currentTarget` after the synchronous event dispatch has finished.
|
|
6663
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6666
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-late-current-target-access.md
|
|
6664
6667
|
*/
|
|
6665
6668
|
'unicorn/no-late-current-target-access'?: Linter.RuleEntry<[]>;
|
|
6666
6669
|
/**
|
|
6667
6670
|
* Disallow event-control method calls after the synchronous event dispatch has finished.
|
|
6668
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6671
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-late-event-control.md
|
|
6669
6672
|
*/
|
|
6670
6673
|
'unicorn/no-late-event-control'?: Linter.RuleEntry<[]>;
|
|
6671
6674
|
/**
|
|
6672
6675
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
6673
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6676
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
|
|
6674
6677
|
* @deprecated
|
|
6675
6678
|
*/
|
|
6676
6679
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
6677
6680
|
/**
|
|
6678
6681
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
6679
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6682
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-lonely-if.md
|
|
6680
6683
|
*/
|
|
6681
6684
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
6682
6685
|
/**
|
|
6683
6686
|
* Disallow mutating a loop iterable during iteration.
|
|
6684
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6687
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-loop-iterable-mutation.md
|
|
6685
6688
|
*/
|
|
6686
6689
|
'unicorn/no-loop-iterable-mutation'?: Linter.RuleEntry<[]>;
|
|
6687
6690
|
/**
|
|
6688
6691
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
6689
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6692
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
6690
6693
|
*/
|
|
6691
6694
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
6692
6695
|
/**
|
|
6693
6696
|
* Disallow manually wrapped comments.
|
|
6694
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6697
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-manually-wrapped-comments.md
|
|
6695
6698
|
*/
|
|
6696
6699
|
'unicorn/no-manually-wrapped-comments'?: Linter.RuleEntry<[]>;
|
|
6697
6700
|
/**
|
|
6698
6701
|
* Disallow checking a Map key before accessing a different key.
|
|
6699
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6702
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-mismatched-map-key.md
|
|
6700
6703
|
*/
|
|
6701
6704
|
'unicorn/no-mismatched-map-key'?: Linter.RuleEntry<[]>;
|
|
6702
6705
|
/**
|
|
6703
6706
|
* Disallow misrefactored compound assignments where the target is duplicated in the right-hand side.
|
|
6704
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6707
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-misrefactored-assignment.md
|
|
6705
6708
|
*/
|
|
6706
6709
|
'unicorn/no-misrefactored-assignment'?: Linter.RuleEntry<[]>;
|
|
6710
|
+
/**
|
|
6711
|
+
* Disallow references to missing local resources.
|
|
6712
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-missing-local-resource.md
|
|
6713
|
+
*/
|
|
6714
|
+
'unicorn/no-missing-local-resource'?: Linter.RuleEntry<[]>;
|
|
6715
|
+
/**
|
|
6716
|
+
* Disallow calling Promise executor resolver functions more than once on the same execution path.
|
|
6717
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-multiple-promise-resolver-calls.md
|
|
6718
|
+
*/
|
|
6719
|
+
'unicorn/no-multiple-promise-resolver-calls'?: Linter.RuleEntry<[]>;
|
|
6707
6720
|
/**
|
|
6708
6721
|
* Disallow named usage of default import and export.
|
|
6709
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6722
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-named-default.md
|
|
6710
6723
|
*/
|
|
6711
6724
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
6712
6725
|
/**
|
|
6713
6726
|
* Disallow negated array predicate calls.
|
|
6714
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6727
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-negated-array-predicate.md
|
|
6715
6728
|
*/
|
|
6716
6729
|
'unicorn/no-negated-array-predicate'?: Linter.RuleEntry<[]>;
|
|
6717
6730
|
/**
|
|
6718
6731
|
* Disallow negated comparisons.
|
|
6719
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6732
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-negated-comparison.md
|
|
6720
6733
|
*/
|
|
6721
6734
|
'unicorn/no-negated-comparison'?: Linter.RuleEntry<UnicornNoNegatedComparison>;
|
|
6722
6735
|
/**
|
|
6723
6736
|
* Disallow negated conditions.
|
|
6724
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6737
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-negated-condition.md
|
|
6725
6738
|
*/
|
|
6726
6739
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
6727
6740
|
/**
|
|
6728
6741
|
* Disallow negated expression in equality check.
|
|
6729
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6742
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-negation-in-equality-check.md
|
|
6730
6743
|
*/
|
|
6731
6744
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
6732
6745
|
/**
|
|
6733
6746
|
* Disallow nested ternary expressions.
|
|
6734
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6747
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-nested-ternary.md
|
|
6735
6748
|
*/
|
|
6736
6749
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
6737
6750
|
/**
|
|
6738
6751
|
* Disallow `new Array()`.
|
|
6739
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6752
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-new-array.md
|
|
6740
6753
|
*/
|
|
6741
6754
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
6742
6755
|
/**
|
|
6743
6756
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
6744
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6757
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-new-buffer.md
|
|
6745
6758
|
*/
|
|
6746
6759
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
6747
6760
|
/**
|
|
6748
6761
|
* Disallow non-function values with function-style verb prefixes.
|
|
6749
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6762
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-non-function-verb-prefix.md
|
|
6750
6763
|
*/
|
|
6751
6764
|
'unicorn/no-non-function-verb-prefix'?: Linter.RuleEntry<UnicornNoNonFunctionVerbPrefix>;
|
|
6752
6765
|
/**
|
|
6753
6766
|
* Disallow non-standard properties on built-in objects.
|
|
6754
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6767
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-nonstandard-builtin-properties.md
|
|
6755
6768
|
*/
|
|
6756
6769
|
'unicorn/no-nonstandard-builtin-properties'?: Linter.RuleEntry<[]>;
|
|
6757
6770
|
/**
|
|
6758
6771
|
* Disallow the use of the `null` literal.
|
|
6759
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6772
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-null.md
|
|
6760
6773
|
*/
|
|
6761
6774
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
6762
6775
|
/**
|
|
6763
6776
|
* Disallow the use of objects as default parameters.
|
|
6764
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6777
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-object-as-default-parameter.md
|
|
6765
6778
|
*/
|
|
6766
6779
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
6767
6780
|
/**
|
|
6768
6781
|
* Disallow `Object` methods with `Map` or `Set`.
|
|
6769
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6782
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-object-methods-with-collections.md
|
|
6770
6783
|
*/
|
|
6771
6784
|
'unicorn/no-object-methods-with-collections'?: Linter.RuleEntry<[]>;
|
|
6772
6785
|
/**
|
|
6773
6786
|
* Disallow optional chaining on undeclared variables.
|
|
6774
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6787
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-optional-chaining-on-undeclared-variable.md
|
|
6775
6788
|
*/
|
|
6776
6789
|
'unicorn/no-optional-chaining-on-undeclared-variable'?: Linter.RuleEntry<[]>;
|
|
6777
6790
|
/**
|
|
6778
6791
|
* Disallow `process.exit()`.
|
|
6779
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6792
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-process-exit.md
|
|
6780
6793
|
*/
|
|
6781
6794
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
6782
6795
|
/**
|
|
6783
6796
|
* Disallow comparisons made redundant by an equality check in the same logical AND.
|
|
6784
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6797
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-redundant-comparison.md
|
|
6785
6798
|
*/
|
|
6786
6799
|
'unicorn/no-redundant-comparison'?: Linter.RuleEntry<[]>;
|
|
6787
6800
|
/**
|
|
6788
6801
|
* Disallow using the return value of `Array#push()` and `Array#unshift()`.
|
|
6789
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6802
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-return-array-push.md
|
|
6790
6803
|
*/
|
|
6791
6804
|
'unicorn/no-return-array-push'?: Linter.RuleEntry<[]>;
|
|
6792
6805
|
/**
|
|
6793
6806
|
* Disallow selector syntax in DOM names.
|
|
6794
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6807
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-selector-as-dom-name.md
|
|
6795
6808
|
*/
|
|
6796
6809
|
'unicorn/no-selector-as-dom-name'?: Linter.RuleEntry<[]>;
|
|
6810
|
+
/**
|
|
6811
|
+
* Disallow shorthand properties that override related longhand properties.
|
|
6812
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-shorthand-property-overrides.md
|
|
6813
|
+
*/
|
|
6814
|
+
'unicorn/no-shorthand-property-overrides'?: Linter.RuleEntry<[]>;
|
|
6797
6815
|
/**
|
|
6798
6816
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
6799
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6817
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
6800
6818
|
*/
|
|
6801
6819
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
6802
6820
|
/**
|
|
6803
6821
|
* Disallow classes that only have static members.
|
|
6804
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6822
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-static-only-class.md
|
|
6805
6823
|
*/
|
|
6806
6824
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
6807
6825
|
/**
|
|
6808
6826
|
* Prefer comparing values directly over subtracting and comparing to `0`.
|
|
6809
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6827
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-subtraction-comparison.md
|
|
6810
6828
|
*/
|
|
6811
6829
|
'unicorn/no-subtraction-comparison'?: Linter.RuleEntry<[]>;
|
|
6812
6830
|
/**
|
|
6813
6831
|
* Disallow `then` property.
|
|
6814
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6832
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-thenable.md
|
|
6815
6833
|
*/
|
|
6816
6834
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
6817
6835
|
/**
|
|
6818
6836
|
* Disallow assigning `this` to a variable.
|
|
6819
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6837
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-this-assignment.md
|
|
6820
6838
|
*/
|
|
6821
6839
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
6822
6840
|
/**
|
|
6823
6841
|
* Disallow `this` outside of classes.
|
|
6824
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6842
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-this-outside-of-class.md
|
|
6825
6843
|
*/
|
|
6826
6844
|
'unicorn/no-this-outside-of-class'?: Linter.RuleEntry<[]>;
|
|
6827
6845
|
/**
|
|
6828
6846
|
* Disallow assigning to top-level variables from inside functions.
|
|
6829
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6847
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-top-level-assignment-in-function.md
|
|
6830
6848
|
*/
|
|
6831
6849
|
'unicorn/no-top-level-assignment-in-function'?: Linter.RuleEntry<[]>;
|
|
6832
6850
|
/**
|
|
6833
6851
|
* Disallow top-level side effects in exported modules.
|
|
6834
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6852
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-top-level-side-effects.md
|
|
6835
6853
|
*/
|
|
6836
6854
|
'unicorn/no-top-level-side-effects'?: Linter.RuleEntry<[]>;
|
|
6855
|
+
/**
|
|
6856
|
+
* Disallow `all` as a transition property.
|
|
6857
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-transition-all.md
|
|
6858
|
+
*/
|
|
6859
|
+
'unicorn/no-transition-all'?: Linter.RuleEntry<[]>;
|
|
6837
6860
|
/**
|
|
6838
6861
|
* Disallow comparing `undefined` using `typeof`.
|
|
6839
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6862
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-typeof-undefined.md
|
|
6840
6863
|
*/
|
|
6841
6864
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
6842
6865
|
/**
|
|
6843
6866
|
* Disallow referencing methods without calling them.
|
|
6844
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6867
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-uncalled-method.md
|
|
6845
6868
|
*/
|
|
6846
6869
|
'unicorn/no-uncalled-method'?: Linter.RuleEntry<[]>;
|
|
6847
6870
|
/**
|
|
6848
6871
|
* Require class members to be declared.
|
|
6849
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6872
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-undeclared-class-members.md
|
|
6850
6873
|
*/
|
|
6851
6874
|
'unicorn/no-undeclared-class-members'?: Linter.RuleEntry<[]>;
|
|
6852
6875
|
/**
|
|
6853
6876
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
6854
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6877
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
6855
6878
|
*/
|
|
6856
6879
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
6857
6880
|
/**
|
|
6858
6881
|
* Disallow `Array#flatMap()` callbacks that only wrap a single item.
|
|
6859
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6882
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-array-flat-map.md
|
|
6860
6883
|
*/
|
|
6861
6884
|
'unicorn/no-unnecessary-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
6862
6885
|
/**
|
|
6863
6886
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
6864
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6887
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
6865
6888
|
*/
|
|
6866
6889
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
6867
6890
|
/**
|
|
6868
6891
|
* Disallow awaiting non-promise values.
|
|
6869
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6892
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-await.md
|
|
6870
6893
|
*/
|
|
6871
6894
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
6872
6895
|
/**
|
|
6873
6896
|
* Disallow unnecessary comparisons against boolean literals.
|
|
6874
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6897
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-boolean-comparison.md
|
|
6875
6898
|
*/
|
|
6876
6899
|
'unicorn/no-unnecessary-boolean-comparison'?: Linter.RuleEntry<[]>;
|
|
6877
6900
|
/**
|
|
6878
6901
|
* Disallow unnecessary options in `fetch()` and `new Request()`.
|
|
6879
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6902
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-fetch-options.md
|
|
6880
6903
|
*/
|
|
6881
6904
|
'unicorn/no-unnecessary-fetch-options'?: Linter.RuleEntry<[]>;
|
|
6882
6905
|
/**
|
|
6883
6906
|
* Disallow unnecessary `globalThis` references.
|
|
6884
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6907
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-global-this.md
|
|
6885
6908
|
*/
|
|
6886
6909
|
'unicorn/no-unnecessary-global-this'?: Linter.RuleEntry<[]>;
|
|
6887
6910
|
/**
|
|
6888
6911
|
* Disallow unnecessary nested ternary expressions.
|
|
6889
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6912
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-nested-ternary.md
|
|
6890
6913
|
*/
|
|
6891
6914
|
'unicorn/no-unnecessary-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
6892
6915
|
/**
|
|
6893
6916
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
6894
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6917
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
6895
6918
|
*/
|
|
6896
6919
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
6897
6920
|
/**
|
|
6898
6921
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
6899
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6922
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
6900
6923
|
*/
|
|
6901
6924
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
6902
6925
|
/**
|
|
6903
6926
|
* Disallow `Array#splice()` when simpler alternatives exist.
|
|
6904
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6927
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-splice.md
|
|
6905
6928
|
*/
|
|
6906
6929
|
'unicorn/no-unnecessary-splice'?: Linter.RuleEntry<[]>;
|
|
6930
|
+
/**
|
|
6931
|
+
* Disallow `String#trim()` before `String#startsWith()` or `String#endsWith()`.
|
|
6932
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unnecessary-string-trim.md
|
|
6933
|
+
*/
|
|
6934
|
+
'unicorn/no-unnecessary-string-trim'?: Linter.RuleEntry<[]>;
|
|
6907
6935
|
/**
|
|
6908
6936
|
* Disallow unreadable array destructuring.
|
|
6909
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6937
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
6910
6938
|
*/
|
|
6911
6939
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<UnicornNoUnreadableArrayDestructuring>;
|
|
6912
6940
|
/**
|
|
6913
6941
|
* Disallow unreadable iterable expressions in `for…of` and `for await…of` loop headers.
|
|
6914
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6942
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unreadable-for-of-expression.md
|
|
6915
6943
|
*/
|
|
6916
6944
|
'unicorn/no-unreadable-for-of-expression'?: Linter.RuleEntry<[]>;
|
|
6917
6945
|
/**
|
|
6918
6946
|
* Disallow unreadable IIFEs.
|
|
6919
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6947
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unreadable-iife.md
|
|
6920
6948
|
*/
|
|
6921
6949
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
6922
6950
|
/**
|
|
6923
6951
|
* Disallow unreadable `new` expressions.
|
|
6924
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6952
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unreadable-new-expression.md
|
|
6925
6953
|
*/
|
|
6926
6954
|
'unicorn/no-unreadable-new-expression'?: Linter.RuleEntry<[]>;
|
|
6927
6955
|
/**
|
|
6928
6956
|
* Disallow unreadable object destructuring.
|
|
6929
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6957
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unreadable-object-destructuring.md
|
|
6930
6958
|
*/
|
|
6931
6959
|
'unicorn/no-unreadable-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
6932
6960
|
/**
|
|
6933
6961
|
* Prevent unsafe use of ArrayBuffer view `.buffer`.
|
|
6934
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6962
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unsafe-buffer-conversion.md
|
|
6935
6963
|
*/
|
|
6936
6964
|
'unicorn/no-unsafe-buffer-conversion'?: Linter.RuleEntry<[]>;
|
|
6937
6965
|
/**
|
|
6938
6966
|
* Disallow unsafe DOM HTML APIs.
|
|
6939
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6967
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unsafe-dom-html.md
|
|
6940
6968
|
*/
|
|
6941
6969
|
'unicorn/no-unsafe-dom-html'?: Linter.RuleEntry<[]>;
|
|
6942
6970
|
/**
|
|
6943
6971
|
* Disallow reading `.value` from `Promise.allSettled()` results without a fulfilled status guard.
|
|
6944
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6972
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unsafe-promise-all-settled-values.md
|
|
6945
6973
|
*/
|
|
6946
6974
|
'unicorn/no-unsafe-promise-all-settled-values'?: Linter.RuleEntry<[]>;
|
|
6947
6975
|
/**
|
|
6948
6976
|
* Disallow unsafe values as property keys.
|
|
6949
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6977
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unsafe-property-key.md
|
|
6950
6978
|
*/
|
|
6951
6979
|
'unicorn/no-unsafe-property-key'?: Linter.RuleEntry<[]>;
|
|
6952
6980
|
/**
|
|
6953
6981
|
* Disallow non-literal replacement values in `String#replace()` and `String#replaceAll()`.
|
|
6954
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6982
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unsafe-string-replacement.md
|
|
6955
6983
|
*/
|
|
6956
6984
|
'unicorn/no-unsafe-string-replacement'?: Linter.RuleEntry<[]>;
|
|
6957
6985
|
/**
|
|
6958
6986
|
* Disallow ignoring the return value of selected array methods.
|
|
6959
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6987
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unused-array-method-return.md
|
|
6960
6988
|
*/
|
|
6961
6989
|
'unicorn/no-unused-array-method-return'?: Linter.RuleEntry<[]>;
|
|
6962
6990
|
/**
|
|
6963
6991
|
* Disallow unused object properties.
|
|
6964
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6992
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-unused-properties.md
|
|
6965
6993
|
*/
|
|
6966
6994
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
6967
6995
|
/**
|
|
6968
6996
|
* Disallow unnecessary `Boolean()` casts in array predicate callbacks.
|
|
6969
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6997
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-boolean-cast.md
|
|
6970
6998
|
*/
|
|
6971
6999
|
'unicorn/no-useless-boolean-cast'?: Linter.RuleEntry<[]>;
|
|
6972
7000
|
/**
|
|
6973
7001
|
* Disallow useless type coercions of values that are already of the target type.
|
|
6974
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7002
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-coercion.md
|
|
6975
7003
|
*/
|
|
6976
7004
|
'unicorn/no-useless-coercion'?: Linter.RuleEntry<[]>;
|
|
6977
7005
|
/**
|
|
6978
7006
|
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
6979
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7007
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-collection-argument.md
|
|
6980
7008
|
*/
|
|
6981
7009
|
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
|
|
6982
7010
|
/**
|
|
6983
7011
|
* Disallow useless compound assignments such as `x += 0`.
|
|
6984
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7012
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-compound-assignment.md
|
|
6985
7013
|
*/
|
|
6986
7014
|
'unicorn/no-useless-compound-assignment'?: Linter.RuleEntry<[]>;
|
|
6987
7015
|
/**
|
|
6988
7016
|
* Disallow useless concatenation of literals.
|
|
6989
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7017
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-concat.md
|
|
6990
7018
|
*/
|
|
6991
7019
|
'unicorn/no-useless-concat'?: Linter.RuleEntry<[]>;
|
|
6992
7020
|
/**
|
|
6993
7021
|
* Disallow useless `continue` statements.
|
|
6994
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7022
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-continue.md
|
|
6995
7023
|
*/
|
|
6996
7024
|
'unicorn/no-useless-continue'?: Linter.RuleEntry<[]>;
|
|
6997
7025
|
/**
|
|
6998
7026
|
* Disallow unnecessary existence checks before deletion.
|
|
6999
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7027
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-delete-check.md
|
|
7000
7028
|
*/
|
|
7001
7029
|
'unicorn/no-useless-delete-check'?: Linter.RuleEntry<[]>;
|
|
7002
7030
|
/**
|
|
7003
7031
|
* Disallow `else` after a statement that exits.
|
|
7004
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7032
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-else.md
|
|
7005
7033
|
*/
|
|
7006
7034
|
'unicorn/no-useless-else'?: Linter.RuleEntry<[]>;
|
|
7007
7035
|
/**
|
|
7008
7036
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
7009
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7037
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
7010
7038
|
*/
|
|
7011
7039
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
7012
7040
|
/**
|
|
7013
7041
|
* Disallow useless fallback when spreading in object literals.
|
|
7014
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7042
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
7015
7043
|
*/
|
|
7016
7044
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
7017
7045
|
/**
|
|
7018
7046
|
* Disallow unnecessary `.toArray()` on iterators.
|
|
7019
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7047
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-iterator-to-array.md
|
|
7020
7048
|
*/
|
|
7021
7049
|
'unicorn/no-useless-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
7022
7050
|
/**
|
|
7023
7051
|
* Disallow useless array length check.
|
|
7024
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7052
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-length-check.md
|
|
7025
7053
|
*/
|
|
7026
7054
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
7027
7055
|
/**
|
|
7028
7056
|
* Disallow unnecessary operands in logical expressions involving boolean literals.
|
|
7029
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7057
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-logical-operand.md
|
|
7030
7058
|
*/
|
|
7031
7059
|
'unicorn/no-useless-logical-operand'?: Linter.RuleEntry<[]>;
|
|
7032
7060
|
/**
|
|
7033
7061
|
* Disallow useless overrides of class methods.
|
|
7034
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7062
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-override.md
|
|
7035
7063
|
*/
|
|
7036
7064
|
'unicorn/no-useless-override'?: Linter.RuleEntry<[]>;
|
|
7037
7065
|
/**
|
|
7038
7066
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
7039
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7067
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
7040
7068
|
*/
|
|
7041
7069
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
7070
|
+
/**
|
|
7071
|
+
* Disallow redundant re-exports.
|
|
7072
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-re-export.md
|
|
7073
|
+
*/
|
|
7074
|
+
'unicorn/no-useless-re-export'?: Linter.RuleEntry<[]>;
|
|
7042
7075
|
/**
|
|
7043
7076
|
* Disallow simple recursive function calls that can be replaced with a loop.
|
|
7044
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7077
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-recursion.md
|
|
7045
7078
|
*/
|
|
7046
7079
|
'unicorn/no-useless-recursion'?: Linter.RuleEntry<[]>;
|
|
7047
7080
|
/**
|
|
7048
7081
|
* Disallow unnecessary spread.
|
|
7049
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7082
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-spread.md
|
|
7050
7083
|
*/
|
|
7051
7084
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
7052
7085
|
/**
|
|
7053
7086
|
* Disallow useless case in switch statements.
|
|
7054
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7087
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-switch-case.md
|
|
7055
7088
|
*/
|
|
7056
7089
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
7057
7090
|
/**
|
|
7058
7091
|
* Disallow useless template literal expressions.
|
|
7059
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7092
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-template-literals.md
|
|
7060
7093
|
*/
|
|
7061
7094
|
'unicorn/no-useless-template-literals'?: Linter.RuleEntry<[]>;
|
|
7062
7095
|
/**
|
|
7063
7096
|
* Disallow useless `undefined`.
|
|
7064
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7097
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-useless-undefined.md
|
|
7065
7098
|
*/
|
|
7066
7099
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
7067
7100
|
/**
|
|
7068
7101
|
* Disallow the bitwise XOR operator where exponentiation was likely intended.
|
|
7069
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7102
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-xor-as-exponentiation.md
|
|
7070
7103
|
*/
|
|
7071
7104
|
'unicorn/no-xor-as-exponentiation'?: Linter.RuleEntry<[]>;
|
|
7072
7105
|
/**
|
|
7073
7106
|
* Disallow number literals with zero fractions or dangling dots.
|
|
7074
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7107
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/no-zero-fractions.md
|
|
7075
7108
|
*/
|
|
7076
7109
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
7077
7110
|
/**
|
|
7078
7111
|
* Enforce proper case for numeric literals.
|
|
7079
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7112
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/number-literal-case.md
|
|
7080
7113
|
*/
|
|
7081
7114
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
7082
7115
|
/**
|
|
7083
7116
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
7084
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7117
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/numeric-separators-style.md
|
|
7085
7118
|
*/
|
|
7086
7119
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
7087
7120
|
/**
|
|
7088
7121
|
* Require assignment operator shorthand where possible.
|
|
7089
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7122
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/operator-assignment.md
|
|
7090
7123
|
*/
|
|
7091
7124
|
'unicorn/operator-assignment'?: Linter.RuleEntry<UnicornOperatorAssignment>;
|
|
7092
7125
|
/**
|
|
7093
7126
|
* Prefer `AbortSignal.any()` over manually forwarding abort events between signals.
|
|
7094
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7127
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-abort-signal-any.md
|
|
7095
7128
|
*/
|
|
7096
7129
|
'unicorn/prefer-abort-signal-any'?: Linter.RuleEntry<[]>;
|
|
7097
7130
|
/**
|
|
7098
7131
|
* Prefer `AbortSignal.timeout()` over manually aborting an `AbortController` with `setTimeout()`.
|
|
7099
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7132
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-abort-signal-timeout.md
|
|
7100
7133
|
*/
|
|
7101
7134
|
'unicorn/prefer-abort-signal-timeout'?: Linter.RuleEntry<[]>;
|
|
7102
7135
|
/**
|
|
7103
7136
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
7104
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7137
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-add-event-listener.md
|
|
7105
7138
|
*/
|
|
7106
7139
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
7107
7140
|
/**
|
|
7108
7141
|
* Prefer an options object over a boolean in `.addEventListener()`.
|
|
7109
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7142
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-add-event-listener-options.md
|
|
7110
7143
|
*/
|
|
7111
7144
|
'unicorn/prefer-add-event-listener-options'?: Linter.RuleEntry<[]>;
|
|
7112
7145
|
/**
|
|
7113
7146
|
* Prefer `AggregateError` when throwing collected errors.
|
|
7114
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7147
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-aggregate-error.md
|
|
7115
7148
|
*/
|
|
7116
7149
|
'unicorn/prefer-aggregate-error'?: Linter.RuleEntry<[]>;
|
|
7117
7150
|
/**
|
|
7118
7151
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
7119
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7152
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-array-find.md
|
|
7120
7153
|
*/
|
|
7121
7154
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
7122
7155
|
/**
|
|
7123
7156
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
7124
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7157
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-array-flat.md
|
|
7125
7158
|
*/
|
|
7126
7159
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
7127
7160
|
/**
|
|
7128
7161
|
* Prefer `.flatMap(…)` over `.map(…).flat()` and `.filter(…).flatMap(…)`.
|
|
7129
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7162
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-array-flat-map.md
|
|
7130
7163
|
*/
|
|
7131
7164
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
7132
7165
|
/**
|
|
7133
7166
|
* Prefer `Array.fromAsync()` over `for await…of` array accumulation.
|
|
7134
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7167
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-array-from-async.md
|
|
7135
7168
|
*/
|
|
7136
7169
|
'unicorn/prefer-array-from-async'?: Linter.RuleEntry<[]>;
|
|
7137
7170
|
/**
|
|
7138
7171
|
* Prefer using the `Array.from()` mapping function argument.
|
|
7139
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7172
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-array-from-map.md
|
|
7140
7173
|
*/
|
|
7141
7174
|
'unicorn/prefer-array-from-map'?: Linter.RuleEntry<[]>;
|
|
7142
7175
|
/**
|
|
7143
7176
|
* Prefer `Array.from({length}, …)` when creating range arrays.
|
|
7144
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7177
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-array-from-range.md
|
|
7145
7178
|
*/
|
|
7146
7179
|
'unicorn/prefer-array-from-range'?: Linter.RuleEntry<[]>;
|
|
7147
7180
|
/**
|
|
7148
7181
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
7149
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7182
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-array-index-of.md
|
|
7150
7183
|
*/
|
|
7151
7184
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
7152
7185
|
/**
|
|
7153
7186
|
* Prefer iterating an array directly or with `Array#keys()` over `Array#entries()` when the index or value is unused.
|
|
7154
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7187
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-array-iterable-methods.md
|
|
7155
7188
|
*/
|
|
7156
7189
|
'unicorn/prefer-array-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
7157
7190
|
/**
|
|
7158
7191
|
* Prefer last-oriented array methods over `Array#reverse()` or `Array#toReversed()` followed by a method.
|
|
7159
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7192
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-array-last-methods.md
|
|
7160
7193
|
*/
|
|
7161
7194
|
'unicorn/prefer-array-last-methods'?: Linter.RuleEntry<[]>;
|
|
7162
7195
|
/**
|
|
7163
7196
|
* Prefer `Array#slice()` over `Array#splice()` when reading from the returned array.
|
|
7164
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7197
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-array-slice.md
|
|
7165
7198
|
*/
|
|
7166
7199
|
'unicorn/prefer-array-slice'?: Linter.RuleEntry<[]>;
|
|
7167
7200
|
/**
|
|
7168
7201
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
7169
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7202
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-array-some.md
|
|
7170
7203
|
*/
|
|
7171
7204
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
7172
7205
|
/**
|
|
7173
7206
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
7174
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7207
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-at.md
|
|
7175
7208
|
*/
|
|
7176
7209
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
7177
7210
|
/**
|
|
7178
7211
|
* Prefer `await` over promise chaining.
|
|
7179
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7212
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-await.md
|
|
7180
7213
|
*/
|
|
7181
7214
|
'unicorn/prefer-await'?: Linter.RuleEntry<[]>;
|
|
7182
7215
|
/**
|
|
7183
7216
|
* Prefer `BigInt` literals over the constructor.
|
|
7184
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7217
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-bigint-literals.md
|
|
7185
7218
|
*/
|
|
7186
7219
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
7187
7220
|
/**
|
|
7188
7221
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
7189
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7222
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
7190
7223
|
*/
|
|
7191
7224
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
7192
7225
|
/**
|
|
7193
7226
|
* Prefer block statements over IIFEs used only for scoping.
|
|
7194
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7227
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-block-statement-over-iife.md
|
|
7195
7228
|
*/
|
|
7196
7229
|
'unicorn/prefer-block-statement-over-iife'?: Linter.RuleEntry<[]>;
|
|
7197
7230
|
/**
|
|
7198
7231
|
* Prefer directly returning boolean expressions over `if` statements.
|
|
7199
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7232
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-boolean-return.md
|
|
7200
7233
|
*/
|
|
7201
7234
|
'unicorn/prefer-boolean-return'?: Linter.RuleEntry<[]>;
|
|
7202
7235
|
/**
|
|
7203
7236
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
7204
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7237
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-class-fields.md
|
|
7205
7238
|
*/
|
|
7206
7239
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
7207
7240
|
/**
|
|
7208
7241
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
7209
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7242
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-classlist-toggle.md
|
|
7210
7243
|
*/
|
|
7211
7244
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
7212
7245
|
/**
|
|
7213
7246
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
7214
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7247
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-code-point.md
|
|
7215
7248
|
*/
|
|
7216
7249
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
7217
7250
|
/**
|
|
7218
7251
|
* Prefer early continues over whole-loop conditional wrapping.
|
|
7219
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7252
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-continue.md
|
|
7220
7253
|
*/
|
|
7221
7254
|
'unicorn/prefer-continue'?: Linter.RuleEntry<UnicornPreferContinue>;
|
|
7222
7255
|
/**
|
|
7223
7256
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
7224
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7257
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-date-now.md
|
|
7225
7258
|
*/
|
|
7226
7259
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
7227
7260
|
/**
|
|
7228
7261
|
* Prefer default parameters over reassignment.
|
|
7229
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7262
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-default-parameters.md
|
|
7230
7263
|
*/
|
|
7231
7264
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
7232
7265
|
/**
|
|
7233
7266
|
* Prefer direct iteration over default iterator method calls.
|
|
7234
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7267
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-direct-iteration.md
|
|
7235
7268
|
*/
|
|
7236
7269
|
'unicorn/prefer-direct-iteration'?: Linter.RuleEntry<[]>;
|
|
7237
7270
|
/**
|
|
7238
7271
|
* Prefer using `using`/`await using` over manual `try`/`finally` resource disposal.
|
|
7239
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7272
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-dispose.md
|
|
7240
7273
|
*/
|
|
7241
7274
|
'unicorn/prefer-dispose'?: Linter.RuleEntry<[]>;
|
|
7242
7275
|
/**
|
|
7243
7276
|
* Prefer `Element#append()` over `Node#appendChild()`.
|
|
7244
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7277
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-dom-node-append.md
|
|
7245
7278
|
*/
|
|
7246
7279
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
7247
7280
|
/**
|
|
7248
7281
|
* Renamed to `unicorn/dom-node-dataset`.
|
|
7249
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7282
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/deleted-and-deprecated-rules.md#prefer-dom-node-dataset
|
|
7250
7283
|
* @deprecated
|
|
7251
7284
|
*/
|
|
7252
7285
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
7253
7286
|
/**
|
|
7254
7287
|
* Prefer `.getHTML()` and `.setHTML()` over `.innerHTML`.
|
|
7255
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7288
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-dom-node-html-methods.md
|
|
7256
7289
|
*/
|
|
7257
|
-
'unicorn/prefer-dom-node-html-methods'?: Linter.RuleEntry<
|
|
7290
|
+
'unicorn/prefer-dom-node-html-methods'?: Linter.RuleEntry<UnicornPreferDomNodeHtmlMethods>;
|
|
7258
7291
|
/**
|
|
7259
7292
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
7260
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7293
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-dom-node-remove.md
|
|
7261
7294
|
*/
|
|
7262
7295
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
7263
7296
|
/**
|
|
7264
7297
|
* Prefer `.replaceChildren()` when emptying DOM children.
|
|
7265
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7298
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-dom-node-replace-children.md
|
|
7266
7299
|
*/
|
|
7267
7300
|
'unicorn/prefer-dom-node-replace-children'?: Linter.RuleEntry<[]>;
|
|
7268
7301
|
/**
|
|
7269
7302
|
* Prefer `.textContent` over `.innerText`.
|
|
7270
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7303
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
7271
7304
|
*/
|
|
7272
7305
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
7273
7306
|
/**
|
|
7274
7307
|
* Prefer early returns over full-function conditional wrapping.
|
|
7275
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7308
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-early-return.md
|
|
7276
7309
|
*/
|
|
7277
7310
|
'unicorn/prefer-early-return'?: Linter.RuleEntry<UnicornPreferEarlyReturn>;
|
|
7278
7311
|
/**
|
|
7279
7312
|
* Prefer `else if` over adjacent `if` statements with related conditions.
|
|
7280
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7313
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-else-if.md
|
|
7281
7314
|
*/
|
|
7282
7315
|
'unicorn/prefer-else-if'?: Linter.RuleEntry<[]>;
|
|
7283
7316
|
/**
|
|
7284
7317
|
* Prefer `Error.isError()` when checking for errors.
|
|
7285
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7318
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-error-is-error.md
|
|
7286
7319
|
*/
|
|
7287
7320
|
'unicorn/prefer-error-is-error'?: Linter.RuleEntry<[]>;
|
|
7288
7321
|
/**
|
|
7289
7322
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
7290
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7323
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-event-target.md
|
|
7291
7324
|
*/
|
|
7292
7325
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
7326
|
+
/**
|
|
7327
|
+
* Prefer explicit viewport units.
|
|
7328
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-explicit-viewport-units.md
|
|
7329
|
+
*/
|
|
7330
|
+
'unicorn/prefer-explicit-viewport-units'?: Linter.RuleEntry<UnicornPreferExplicitViewportUnits>;
|
|
7293
7331
|
/**
|
|
7294
7332
|
* Prefer `export…from` when re-exporting.
|
|
7295
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7333
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-export-from.md
|
|
7296
7334
|
*/
|
|
7297
7335
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
7298
7336
|
/**
|
|
7299
7337
|
* Prefer flat `Math.min()` and `Math.max()` calls over nested calls.
|
|
7300
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7338
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-flat-math-min-max.md
|
|
7301
7339
|
*/
|
|
7302
7340
|
'unicorn/prefer-flat-math-min-max'?: Linter.RuleEntry<[]>;
|
|
7303
7341
|
/**
|
|
7304
7342
|
* Prefer `.getOrInsertComputed()` when the default value has side effects.
|
|
7305
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7343
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-get-or-insert-computed.md
|
|
7306
7344
|
*/
|
|
7307
7345
|
'unicorn/prefer-get-or-insert-computed'?: Linter.RuleEntry<[]>;
|
|
7308
7346
|
/**
|
|
7309
7347
|
* Prefer global numeric constants over `Number` static properties.
|
|
7310
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7348
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-global-number-constants.md
|
|
7311
7349
|
*/
|
|
7312
7350
|
'unicorn/prefer-global-number-constants'?: Linter.RuleEntry<[]>;
|
|
7313
7351
|
/**
|
|
7314
7352
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
7315
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7353
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-global-this.md
|
|
7316
7354
|
*/
|
|
7317
7355
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
7318
7356
|
/**
|
|
7319
7357
|
* Prefer `Object.groupBy()` or `Map.groupBy()` over reduce-based grouping.
|
|
7320
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7358
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-group-by.md
|
|
7321
7359
|
*/
|
|
7322
7360
|
'unicorn/prefer-group-by'?: Linter.RuleEntry<[]>;
|
|
7323
7361
|
/**
|
|
7324
7362
|
* Prefer `.has()` when checking existence.
|
|
7325
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7363
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-has-check.md
|
|
7326
7364
|
*/
|
|
7327
7365
|
'unicorn/prefer-has-check'?: Linter.RuleEntry<[]>;
|
|
7328
7366
|
/**
|
|
7329
7367
|
* Prefer moving code shared by all branches of an `if` statement out of the branches.
|
|
7330
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7368
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-hoisting-branch-code.md
|
|
7331
7369
|
*/
|
|
7332
7370
|
'unicorn/prefer-hoisting-branch-code'?: Linter.RuleEntry<[]>;
|
|
7333
7371
|
/**
|
|
7334
7372
|
* Prefer HTTPS over HTTP.
|
|
7335
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7373
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-https.md
|
|
7336
7374
|
*/
|
|
7337
7375
|
'unicorn/prefer-https'?: Linter.RuleEntry<[]>;
|
|
7338
7376
|
/**
|
|
7339
7377
|
* Prefer identifiers over string literals in import and export specifiers.
|
|
7340
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7378
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-identifier-import-export-specifiers.md
|
|
7341
7379
|
*/
|
|
7342
7380
|
'unicorn/prefer-identifier-import-export-specifiers'?: Linter.RuleEntry<[]>;
|
|
7343
7381
|
/**
|
|
7344
7382
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
7345
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7383
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-import-meta-properties.md
|
|
7346
7384
|
*/
|
|
7347
7385
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
7348
7386
|
/**
|
|
7349
7387
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
7350
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7388
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-includes.md
|
|
7351
7389
|
*/
|
|
7352
7390
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
7353
7391
|
/**
|
|
7354
7392
|
* Prefer `.includes()` over repeated equality comparisons.
|
|
7355
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7393
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-includes-over-repeated-comparisons.md
|
|
7356
7394
|
*/
|
|
7357
7395
|
'unicorn/prefer-includes-over-repeated-comparisons'?: Linter.RuleEntry<UnicornPreferIncludesOverRepeatedComparisons>;
|
|
7358
7396
|
/**
|
|
7359
7397
|
* Prefer passing iterables directly to constructors instead of filling empty collections.
|
|
7360
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7398
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-iterable-in-constructor.md
|
|
7361
7399
|
*/
|
|
7362
7400
|
'unicorn/prefer-iterable-in-constructor'?: Linter.RuleEntry<[]>;
|
|
7363
7401
|
/**
|
|
7364
7402
|
* Prefer `Iterator.concat(…)` over temporary spread arrays.
|
|
7365
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7403
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-iterator-concat.md
|
|
7366
7404
|
*/
|
|
7367
7405
|
'unicorn/prefer-iterator-concat'?: Linter.RuleEntry<[]>;
|
|
7368
7406
|
/**
|
|
7369
7407
|
* Prefer iterator helpers over temporary arrays from iterators.
|
|
7370
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7408
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-iterator-helpers.md
|
|
7371
7409
|
*/
|
|
7372
7410
|
'unicorn/prefer-iterator-helpers'?: Linter.RuleEntry<[]>;
|
|
7373
7411
|
/**
|
|
7374
7412
|
* Prefer `Iterator#toArray()` over temporary arrays from iterator spreads.
|
|
7375
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7413
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-iterator-to-array.md
|
|
7376
7414
|
*/
|
|
7377
7415
|
'unicorn/prefer-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
7378
7416
|
/**
|
|
7379
7417
|
* Prefer moving `.toArray()` to the end of iterator helper chains.
|
|
7380
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7418
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-iterator-to-array-at-end.md
|
|
7381
7419
|
*/
|
|
7382
7420
|
'unicorn/prefer-iterator-to-array-at-end'?: Linter.RuleEntry<[]>;
|
|
7383
7421
|
/**
|
|
7384
7422
|
* Renamed to `unicorn/consistent-json-file-read`.
|
|
7385
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7423
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/deleted-and-deprecated-rules.md#prefer-json-parse-buffer
|
|
7386
7424
|
* @deprecated
|
|
7387
7425
|
*/
|
|
7388
7426
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
7389
7427
|
/**
|
|
7390
7428
|
* Prefer `KeyboardEvent#key` over deprecated keyboard event properties.
|
|
7391
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7429
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
7392
7430
|
*/
|
|
7393
7431
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
7394
7432
|
/**
|
|
7395
7433
|
* Prefer `location.assign()` over assigning to `location.href`.
|
|
7396
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7434
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-location-assign.md
|
|
7397
7435
|
*/
|
|
7398
7436
|
'unicorn/prefer-location-assign'?: Linter.RuleEntry<[]>;
|
|
7399
7437
|
/**
|
|
7400
7438
|
* Prefer using a logical operator over a ternary.
|
|
7401
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7439
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
7402
7440
|
*/
|
|
7403
7441
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
7404
7442
|
/**
|
|
7405
7443
|
* Prefer `new Map()` over `Object.fromEntries()` when using the result as a map.
|
|
7406
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7444
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-map-from-entries.md
|
|
7407
7445
|
*/
|
|
7408
7446
|
'unicorn/prefer-map-from-entries'?: Linter.RuleEntry<[]>;
|
|
7409
7447
|
/**
|
|
7410
7448
|
* Prefer `Math.abs()` over manual absolute value expressions and symmetric range checks.
|
|
7411
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7449
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-math-abs.md
|
|
7412
7450
|
*/
|
|
7413
7451
|
'unicorn/prefer-math-abs'?: Linter.RuleEntry<[]>;
|
|
7414
7452
|
/**
|
|
7415
7453
|
* Prefer `Math` constants over their approximate numeric values.
|
|
7416
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7454
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-math-constants.md
|
|
7417
7455
|
*/
|
|
7418
7456
|
'unicorn/prefer-math-constants'?: Linter.RuleEntry<[]>;
|
|
7419
7457
|
/**
|
|
7420
7458
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
7421
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7459
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-math-min-max.md
|
|
7422
7460
|
*/
|
|
7423
7461
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
7424
7462
|
/**
|
|
7425
7463
|
* Prefer `Math.trunc()` for truncating numbers.
|
|
7426
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7464
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-math-trunc.md
|
|
7427
7465
|
*/
|
|
7428
7466
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
7429
7467
|
/**
|
|
7430
7468
|
* Prefer moving ternaries into the minimal varying part of an expression.
|
|
7431
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7469
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-minimal-ternary.md
|
|
7432
7470
|
*/
|
|
7433
7471
|
'unicorn/prefer-minimal-ternary'?: Linter.RuleEntry<UnicornPreferMinimalTernary>;
|
|
7434
7472
|
/**
|
|
7435
7473
|
* Prefer modern DOM APIs.
|
|
7436
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7474
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
7437
7475
|
*/
|
|
7438
7476
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
7439
7477
|
/**
|
|
7440
7478
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
7441
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7479
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-modern-math-apis.md
|
|
7442
7480
|
*/
|
|
7443
7481
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
7444
7482
|
/**
|
|
7445
7483
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
7446
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7484
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-module.md
|
|
7447
7485
|
*/
|
|
7448
7486
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
7449
7487
|
/**
|
|
7450
7488
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
7451
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7489
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
7452
7490
|
*/
|
|
7453
7491
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
7454
7492
|
/**
|
|
7455
7493
|
* Prefer negative index over `.length - index` when possible.
|
|
7456
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7494
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-negative-index.md
|
|
7457
7495
|
*/
|
|
7458
7496
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
7459
7497
|
/**
|
|
7460
7498
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
7461
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7499
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-node-protocol.md
|
|
7462
7500
|
*/
|
|
7463
7501
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
7464
7502
|
/**
|
|
7465
7503
|
* Prefer `Number()` over `parseFloat()` and base-10 `parseInt()`.
|
|
7466
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7504
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-number-coercion.md
|
|
7467
7505
|
*/
|
|
7468
7506
|
'unicorn/prefer-number-coercion'?: Linter.RuleEntry<[]>;
|
|
7469
7507
|
/**
|
|
7470
7508
|
* Prefer `Number.isSafeInteger()` over integer checks.
|
|
7471
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7509
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-number-is-safe-integer.md
|
|
7472
7510
|
*/
|
|
7473
7511
|
'unicorn/prefer-number-is-safe-integer'?: Linter.RuleEntry<[]>;
|
|
7474
7512
|
/**
|
|
7475
7513
|
* Prefer `Number` static methods over global functions and optionally static properties over global constants.
|
|
7476
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7514
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-number-properties.md
|
|
7477
7515
|
*/
|
|
7478
7516
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
7479
7517
|
/**
|
|
7480
7518
|
* Prefer `Object.defineProperties()` over multiple `Object.defineProperty()` calls.
|
|
7481
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7519
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-object-define-properties.md
|
|
7482
7520
|
*/
|
|
7483
7521
|
'unicorn/prefer-object-define-properties'?: Linter.RuleEntry<[]>;
|
|
7484
7522
|
/**
|
|
7485
7523
|
* Prefer object destructuring defaults over default object literals with spread.
|
|
7486
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7524
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-object-destructuring-defaults.md
|
|
7487
7525
|
*/
|
|
7488
7526
|
'unicorn/prefer-object-destructuring-defaults'?: Linter.RuleEntry<[]>;
|
|
7489
7527
|
/**
|
|
7490
7528
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
7491
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7529
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-object-from-entries.md
|
|
7492
7530
|
*/
|
|
7493
7531
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
7494
7532
|
/**
|
|
7495
7533
|
* Prefer the most specific `Object` iterable method.
|
|
7496
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7534
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-object-iterable-methods.md
|
|
7497
7535
|
*/
|
|
7498
7536
|
'unicorn/prefer-object-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
7499
7537
|
/**
|
|
7500
7538
|
* Prefer observer APIs over resize and scroll listeners with layout reads.
|
|
7501
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7539
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-observer-apis.md
|
|
7502
7540
|
*/
|
|
7503
7541
|
'unicorn/prefer-observer-apis'?: Linter.RuleEntry<[]>;
|
|
7504
7542
|
/**
|
|
7505
7543
|
* Prefer omitting the `catch` binding parameter.
|
|
7506
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7544
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
7507
7545
|
*/
|
|
7508
7546
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
7509
7547
|
/**
|
|
7510
7548
|
* Prefer `Path2D` for repeatedly drawn canvas paths.
|
|
7511
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7549
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-path2d.md
|
|
7512
7550
|
*/
|
|
7513
7551
|
'unicorn/prefer-path2d'?: Linter.RuleEntry<[]>;
|
|
7514
7552
|
/**
|
|
7515
7553
|
* Prefer private class fields over the underscore-prefix convention.
|
|
7516
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7554
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-private-class-fields.md
|
|
7517
7555
|
*/
|
|
7518
7556
|
'unicorn/prefer-private-class-fields'?: Linter.RuleEntry<[]>;
|
|
7519
7557
|
/**
|
|
7520
7558
|
* Prefer `Promise.try()` over promise-wrapping boilerplate.
|
|
7521
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7559
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-promise-try.md
|
|
7522
7560
|
*/
|
|
7523
7561
|
'unicorn/prefer-promise-try'?: Linter.RuleEntry<[]>;
|
|
7524
7562
|
/**
|
|
7525
7563
|
* Prefer `Promise.withResolvers()` when extracting resolver functions from `new Promise()`.
|
|
7526
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7564
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-promise-with-resolvers.md
|
|
7527
7565
|
*/
|
|
7528
7566
|
'unicorn/prefer-promise-with-resolvers'?: Linter.RuleEntry<[]>;
|
|
7529
7567
|
/**
|
|
7530
7568
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
7531
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7569
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-prototype-methods.md
|
|
7532
7570
|
*/
|
|
7533
7571
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
7534
7572
|
/**
|
|
7535
7573
|
* Prefer `.querySelector()` and `.querySelectorAll()` over older DOM query methods.
|
|
7536
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7574
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-query-selector.md
|
|
7537
7575
|
*/
|
|
7538
7576
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<UnicornPreferQuerySelector>;
|
|
7539
7577
|
/**
|
|
7540
7578
|
* Prefer `queueMicrotask()` over `process.nextTick()`, `setImmediate()`, and `setTimeout(…, 0)`.
|
|
7541
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7579
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-queue-microtask.md
|
|
7542
7580
|
*/
|
|
7543
7581
|
'unicorn/prefer-queue-microtask'?: Linter.RuleEntry<UnicornPreferQueueMicrotask>;
|
|
7544
7582
|
/**
|
|
7545
7583
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
7546
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7584
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-reflect-apply.md
|
|
7547
7585
|
*/
|
|
7548
7586
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
7549
7587
|
/**
|
|
7550
7588
|
* Prefer `RegExp.escape()` for escaping strings to use in regular expressions.
|
|
7551
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7589
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-regexp-escape.md
|
|
7552
7590
|
*/
|
|
7553
7591
|
'unicorn/prefer-regexp-escape'?: Linter.RuleEntry<[]>;
|
|
7554
7592
|
/**
|
|
7555
7593
|
* Prefer `RegExp#test()` over `String#match()`, `String#search()`, and `RegExp#exec()`.
|
|
7556
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7594
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-regexp-test.md
|
|
7557
7595
|
*/
|
|
7558
7596
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
7559
7597
|
/**
|
|
7560
7598
|
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
7561
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7599
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-response-static-json.md
|
|
7562
7600
|
*/
|
|
7563
7601
|
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
|
|
7564
7602
|
/**
|
|
7565
7603
|
* Prefer `:scope` when using element query selector methods.
|
|
7566
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7604
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-scoped-selector.md
|
|
7567
7605
|
*/
|
|
7568
7606
|
'unicorn/prefer-scoped-selector'?: Linter.RuleEntry<[]>;
|
|
7569
7607
|
/**
|
|
7570
7608
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
7571
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7609
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-set-has.md
|
|
7572
7610
|
*/
|
|
7573
7611
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<UnicornPreferSetHas>;
|
|
7574
7612
|
/**
|
|
7575
7613
|
* Prefer `Set` methods for Set operations.
|
|
7576
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7614
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-set-methods.md
|
|
7577
7615
|
*/
|
|
7578
7616
|
'unicorn/prefer-set-methods'?: Linter.RuleEntry<[]>;
|
|
7579
7617
|
/**
|
|
7580
7618
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
7581
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7619
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-set-size.md
|
|
7582
7620
|
*/
|
|
7583
7621
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
7584
7622
|
/**
|
|
7585
7623
|
* Prefer arrow function properties over methods with a single return.
|
|
7586
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7624
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-short-arrow-method.md
|
|
7587
7625
|
*/
|
|
7588
|
-
'unicorn/prefer-short-arrow-method'?: Linter.RuleEntry<
|
|
7626
|
+
'unicorn/prefer-short-arrow-method'?: Linter.RuleEntry<UnicornPreferShortArrowMethod>;
|
|
7589
7627
|
/**
|
|
7590
7628
|
* Prefer simple conditions first in logical expressions.
|
|
7591
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7629
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-simple-condition-first.md
|
|
7592
7630
|
*/
|
|
7593
7631
|
'unicorn/prefer-simple-condition-first'?: Linter.RuleEntry<[]>;
|
|
7594
7632
|
/**
|
|
7595
7633
|
* Prefer a simple comparison function for `Array#sort()`.
|
|
7596
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7634
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-simple-sort-comparator.md
|
|
7597
7635
|
*/
|
|
7598
7636
|
'unicorn/prefer-simple-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
7599
7637
|
/**
|
|
7600
7638
|
* Prefer simplified conditions.
|
|
7601
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7639
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-simplified-conditions.md
|
|
7602
7640
|
*/
|
|
7603
7641
|
'unicorn/prefer-simplified-conditions'?: Linter.RuleEntry<[]>;
|
|
7604
7642
|
/**
|
|
7605
7643
|
* Prefer a single `Array#some()` or `Array#every()` with a combined predicate.
|
|
7606
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7644
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-single-array-predicate.md
|
|
7607
7645
|
*/
|
|
7608
7646
|
'unicorn/prefer-single-array-predicate'?: Linter.RuleEntry<[]>;
|
|
7609
7647
|
/**
|
|
7610
7648
|
* Enforce combining multiple `Array#{push,unshift}()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
7611
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7649
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-single-call.md
|
|
7612
7650
|
*/
|
|
7613
7651
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
7614
7652
|
/**
|
|
7615
7653
|
* Prefer a single object destructuring declaration per local const source.
|
|
7616
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7654
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-single-object-destructuring.md
|
|
7617
7655
|
*/
|
|
7618
7656
|
'unicorn/prefer-single-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
7619
7657
|
/**
|
|
7620
7658
|
* Enforce combining multiple single-character replacements into a single `String#replaceAll()` with a regular expression.
|
|
7621
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7659
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-single-replace.md
|
|
7622
7660
|
*/
|
|
7623
7661
|
'unicorn/prefer-single-replace'?: Linter.RuleEntry<[]>;
|
|
7624
7662
|
/**
|
|
7625
7663
|
* Prefer declaring variables in the smallest possible scope.
|
|
7626
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7664
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-smaller-scope.md
|
|
7627
7665
|
*/
|
|
7628
7666
|
'unicorn/prefer-smaller-scope'?: Linter.RuleEntry<[]>;
|
|
7629
7667
|
/**
|
|
7630
7668
|
* Prefer `String#split()` with a limit.
|
|
7631
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7669
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-split-limit.md
|
|
7632
7670
|
*/
|
|
7633
7671
|
'unicorn/prefer-split-limit'?: Linter.RuleEntry<[]>;
|
|
7634
7672
|
/**
|
|
7635
7673
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()`, and trivial `for…of` copies.
|
|
7636
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7674
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-spread.md
|
|
7637
7675
|
*/
|
|
7638
7676
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
7639
7677
|
/**
|
|
7640
7678
|
* Prefer `String#matchAll()` over `RegExp#exec()` loops.
|
|
7641
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7679
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-string-match-all.md
|
|
7642
7680
|
*/
|
|
7643
7681
|
'unicorn/prefer-string-match-all'?: Linter.RuleEntry<[]>;
|
|
7644
7682
|
/**
|
|
7645
7683
|
* Prefer `String#padStart()` and `String#padEnd()` over manual string padding.
|
|
7646
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7684
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-string-pad-start-end.md
|
|
7647
7685
|
*/
|
|
7648
7686
|
'unicorn/prefer-string-pad-start-end'?: Linter.RuleEntry<[]>;
|
|
7649
7687
|
/**
|
|
7650
7688
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
7651
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7689
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-string-raw.md
|
|
7652
7690
|
*/
|
|
7653
7691
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
7654
7692
|
/**
|
|
7655
7693
|
* Prefer `String#repeat()` for repeated whitespace.
|
|
7656
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7694
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-string-repeat.md
|
|
7657
7695
|
*/
|
|
7658
7696
|
'unicorn/prefer-string-repeat'?: Linter.RuleEntry<UnicornPreferStringRepeat>;
|
|
7659
7697
|
/**
|
|
7660
7698
|
* Prefer `String#replaceAll()` over regex searches with the global flag and `String#split().join()`.
|
|
7661
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7699
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-string-replace-all.md
|
|
7662
7700
|
*/
|
|
7663
7701
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
7664
7702
|
/**
|
|
7665
7703
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
7666
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7704
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-string-slice.md
|
|
7667
7705
|
*/
|
|
7668
7706
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
7669
7707
|
/**
|
|
7670
|
-
* Prefer `String#startsWith()` & `String#endsWith()` over
|
|
7671
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7708
|
+
* Prefer `String#startsWith()` & `String#endsWith()` over regexes, `String#indexOf() === 0`, and slice checks.
|
|
7709
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
7672
7710
|
*/
|
|
7673
7711
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
7674
7712
|
/**
|
|
7675
7713
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
7676
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7714
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
7677
7715
|
*/
|
|
7678
7716
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
7679
7717
|
/**
|
|
7680
7718
|
* Prefer using `structuredClone` to create a deep clone.
|
|
7681
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7719
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-structured-clone.md
|
|
7682
7720
|
*/
|
|
7683
7721
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
7684
7722
|
/**
|
|
7685
7723
|
* Prefer `switch` over multiple `else-if`.
|
|
7686
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7724
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-switch.md
|
|
7687
7725
|
*/
|
|
7688
7726
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
7689
7727
|
/**
|
|
7690
7728
|
* Prefer `Temporal` over `Date`.
|
|
7691
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7729
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-temporal.md
|
|
7692
7730
|
*/
|
|
7693
7731
|
'unicorn/prefer-temporal'?: Linter.RuleEntry<UnicornPreferTemporal>;
|
|
7694
7732
|
/**
|
|
7695
7733
|
* Prefer ternary expressions over simple `if` statements that return or assign values.
|
|
7696
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7734
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-ternary.md
|
|
7697
7735
|
*/
|
|
7698
7736
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
7737
|
+
/**
|
|
7738
|
+
* Prefer `.then().catch()` over `.then(…, …)` for error handling.
|
|
7739
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-then-catch.md
|
|
7740
|
+
*/
|
|
7741
|
+
'unicorn/prefer-then-catch'?: Linter.RuleEntry<[]>;
|
|
7699
7742
|
/**
|
|
7700
7743
|
* Prefer using `Element#toggleAttribute()` to toggle attributes.
|
|
7701
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7744
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-toggle-attribute.md
|
|
7702
7745
|
*/
|
|
7703
7746
|
'unicorn/prefer-toggle-attribute'?: Linter.RuleEntry<[]>;
|
|
7704
7747
|
/**
|
|
7705
7748
|
* Prefer top-level await over top-level promises and async function calls.
|
|
7706
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7749
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-top-level-await.md
|
|
7707
7750
|
*/
|
|
7708
7751
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
7709
7752
|
/**
|
|
7710
7753
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
7711
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7754
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-type-error.md
|
|
7712
7755
|
*/
|
|
7713
7756
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
7714
7757
|
/**
|
|
7715
7758
|
* Require type literals to be last in union types.
|
|
7716
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7759
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-type-literal-last.md
|
|
7717
7760
|
*/
|
|
7718
7761
|
'unicorn/prefer-type-literal-last'?: Linter.RuleEntry<[]>;
|
|
7719
7762
|
/**
|
|
7720
7763
|
* Prefer `Uint8Array#toBase64()` and `Uint8Array.fromBase64()` over `atob()`, `btoa()`, and `Buffer` base64 conversions.
|
|
7721
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7764
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-uint8array-base64.md
|
|
7722
7765
|
*/
|
|
7723
7766
|
'unicorn/prefer-uint8array-base64'?: Linter.RuleEntry<[]>;
|
|
7724
7767
|
/**
|
|
7725
7768
|
* Prefer the unary minus operator over multiplying or dividing by `-1`.
|
|
7726
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7769
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-unary-minus.md
|
|
7727
7770
|
*/
|
|
7728
7771
|
'unicorn/prefer-unary-minus'?: Linter.RuleEntry<[]>;
|
|
7729
7772
|
/**
|
|
7730
7773
|
* Prefer Unicode code point escapes over legacy escape sequences.
|
|
7731
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7774
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-unicode-code-point-escapes.md
|
|
7732
7775
|
*/
|
|
7733
7776
|
'unicorn/prefer-unicode-code-point-escapes'?: Linter.RuleEntry<[]>;
|
|
7734
7777
|
/**
|
|
7735
7778
|
* Prefer `URL.canParse()` over constructing a `URL` in a try/catch for validation.
|
|
7736
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7779
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-url-can-parse.md
|
|
7737
7780
|
*/
|
|
7738
7781
|
'unicorn/prefer-url-can-parse'?: Linter.RuleEntry<[]>;
|
|
7739
7782
|
/**
|
|
7740
7783
|
* Prefer `URL#href` over stringifying a `URL`.
|
|
7741
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7784
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-url-href.md
|
|
7742
7785
|
*/
|
|
7743
7786
|
'unicorn/prefer-url-href'?: Linter.RuleEntry<[]>;
|
|
7744
7787
|
/**
|
|
7745
7788
|
* Prefer `URLSearchParams` over manually splitting query strings.
|
|
7746
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7789
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-url-search-parameters.md
|
|
7747
7790
|
*/
|
|
7748
7791
|
'unicorn/prefer-url-search-parameters'?: Linter.RuleEntry<[]>;
|
|
7749
7792
|
/**
|
|
7750
7793
|
* Prefer putting the condition in the while statement.
|
|
7751
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7794
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/prefer-while-loop-condition.md
|
|
7752
7795
|
*/
|
|
7753
7796
|
'unicorn/prefer-while-loop-condition'?: Linter.RuleEntry<[]>;
|
|
7754
7797
|
/**
|
|
7755
7798
|
* Renamed to `unicorn/name-replacements`.
|
|
7756
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7799
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/deleted-and-deprecated-rules.md#prevent-abbreviations
|
|
7757
7800
|
* @deprecated
|
|
7758
7801
|
*/
|
|
7759
7802
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<[]>;
|
|
7760
7803
|
/**
|
|
7761
7804
|
* Enforce consistent relative URL style.
|
|
7762
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7805
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/relative-url-style.md
|
|
7763
7806
|
*/
|
|
7764
7807
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
7765
7808
|
/**
|
|
7766
7809
|
* Enforce using the separator argument with `Array#join()`.
|
|
7767
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7810
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/require-array-join-separator.md
|
|
7768
7811
|
*/
|
|
7769
7812
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
7770
7813
|
/**
|
|
7771
7814
|
* Require a compare function when calling `Array#sort()` or `Array#toSorted()`.
|
|
7772
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7815
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/require-array-sort-compare.md
|
|
7773
7816
|
*/
|
|
7774
7817
|
'unicorn/require-array-sort-compare'?: Linter.RuleEntry<[]>;
|
|
7775
7818
|
/**
|
|
7776
7819
|
* Require `CSS.escape()` for interpolated values in CSS selectors.
|
|
7777
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7820
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/require-css-escape.md
|
|
7778
7821
|
*/
|
|
7779
7822
|
'unicorn/require-css-escape'?: Linter.RuleEntry<UnicornRequireCssEscape>;
|
|
7823
|
+
/**
|
|
7824
|
+
* Require configured YAML frontmatter fields.
|
|
7825
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/require-frontmatter-fields.md
|
|
7826
|
+
*/
|
|
7827
|
+
'unicorn/require-frontmatter-fields'?: Linter.RuleEntry<UnicornRequireFrontmatterFields>;
|
|
7780
7828
|
/**
|
|
7781
7829
|
* Require non-empty module attributes for imports and exports
|
|
7782
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7830
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/require-module-attributes.md
|
|
7783
7831
|
*/
|
|
7784
7832
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
7785
7833
|
/**
|
|
7786
7834
|
* Require non-empty specifier list in import and export statements.
|
|
7787
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7835
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/require-module-specifiers.md
|
|
7788
7836
|
*/
|
|
7789
7837
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
7790
7838
|
/**
|
|
7791
7839
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
7792
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7840
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
7793
7841
|
*/
|
|
7794
7842
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
7795
7843
|
/**
|
|
7796
7844
|
* Require passive event listeners for high-frequency events.
|
|
7797
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7845
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/require-passive-events.md
|
|
7798
7846
|
*/
|
|
7799
7847
|
'unicorn/require-passive-events'?: Linter.RuleEntry<[]>;
|
|
7800
7848
|
/**
|
|
7801
7849
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
7802
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7850
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/require-post-message-target-origin.md
|
|
7803
7851
|
*/
|
|
7804
7852
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
7805
7853
|
/**
|
|
7806
7854
|
* Require boolean-returning Proxy traps to return booleans.
|
|
7807
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7855
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/require-proxy-trap-boolean-return.md
|
|
7808
7856
|
*/
|
|
7809
7857
|
'unicorn/require-proxy-trap-boolean-return'?: Linter.RuleEntry<[]>;
|
|
7810
7858
|
/**
|
|
7811
7859
|
* Enforce better string content.
|
|
7812
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7860
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/string-content.md
|
|
7813
7861
|
*/
|
|
7814
7862
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
7815
7863
|
/**
|
|
7816
7864
|
* Enforce consistent brace style for `case` clauses.
|
|
7817
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7865
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/switch-case-braces.md
|
|
7818
7866
|
*/
|
|
7819
7867
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
7820
7868
|
/**
|
|
7821
7869
|
* Enforce consistent `break`/`return`/`continue`/`throw` position in `case` clauses.
|
|
7822
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7870
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/switch-case-break-position.md
|
|
7823
7871
|
*/
|
|
7824
7872
|
'unicorn/switch-case-break-position'?: Linter.RuleEntry<[]>;
|
|
7825
7873
|
/**
|
|
7826
7874
|
* Fix whitespace-insensitive template indentation.
|
|
7827
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7875
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/template-indent.md
|
|
7828
7876
|
*/
|
|
7829
7877
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
7830
7878
|
/**
|
|
7831
7879
|
* Enforce consistent case for text encoding identifiers.
|
|
7832
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7880
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/text-encoding-identifier-case.md
|
|
7833
7881
|
*/
|
|
7834
7882
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
7835
7883
|
/**
|
|
7836
7884
|
* Require `new` when creating an error.
|
|
7837
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7885
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/throw-new-error.md
|
|
7838
7886
|
*/
|
|
7839
7887
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
7840
7888
|
/**
|
|
7841
7889
|
* Limit the complexity of `try` blocks.
|
|
7842
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
7890
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v72.0.0/docs/rules/try-complexity.md
|
|
7843
7891
|
*/
|
|
7844
7892
|
'unicorn/try-complexity'?: Linter.RuleEntry<UnicornTryComplexity>;
|
|
7845
7893
|
/**
|
|
@@ -21440,10 +21488,19 @@ type UnicornPreferAt = [] | [{
|
|
|
21440
21488
|
type UnicornPreferContinue = [] | [{
|
|
21441
21489
|
maximumStatements?: number;
|
|
21442
21490
|
}];
|
|
21491
|
+
// ----- unicorn/prefer-dom-node-html-methods -----
|
|
21492
|
+
type UnicornPreferDomNodeHtmlMethods = [] | [{
|
|
21493
|
+
checkGetHTML?: boolean;
|
|
21494
|
+
checkSetHTML?: boolean;
|
|
21495
|
+
}];
|
|
21443
21496
|
// ----- unicorn/prefer-early-return -----
|
|
21444
21497
|
type UnicornPreferEarlyReturn = [] | [{
|
|
21445
21498
|
maximumStatements?: number;
|
|
21446
21499
|
}];
|
|
21500
|
+
// ----- unicorn/prefer-explicit-viewport-units -----
|
|
21501
|
+
type UnicornPreferExplicitViewportUnits = [] | [{
|
|
21502
|
+
unit?: ("dvh" | "svh" | "lvh");
|
|
21503
|
+
}];
|
|
21447
21504
|
// ----- unicorn/prefer-export-from -----
|
|
21448
21505
|
type UnicornPreferExportFrom = [] | [{
|
|
21449
21506
|
checkUsedVariables?: boolean;
|
|
@@ -21454,7 +21511,7 @@ type UnicornPreferIncludesOverRepeatedComparisons = [] | [{
|
|
|
21454
21511
|
}];
|
|
21455
21512
|
// ----- unicorn/prefer-minimal-ternary -----
|
|
21456
21513
|
type UnicornPreferMinimalTernary = [] | [{
|
|
21457
|
-
|
|
21514
|
+
checkVaryingBase?: boolean;
|
|
21458
21515
|
checkComputedMemberAccess?: boolean;
|
|
21459
21516
|
}];
|
|
21460
21517
|
// ----- unicorn/prefer-number-properties -----
|
|
@@ -21479,6 +21536,8 @@ type UnicornPreferQueueMicrotask = [] | [{
|
|
|
21479
21536
|
type UnicornPreferSetHas = [] | [{
|
|
21480
21537
|
minimumItems?: number;
|
|
21481
21538
|
}];
|
|
21539
|
+
// ----- unicorn/prefer-short-arrow-method -----
|
|
21540
|
+
type UnicornPreferShortArrowMethod = [] | [("always" | "consistent-as-needed")];
|
|
21482
21541
|
// ----- unicorn/prefer-single-call -----
|
|
21483
21542
|
type UnicornPreferSingleCall = [] | [{
|
|
21484
21543
|
ignore?: unknown[];
|
|
@@ -21510,6 +21569,10 @@ type UnicornRelativeUrlStyle = [] | [("never" | "always")];
|
|
|
21510
21569
|
type UnicornRequireCssEscape = [] | [{
|
|
21511
21570
|
checkAllSelectors?: boolean;
|
|
21512
21571
|
}];
|
|
21572
|
+
// ----- unicorn/require-frontmatter-fields -----
|
|
21573
|
+
type UnicornRequireFrontmatterFields = [] | [{
|
|
21574
|
+
fields?: string[];
|
|
21575
|
+
}];
|
|
21513
21576
|
// ----- unicorn/string-content -----
|
|
21514
21577
|
type UnicornStringContent = [] | [{
|
|
21515
21578
|
patterns?: {
|