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