@vinicunca/eslint-config 5.3.0 → 5.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +511 -330
- package/dist/index.mjs +1 -1
- package/dist/{lib-CfwQEgoO.mjs → lib-KDSgi8J-.mjs} +44 -44
- package/package.json +24 -24
package/dist/index.d.mts
CHANGED
|
@@ -334,6 +334,7 @@ interface RuleOptions {
|
|
|
334
334
|
/**
|
|
335
335
|
* disallow omitted end tags
|
|
336
336
|
* @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-omitted-end-tags/
|
|
337
|
+
* @deprecated
|
|
337
338
|
*/
|
|
338
339
|
'astro/no-omitted-end-tags'?: Linter.RuleEntry<[]>;
|
|
339
340
|
/**
|
|
@@ -394,6 +395,7 @@ interface RuleOptions {
|
|
|
394
395
|
/**
|
|
395
396
|
* disallow warnings when compiling.
|
|
396
397
|
* @see https://ota-meshi.github.io/eslint-plugin-astro/rules/valid-compile/
|
|
398
|
+
* @deprecated
|
|
397
399
|
*/
|
|
398
400
|
'astro/valid-compile'?: Linter.RuleEntry<[]>;
|
|
399
401
|
/**
|
|
@@ -2096,7 +2098,7 @@ interface RuleOptions {
|
|
|
2096
2098
|
* Disallow expressions where the operation doesn't affect the value
|
|
2097
2099
|
* @see https://eslint.org/docs/latest/rules/no-constant-binary-expression
|
|
2098
2100
|
*/
|
|
2099
|
-
'no-constant-binary-expression'?: Linter.RuleEntry<
|
|
2101
|
+
'no-constant-binary-expression'?: Linter.RuleEntry<NoConstantBinaryExpression>;
|
|
2100
2102
|
/**
|
|
2101
2103
|
* Disallow constant expressions in conditions
|
|
2102
2104
|
* @see https://eslint.org/docs/latest/rules/no-constant-condition
|
|
@@ -3440,7 +3442,7 @@ interface RuleOptions {
|
|
|
3440
3442
|
*/
|
|
3441
3443
|
'react/globals'?: Linter.RuleEntry<[]>;
|
|
3442
3444
|
/**
|
|
3443
|
-
* Validates against
|
|
3445
|
+
* Validates against passing functions that mutate captured local variables into frozen contexts such as JSX props, hook arguments, and hook return values.
|
|
3444
3446
|
* @see https://eslint-react.xyz/docs/rules/immutability
|
|
3445
3447
|
*/
|
|
3446
3448
|
'react/immutability'?: Linter.RuleEntry<[]>;
|
|
@@ -3795,7 +3797,7 @@ interface RuleOptions {
|
|
|
3795
3797
|
*/
|
|
3796
3798
|
'react/x-globals'?: Linter.RuleEntry<[]>;
|
|
3797
3799
|
/**
|
|
3798
|
-
* Validates against
|
|
3800
|
+
* Validates against passing functions that mutate captured local variables into frozen contexts such as JSX props, hook arguments, and hook return values.
|
|
3799
3801
|
* @see https://eslint-react.xyz/docs/rules/immutability
|
|
3800
3802
|
*/
|
|
3801
3803
|
'react/x-immutability'?: Linter.RuleEntry<[]>;
|
|
@@ -6592,6 +6594,11 @@ interface RuleOptions {
|
|
|
6592
6594
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-add-event-listener/
|
|
6593
6595
|
*/
|
|
6594
6596
|
'svelte/no-add-event-listener'?: Linter.RuleEntry<[]>;
|
|
6597
|
+
/**
|
|
6598
|
+
* disallow the use of `{@const}` in favor of `{const ...}` declaration tags
|
|
6599
|
+
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-at-const-tags/
|
|
6600
|
+
*/
|
|
6601
|
+
'svelte/no-at-const-tags'?: Linter.RuleEntry<[]>;
|
|
6595
6602
|
/**
|
|
6596
6603
|
* disallow the use of `{@debug}`
|
|
6597
6604
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/no-at-debug-tags/
|
|
@@ -6901,7 +6908,7 @@ interface RuleOptions {
|
|
|
6901
6908
|
*/
|
|
6902
6909
|
'svelte/valid-each-key'?: Linter.RuleEntry<[]>;
|
|
6903
6910
|
/**
|
|
6904
|
-
* disallow props
|
|
6911
|
+
* disallow invalid props in SvelteKit route components.
|
|
6905
6912
|
* @see https://sveltejs.github.io/eslint-plugin-svelte/rules/valid-prop-names-in-kit-pages/
|
|
6906
6913
|
*/
|
|
6907
6914
|
'svelte/valid-prop-names-in-kit-pages'?: Linter.RuleEntry<[]>;
|
|
@@ -8154,1620 +8161,1670 @@ interface RuleOptions {
|
|
|
8154
8161
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
|
|
8155
8162
|
/**
|
|
8156
8163
|
* Prefer better DOM traversal APIs.
|
|
8157
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8164
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/better-dom-traversing.md
|
|
8158
8165
|
*/
|
|
8159
8166
|
'unicorn/better-dom-traversing'?: Linter.RuleEntry<[]>;
|
|
8160
8167
|
/**
|
|
8161
8168
|
* Removed. Prefer `eslint-plugin-regexp`
|
|
8162
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8169
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/deleted-and-deprecated-rules.md#better-regex
|
|
8163
8170
|
* @deprecated
|
|
8164
8171
|
*/
|
|
8165
8172
|
'unicorn/better-regex'?: Linter.RuleEntry<[]>;
|
|
8166
8173
|
/**
|
|
8167
8174
|
* Enforce a specific parameter name in catch clauses.
|
|
8168
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8175
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/catch-error-name.md
|
|
8169
8176
|
*/
|
|
8170
8177
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
8171
8178
|
/**
|
|
8172
8179
|
* Enforce consistent class references in static methods.
|
|
8173
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8180
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/class-reference-in-static-methods.md
|
|
8174
8181
|
*/
|
|
8175
8182
|
'unicorn/class-reference-in-static-methods'?: Linter.RuleEntry<UnicornClassReferenceInStaticMethods>;
|
|
8176
8183
|
/**
|
|
8177
8184
|
* Enforce better comment content.
|
|
8178
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8185
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/comment-content.md
|
|
8179
8186
|
*/
|
|
8180
8187
|
'unicorn/comment-content'?: Linter.RuleEntry<UnicornCommentContent>;
|
|
8181
8188
|
/**
|
|
8182
8189
|
* Enforce consistent assertion style with `node:assert`.
|
|
8183
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8190
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/consistent-assert.md
|
|
8184
8191
|
*/
|
|
8185
8192
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
8186
8193
|
/**
|
|
8187
8194
|
* Enforce consistent naming for boolean names.
|
|
8188
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8195
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/consistent-boolean-name.md
|
|
8189
8196
|
*/
|
|
8190
8197
|
'unicorn/consistent-boolean-name'?: Linter.RuleEntry<UnicornConsistentBooleanName>;
|
|
8191
8198
|
/**
|
|
8192
8199
|
* Enforce consistent class member order.
|
|
8193
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8200
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/consistent-class-member-order.md
|
|
8194
8201
|
*/
|
|
8195
8202
|
'unicorn/consistent-class-member-order'?: Linter.RuleEntry<UnicornConsistentClassMemberOrder>;
|
|
8196
8203
|
/**
|
|
8197
8204
|
* Enforce consistent spelling of compound words in identifiers.
|
|
8198
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8205
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/consistent-compound-words.md
|
|
8199
8206
|
*/
|
|
8200
8207
|
'unicorn/consistent-compound-words'?: Linter.RuleEntry<UnicornConsistentCompoundWords>;
|
|
8201
8208
|
/**
|
|
8202
8209
|
* Enforce consistent conditional object spread style.
|
|
8203
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8210
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/consistent-conditional-object-spread.md
|
|
8204
8211
|
*/
|
|
8205
8212
|
'unicorn/consistent-conditional-object-spread'?: Linter.RuleEntry<UnicornConsistentConditionalObjectSpread>;
|
|
8206
8213
|
/**
|
|
8207
8214
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
8208
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8215
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/consistent-date-clone.md
|
|
8209
8216
|
*/
|
|
8210
8217
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
8211
8218
|
/**
|
|
8212
8219
|
* Use destructured variables over properties.
|
|
8213
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8220
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/consistent-destructuring.md
|
|
8214
8221
|
*/
|
|
8215
8222
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
8216
8223
|
/**
|
|
8217
8224
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
8218
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8225
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/consistent-empty-array-spread.md
|
|
8219
8226
|
*/
|
|
8220
8227
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
8221
8228
|
/**
|
|
8222
8229
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
8223
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8230
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/consistent-existence-index-check.md
|
|
8224
8231
|
*/
|
|
8225
8232
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
8226
8233
|
/**
|
|
8227
8234
|
* Enforce consistent decorator position on exported classes.
|
|
8228
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8235
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/consistent-export-decorator-position.md
|
|
8229
8236
|
*/
|
|
8230
8237
|
'unicorn/consistent-export-decorator-position'?: Linter.RuleEntry<UnicornConsistentExportDecoratorPosition>;
|
|
8231
8238
|
/**
|
|
8232
8239
|
* Move function definitions to the highest possible scope.
|
|
8233
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8240
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/consistent-function-scoping.md
|
|
8234
8241
|
*/
|
|
8235
8242
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
8236
8243
|
/**
|
|
8237
8244
|
* Enforce function syntax by role.
|
|
8238
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8245
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/consistent-function-style.md
|
|
8239
8246
|
*/
|
|
8240
8247
|
'unicorn/consistent-function-style'?: Linter.RuleEntry<UnicornConsistentFunctionStyle>;
|
|
8241
8248
|
/**
|
|
8242
8249
|
* Enforce consistent JSON file reads before `JSON.parse()`.
|
|
8243
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8250
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/consistent-json-file-read.md
|
|
8244
8251
|
*/
|
|
8245
8252
|
'unicorn/consistent-json-file-read'?: Linter.RuleEntry<UnicornConsistentJsonFileRead>;
|
|
8246
8253
|
/**
|
|
8247
8254
|
* Enforce consistent optional chaining for same-base member access.
|
|
8248
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8255
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/consistent-optional-chaining.md
|
|
8249
8256
|
*/
|
|
8250
8257
|
'unicorn/consistent-optional-chaining'?: Linter.RuleEntry<[]>;
|
|
8251
8258
|
/**
|
|
8252
8259
|
* Enforce consistent style for escaping `${` in template literals.
|
|
8253
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8260
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/consistent-template-literal-escape.md
|
|
8254
8261
|
*/
|
|
8255
8262
|
'unicorn/consistent-template-literal-escape'?: Linter.RuleEntry<[]>;
|
|
8256
8263
|
/**
|
|
8257
8264
|
* Enforce consistent labels on tuple type elements.
|
|
8258
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8265
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/consistent-tuple-labels.md
|
|
8259
8266
|
*/
|
|
8260
8267
|
'unicorn/consistent-tuple-labels'?: Linter.RuleEntry<[]>;
|
|
8261
8268
|
/**
|
|
8262
8269
|
* Enforce correct `Error` subclassing.
|
|
8263
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8270
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/custom-error-definition.md
|
|
8264
8271
|
*/
|
|
8265
8272
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
8266
8273
|
/**
|
|
8267
8274
|
* Enforce consistent default export declarations.
|
|
8268
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8275
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/default-export-style.md
|
|
8269
8276
|
*/
|
|
8270
8277
|
'unicorn/default-export-style'?: Linter.RuleEntry<UnicornDefaultExportStyle>;
|
|
8271
8278
|
/**
|
|
8272
8279
|
* Enforce consistent style for DOM element dataset access.
|
|
8273
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8280
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/dom-node-dataset.md
|
|
8274
8281
|
*/
|
|
8275
8282
|
'unicorn/dom-node-dataset'?: Linter.RuleEntry<UnicornDomNodeDataset>;
|
|
8276
8283
|
/**
|
|
8277
8284
|
* Enforce no spaces between braces.
|
|
8278
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8285
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/empty-brace-spaces.md
|
|
8279
8286
|
*/
|
|
8280
8287
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
8281
8288
|
/**
|
|
8282
8289
|
* Enforce passing a `message` value when creating a built-in error.
|
|
8283
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8290
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/error-message.md
|
|
8284
8291
|
*/
|
|
8285
8292
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
8286
8293
|
/**
|
|
8287
8294
|
* Require escape sequences to use uppercase or lowercase values.
|
|
8288
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8295
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/escape-case.md
|
|
8289
8296
|
*/
|
|
8290
8297
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
8291
8298
|
/**
|
|
8292
8299
|
* Add expiration conditions to TODO comments.
|
|
8293
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8300
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/expiring-todo-comments.md
|
|
8294
8301
|
*/
|
|
8295
8302
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
8296
8303
|
/**
|
|
8297
8304
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
8298
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8305
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/explicit-length-check.md
|
|
8299
8306
|
*/
|
|
8300
8307
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
8301
8308
|
/**
|
|
8302
8309
|
* Enforce or disallow explicit `delay` argument for `setTimeout()` and `setInterval()`.
|
|
8303
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8310
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/explicit-timer-delay.md
|
|
8304
8311
|
*/
|
|
8305
8312
|
'unicorn/explicit-timer-delay'?: Linter.RuleEntry<UnicornExplicitTimerDelay>;
|
|
8306
8313
|
/**
|
|
8307
8314
|
* Enforce a case style for filenames and directory names.
|
|
8308
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8315
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/filename-case.md
|
|
8309
8316
|
*/
|
|
8310
8317
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
8311
8318
|
/**
|
|
8312
8319
|
* Require identifiers to match a specified regular expression.
|
|
8313
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8320
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/id-match.md
|
|
8314
8321
|
*/
|
|
8315
8322
|
'unicorn/id-match'?: Linter.RuleEntry<UnicornIdMatch>;
|
|
8316
8323
|
/**
|
|
8317
8324
|
* Enforce specific import styles per module.
|
|
8318
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8325
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/import-style.md
|
|
8319
8326
|
*/
|
|
8320
8327
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
8321
8328
|
/**
|
|
8322
8329
|
* Prevent usage of variables from outside the scope of isolated functions.
|
|
8323
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8330
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/isolated-functions.md
|
|
8324
8331
|
*/
|
|
8325
8332
|
'unicorn/isolated-functions'?: Linter.RuleEntry<UnicornIsolatedFunctions>;
|
|
8326
8333
|
/**
|
|
8327
8334
|
* Require or disallow logical assignment operator shorthand
|
|
8328
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8335
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/logical-assignment-operators.md
|
|
8329
8336
|
*/
|
|
8330
8337
|
'unicorn/logical-assignment-operators'?: Linter.RuleEntry<UnicornLogicalAssignmentOperators>;
|
|
8331
8338
|
/**
|
|
8332
8339
|
* Limit the depth of nested calls.
|
|
8333
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8340
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/max-nested-calls.md
|
|
8334
8341
|
*/
|
|
8335
8342
|
'unicorn/max-nested-calls'?: Linter.RuleEntry<UnicornMaxNestedCalls>;
|
|
8336
8343
|
/**
|
|
8337
8344
|
* Enforce replacements for variable, property, and filenames.
|
|
8338
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8345
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/name-replacements.md
|
|
8339
8346
|
*/
|
|
8340
8347
|
'unicorn/name-replacements'?: Linter.RuleEntry<UnicornNameReplacements>;
|
|
8341
8348
|
/**
|
|
8342
8349
|
* Enforce correct use of `new` for builtin constructors.
|
|
8343
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8350
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/new-for-builtins.md
|
|
8344
8351
|
*/
|
|
8345
8352
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
8346
8353
|
/**
|
|
8347
8354
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
8348
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8355
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-abusive-eslint-disable.md
|
|
8349
8356
|
*/
|
|
8350
8357
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
8351
8358
|
/**
|
|
8352
8359
|
* Disallow recursive access to `this` within getters and setters.
|
|
8353
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8360
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-accessor-recursion.md
|
|
8354
8361
|
*/
|
|
8355
8362
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
8356
8363
|
/**
|
|
8357
8364
|
* Disallow bitwise operators where a logical operator was likely intended.
|
|
8358
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8365
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-accidental-bitwise-operator.md
|
|
8359
8366
|
*/
|
|
8360
8367
|
'unicorn/no-accidental-bitwise-operator'?: Linter.RuleEntry<[]>;
|
|
8361
8368
|
/**
|
|
8362
8369
|
* Disallow anonymous functions and classes as the default export.
|
|
8363
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8370
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-anonymous-default-export.md
|
|
8364
8371
|
*/
|
|
8365
8372
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
8366
8373
|
/**
|
|
8367
8374
|
* Prevent passing a function reference directly to iterator methods.
|
|
8368
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8375
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-array-callback-reference.md
|
|
8369
8376
|
*/
|
|
8370
8377
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<UnicornNoArrayCallbackReference>;
|
|
8371
8378
|
/**
|
|
8372
8379
|
* Disallow array accumulation with `Array#concat()` in loops.
|
|
8373
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8380
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-array-concat-in-loop.md
|
|
8374
8381
|
*/
|
|
8375
8382
|
'unicorn/no-array-concat-in-loop'?: Linter.RuleEntry<[]>;
|
|
8376
8383
|
/**
|
|
8377
8384
|
* Disallow using reference values as `Array#fill()` values.
|
|
8378
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8385
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-array-fill-with-reference-type.md
|
|
8379
8386
|
*/
|
|
8380
8387
|
'unicorn/no-array-fill-with-reference-type'?: Linter.RuleEntry<[]>;
|
|
8381
8388
|
/**
|
|
8382
8389
|
* Disallow `.fill()` after `Array.from({length: …})`.
|
|
8383
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8390
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-array-from-fill.md
|
|
8384
8391
|
*/
|
|
8385
8392
|
'unicorn/no-array-from-fill'?: Linter.RuleEntry<[]>;
|
|
8386
8393
|
/**
|
|
8387
8394
|
* Disallow front-of-array mutation.
|
|
8388
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8395
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-array-front-mutation.md
|
|
8389
8396
|
*/
|
|
8390
8397
|
'unicorn/no-array-front-mutation'?: Linter.RuleEntry<[]>;
|
|
8391
8398
|
/**
|
|
8392
8399
|
* Disallow using the `this` argument in array methods.
|
|
8393
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8400
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-array-method-this-argument.md
|
|
8394
8401
|
*/
|
|
8395
8402
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
8396
8403
|
/**
|
|
8397
8404
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
8398
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8405
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/deleted-and-deprecated-rules.md#no-array-push-push
|
|
8399
8406
|
* @deprecated
|
|
8400
8407
|
*/
|
|
8401
8408
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
8402
8409
|
/**
|
|
8403
8410
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
8404
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8411
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-array-reduce.md
|
|
8405
8412
|
*/
|
|
8406
8413
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
8407
8414
|
/**
|
|
8408
8415
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
8409
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8416
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-array-reverse.md
|
|
8410
8417
|
*/
|
|
8411
8418
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
8412
8419
|
/**
|
|
8413
8420
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
8414
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8421
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-array-sort.md
|
|
8415
8422
|
*/
|
|
8416
8423
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
8417
8424
|
/**
|
|
8418
8425
|
* Disallow sorting arrays to get the minimum or maximum value.
|
|
8419
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8426
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-array-sort-for-min-max.md
|
|
8420
8427
|
*/
|
|
8421
8428
|
'unicorn/no-array-sort-for-min-max'?: Linter.RuleEntry<[]>;
|
|
8422
8429
|
/**
|
|
8423
8430
|
* Prefer `Array#toSpliced()` over `Array#splice()`.
|
|
8424
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8431
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-array-splice.md
|
|
8425
8432
|
*/
|
|
8426
8433
|
'unicorn/no-array-splice'?: Linter.RuleEntry<[]>;
|
|
8427
8434
|
/**
|
|
8428
8435
|
* Disallow asterisk prefixes in documentation comments.
|
|
8429
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8436
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-asterisk-prefix-in-documentation-comments.md
|
|
8430
8437
|
*/
|
|
8431
8438
|
'unicorn/no-asterisk-prefix-in-documentation-comments'?: Linter.RuleEntry<[]>;
|
|
8439
|
+
/**
|
|
8440
|
+
* Disallow async functions as `Promise#finally()` callbacks.
|
|
8441
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-async-promise-finally.md
|
|
8442
|
+
*/
|
|
8443
|
+
'unicorn/no-async-promise-finally'?: Linter.RuleEntry<[]>;
|
|
8432
8444
|
/**
|
|
8433
8445
|
* Disallow member access from await expression.
|
|
8434
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8446
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-await-expression-member.md
|
|
8435
8447
|
*/
|
|
8436
8448
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
8437
8449
|
/**
|
|
8438
8450
|
* Disallow using `await` in `Promise` method parameters.
|
|
8439
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8451
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-await-in-promise-methods.md
|
|
8440
8452
|
*/
|
|
8441
8453
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
8442
8454
|
/**
|
|
8443
8455
|
* Disallow unnecessary `Blob` to `File` conversion.
|
|
8444
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8456
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-blob-to-file.md
|
|
8445
8457
|
*/
|
|
8446
8458
|
'unicorn/no-blob-to-file'?: Linter.RuleEntry<[]>;
|
|
8447
8459
|
/**
|
|
8448
8460
|
* Disallow boolean-returning sort comparators.
|
|
8449
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8461
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-boolean-sort-comparator.md
|
|
8450
8462
|
*/
|
|
8451
8463
|
'unicorn/no-boolean-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
8452
8464
|
/**
|
|
8453
8465
|
* Disallow `break` and `continue` in nested loops and switches inside loops.
|
|
8454
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8466
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-break-in-nested-loop.md
|
|
8455
8467
|
*/
|
|
8456
8468
|
'unicorn/no-break-in-nested-loop'?: Linter.RuleEntry<[]>;
|
|
8457
8469
|
/**
|
|
8458
8470
|
* Prefer drawing canvases directly instead of converting them to images.
|
|
8459
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8471
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-canvas-to-image.md
|
|
8460
8472
|
*/
|
|
8461
8473
|
'unicorn/no-canvas-to-image'?: Linter.RuleEntry<[]>;
|
|
8462
8474
|
/**
|
|
8463
8475
|
* Disallow chained comparisons such as `a < b < c`.
|
|
8464
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8476
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-chained-comparison.md
|
|
8465
8477
|
*/
|
|
8466
8478
|
'unicorn/no-chained-comparison'?: Linter.RuleEntry<[]>;
|
|
8467
8479
|
/**
|
|
8468
8480
|
* Disallow accessing `Map`, `Set`, `WeakMap`, and `WeakSet` entries with bracket notation.
|
|
8469
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8481
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-collection-bracket-access.md
|
|
8470
8482
|
*/
|
|
8471
8483
|
'unicorn/no-collection-bracket-access'?: Linter.RuleEntry<[]>;
|
|
8472
8484
|
/**
|
|
8473
8485
|
* Disallow dynamic object property existence checks.
|
|
8474
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8486
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-computed-property-existence-check.md
|
|
8475
8487
|
*/
|
|
8476
8488
|
'unicorn/no-computed-property-existence-check'?: Linter.RuleEntry<[]>;
|
|
8477
8489
|
/**
|
|
8478
8490
|
* Disallow confusing uses of `Array#{splice,toSpliced}()`.
|
|
8479
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8491
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-confusing-array-splice.md
|
|
8480
8492
|
*/
|
|
8481
8493
|
'unicorn/no-confusing-array-splice'?: Linter.RuleEntry<[]>;
|
|
8482
8494
|
/**
|
|
8483
8495
|
* Disallow confusing uses of `Array#with()`.
|
|
8484
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8496
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-confusing-array-with.md
|
|
8485
8497
|
*/
|
|
8486
8498
|
'unicorn/no-confusing-array-with'?: Linter.RuleEntry<[]>;
|
|
8487
8499
|
/**
|
|
8488
8500
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
8489
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8501
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-console-spaces.md
|
|
8490
8502
|
*/
|
|
8491
8503
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
8492
8504
|
/**
|
|
8493
8505
|
* Disallow arithmetic and bitwise operations that always evaluate to `0`.
|
|
8494
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8506
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-constant-zero-expression.md
|
|
8495
8507
|
*/
|
|
8496
8508
|
'unicorn/no-constant-zero-expression'?: Linter.RuleEntry<[]>;
|
|
8497
8509
|
/**
|
|
8498
8510
|
* Disallow declarations before conditional early exits when they are only used after the exit.
|
|
8499
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8511
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-declarations-before-early-exit.md
|
|
8500
8512
|
*/
|
|
8501
8513
|
'unicorn/no-declarations-before-early-exit'?: Linter.RuleEntry<[]>;
|
|
8502
8514
|
/**
|
|
8503
8515
|
* Do not use `document.cookie` directly.
|
|
8504
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8516
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-document-cookie.md
|
|
8505
8517
|
*/
|
|
8506
8518
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
8507
8519
|
/**
|
|
8508
8520
|
* Disallow two comparisons of the same operands that can be combined into one.
|
|
8509
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8521
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-double-comparison.md
|
|
8510
8522
|
*/
|
|
8511
8523
|
'unicorn/no-double-comparison'?: Linter.RuleEntry<[]>;
|
|
8512
8524
|
/**
|
|
8513
8525
|
* Disallow duplicate adjacent branches in if chains.
|
|
8514
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8526
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-duplicate-if-branches.md
|
|
8515
8527
|
*/
|
|
8516
8528
|
'unicorn/no-duplicate-if-branches'?: Linter.RuleEntry<[]>;
|
|
8517
8529
|
/**
|
|
8518
8530
|
* Disallow adjacent duplicate operands in logical expressions.
|
|
8519
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8531
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-duplicate-logical-operands.md
|
|
8520
8532
|
*/
|
|
8521
8533
|
'unicorn/no-duplicate-logical-operands'?: Linter.RuleEntry<[]>;
|
|
8522
8534
|
/**
|
|
8523
8535
|
* Disallow `.map()` and `.filter()` in `for…of` and `for await…of` loop headers.
|
|
8524
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8536
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-duplicate-loops.md
|
|
8525
8537
|
*/
|
|
8526
8538
|
'unicorn/no-duplicate-loops'?: Linter.RuleEntry<[]>;
|
|
8527
8539
|
/**
|
|
8528
8540
|
* Disallow duplicate values in `Set` constructor array literals.
|
|
8529
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8541
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-duplicate-set-values.md
|
|
8530
8542
|
*/
|
|
8531
8543
|
'unicorn/no-duplicate-set-values'?: Linter.RuleEntry<[]>;
|
|
8532
8544
|
/**
|
|
8533
8545
|
* Disallow empty files.
|
|
8534
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8546
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-empty-file.md
|
|
8535
8547
|
*/
|
|
8536
8548
|
'unicorn/no-empty-file'?: Linter.RuleEntry<UnicornNoEmptyFile>;
|
|
8537
8549
|
/**
|
|
8538
8550
|
* Disallow assigning to built-in error properties.
|
|
8539
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8551
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-error-property-assignment.md
|
|
8540
8552
|
*/
|
|
8541
8553
|
'unicorn/no-error-property-assignment'?: Linter.RuleEntry<[]>;
|
|
8542
8554
|
/**
|
|
8543
8555
|
* Disallow exports in scripts.
|
|
8544
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8556
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-exports-in-scripts.md
|
|
8545
8557
|
*/
|
|
8546
8558
|
'unicorn/no-exports-in-scripts'?: Linter.RuleEntry<[]>;
|
|
8547
8559
|
/**
|
|
8548
8560
|
* Prefer `for…of` over the `forEach` method.
|
|
8549
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8561
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-for-each.md
|
|
8550
8562
|
*/
|
|
8551
8563
|
'unicorn/no-for-each'?: Linter.RuleEntry<[]>;
|
|
8552
8564
|
/**
|
|
8553
8565
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
8554
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8566
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-for-loop.md
|
|
8555
8567
|
*/
|
|
8556
8568
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
8557
8569
|
/**
|
|
8558
8570
|
* Disallow assigning properties on the global object.
|
|
8559
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8571
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-global-object-property-assignment.md
|
|
8560
8572
|
*/
|
|
8561
8573
|
'unicorn/no-global-object-property-assignment'?: Linter.RuleEntry<[]>;
|
|
8562
8574
|
/**
|
|
8563
8575
|
* Replaced by `unicorn/prefer-unicode-code-point-escapes` which covers more cases.
|
|
8564
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8576
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/deleted-and-deprecated-rules.md#no-hex-escape
|
|
8565
8577
|
* @deprecated
|
|
8566
8578
|
*/
|
|
8567
8579
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
8568
8580
|
/**
|
|
8569
8581
|
* Disallow immediate mutation after variable assignment.
|
|
8570
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8582
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-immediate-mutation.md
|
|
8571
8583
|
*/
|
|
8572
8584
|
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]>;
|
|
8573
8585
|
/**
|
|
8574
8586
|
* Disallow impossible comparisons against `.length` or `.size`.
|
|
8575
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8587
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-impossible-length-comparison.md
|
|
8576
8588
|
*/
|
|
8577
8589
|
'unicorn/no-impossible-length-comparison'?: Linter.RuleEntry<[]>;
|
|
8578
8590
|
/**
|
|
8579
8591
|
* Disallow incorrect `querySelector()` and `querySelectorAll()` usage.
|
|
8580
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8592
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-incorrect-query-selector.md
|
|
8581
8593
|
*/
|
|
8582
8594
|
'unicorn/no-incorrect-query-selector'?: Linter.RuleEntry<[]>;
|
|
8583
8595
|
/**
|
|
8584
8596
|
* Disallow incorrect template literal interpolation syntax.
|
|
8585
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8597
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-incorrect-template-string-interpolation.md
|
|
8586
8598
|
*/
|
|
8587
8599
|
'unicorn/no-incorrect-template-string-interpolation'?: Linter.RuleEntry<[]>;
|
|
8588
8600
|
/**
|
|
8589
8601
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
8590
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8602
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array
|
|
8591
8603
|
* @deprecated
|
|
8592
8604
|
*/
|
|
8593
8605
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
8594
8606
|
/**
|
|
8595
8607
|
* Disallow `instanceof` with built-in objects
|
|
8596
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8608
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-instanceof-builtins.md
|
|
8597
8609
|
*/
|
|
8598
8610
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
8599
8611
|
/**
|
|
8600
8612
|
* Disallow calling functions and constructors with an invalid number of arguments.
|
|
8601
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8613
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-invalid-argument-count.md
|
|
8602
8614
|
*/
|
|
8603
8615
|
'unicorn/no-invalid-argument-count'?: Linter.RuleEntry<UnicornNoInvalidArgumentCount>;
|
|
8604
8616
|
/**
|
|
8605
8617
|
* Disallow comparing a single character from a string to a multi-character string.
|
|
8606
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8618
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-invalid-character-comparison.md
|
|
8607
8619
|
*/
|
|
8608
8620
|
'unicorn/no-invalid-character-comparison'?: Linter.RuleEntry<[]>;
|
|
8609
8621
|
/**
|
|
8610
8622
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
8611
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8623
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-invalid-fetch-options.md
|
|
8612
8624
|
*/
|
|
8613
8625
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
8614
8626
|
/**
|
|
8615
8627
|
* Disallow invalid `accept` values on file inputs.
|
|
8616
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8628
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-invalid-file-input-accept.md
|
|
8617
8629
|
*/
|
|
8618
8630
|
'unicorn/no-invalid-file-input-accept'?: Linter.RuleEntry<[]>;
|
|
8619
8631
|
/**
|
|
8620
8632
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
8621
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8633
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-invalid-remove-event-listener.md
|
|
8622
8634
|
*/
|
|
8623
8635
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
8624
8636
|
/**
|
|
8625
8637
|
* Disallow invalid implementations of well-known symbol methods.
|
|
8626
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8638
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-invalid-well-known-symbol-methods.md
|
|
8627
8639
|
*/
|
|
8628
8640
|
'unicorn/no-invalid-well-known-symbol-methods'?: Linter.RuleEntry<[]>;
|
|
8629
8641
|
/**
|
|
8630
8642
|
* Disallow identifiers starting with `new` or `class`.
|
|
8631
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8643
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-keyword-prefix.md
|
|
8632
8644
|
*/
|
|
8633
8645
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
8634
8646
|
/**
|
|
8635
8647
|
* Disallow accessing `event.currentTarget` after the synchronous event dispatch has finished.
|
|
8636
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8648
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-late-current-target-access.md
|
|
8637
8649
|
*/
|
|
8638
8650
|
'unicorn/no-late-current-target-access'?: Linter.RuleEntry<[]>;
|
|
8639
8651
|
/**
|
|
8640
8652
|
* Disallow event-control method calls after the synchronous event dispatch has finished.
|
|
8641
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8653
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-late-event-control.md
|
|
8642
8654
|
*/
|
|
8643
8655
|
'unicorn/no-late-event-control'?: Linter.RuleEntry<[]>;
|
|
8644
8656
|
/**
|
|
8645
8657
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
8646
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8658
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
|
|
8647
8659
|
* @deprecated
|
|
8648
8660
|
*/
|
|
8649
8661
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
8650
8662
|
/**
|
|
8651
8663
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
8652
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8664
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-lonely-if.md
|
|
8653
8665
|
*/
|
|
8654
8666
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
8655
8667
|
/**
|
|
8656
8668
|
* Disallow mutating a loop iterable during iteration.
|
|
8657
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8669
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-loop-iterable-mutation.md
|
|
8658
8670
|
*/
|
|
8659
8671
|
'unicorn/no-loop-iterable-mutation'?: Linter.RuleEntry<[]>;
|
|
8660
8672
|
/**
|
|
8661
8673
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
8662
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8674
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-magic-array-flat-depth.md
|
|
8663
8675
|
*/
|
|
8664
8676
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
8665
8677
|
/**
|
|
8666
8678
|
* Disallow manually wrapped comments.
|
|
8667
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8679
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-manually-wrapped-comments.md
|
|
8668
8680
|
*/
|
|
8669
8681
|
'unicorn/no-manually-wrapped-comments'?: Linter.RuleEntry<[]>;
|
|
8670
8682
|
/**
|
|
8671
8683
|
* Disallow checking a Map key before accessing a different key.
|
|
8672
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8684
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-mismatched-map-key.md
|
|
8673
8685
|
*/
|
|
8674
8686
|
'unicorn/no-mismatched-map-key'?: Linter.RuleEntry<[]>;
|
|
8675
8687
|
/**
|
|
8676
8688
|
* Disallow misrefactored compound assignments where the target is duplicated in the right-hand side.
|
|
8677
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8689
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-misrefactored-assignment.md
|
|
8678
8690
|
*/
|
|
8679
8691
|
'unicorn/no-misrefactored-assignment'?: Linter.RuleEntry<[]>;
|
|
8680
8692
|
/**
|
|
8681
8693
|
* Disallow named usage of default import and export.
|
|
8682
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8694
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-named-default.md
|
|
8683
8695
|
*/
|
|
8684
8696
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
8685
8697
|
/**
|
|
8686
8698
|
* Disallow negated array predicate calls.
|
|
8687
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8699
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-negated-array-predicate.md
|
|
8688
8700
|
*/
|
|
8689
8701
|
'unicorn/no-negated-array-predicate'?: Linter.RuleEntry<[]>;
|
|
8690
8702
|
/**
|
|
8691
8703
|
* Disallow negated comparisons.
|
|
8692
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8704
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-negated-comparison.md
|
|
8693
8705
|
*/
|
|
8694
8706
|
'unicorn/no-negated-comparison'?: Linter.RuleEntry<UnicornNoNegatedComparison>;
|
|
8695
8707
|
/**
|
|
8696
8708
|
* Disallow negated conditions.
|
|
8697
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8709
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-negated-condition.md
|
|
8698
8710
|
*/
|
|
8699
8711
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
8700
8712
|
/**
|
|
8701
8713
|
* Disallow negated expression in equality check.
|
|
8702
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8714
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-negation-in-equality-check.md
|
|
8703
8715
|
*/
|
|
8704
8716
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
8705
8717
|
/**
|
|
8706
8718
|
* Disallow nested ternary expressions.
|
|
8707
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8719
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-nested-ternary.md
|
|
8708
8720
|
*/
|
|
8709
8721
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
8710
8722
|
/**
|
|
8711
8723
|
* Disallow `new Array()`.
|
|
8712
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8724
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-new-array.md
|
|
8713
8725
|
*/
|
|
8714
8726
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
8715
8727
|
/**
|
|
8716
8728
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
8717
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8729
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-new-buffer.md
|
|
8718
8730
|
*/
|
|
8719
8731
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
8720
8732
|
/**
|
|
8721
8733
|
* Disallow non-function values with function-style verb prefixes.
|
|
8722
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8734
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-non-function-verb-prefix.md
|
|
8723
8735
|
*/
|
|
8724
8736
|
'unicorn/no-non-function-verb-prefix'?: Linter.RuleEntry<UnicornNoNonFunctionVerbPrefix>;
|
|
8725
8737
|
/**
|
|
8726
8738
|
* Disallow non-standard properties on built-in objects.
|
|
8727
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8739
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-nonstandard-builtin-properties.md
|
|
8728
8740
|
*/
|
|
8729
8741
|
'unicorn/no-nonstandard-builtin-properties'?: Linter.RuleEntry<[]>;
|
|
8730
8742
|
/**
|
|
8731
8743
|
* Disallow the use of the `null` literal.
|
|
8732
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8744
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-null.md
|
|
8733
8745
|
*/
|
|
8734
8746
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
8735
8747
|
/**
|
|
8736
8748
|
* Disallow the use of objects as default parameters.
|
|
8737
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8749
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-object-as-default-parameter.md
|
|
8738
8750
|
*/
|
|
8739
8751
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
8740
8752
|
/**
|
|
8741
8753
|
* Disallow `Object` methods with `Map` or `Set`.
|
|
8742
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8754
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-object-methods-with-collections.md
|
|
8743
8755
|
*/
|
|
8744
8756
|
'unicorn/no-object-methods-with-collections'?: Linter.RuleEntry<[]>;
|
|
8745
8757
|
/**
|
|
8746
8758
|
* Disallow optional chaining on undeclared variables.
|
|
8747
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8759
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-optional-chaining-on-undeclared-variable.md
|
|
8748
8760
|
*/
|
|
8749
8761
|
'unicorn/no-optional-chaining-on-undeclared-variable'?: Linter.RuleEntry<[]>;
|
|
8750
8762
|
/**
|
|
8751
8763
|
* Disallow `process.exit()`.
|
|
8752
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8764
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-process-exit.md
|
|
8753
8765
|
*/
|
|
8754
8766
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
8755
8767
|
/**
|
|
8756
8768
|
* Disallow comparisons made redundant by an equality check in the same logical AND.
|
|
8757
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8769
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-redundant-comparison.md
|
|
8758
8770
|
*/
|
|
8759
8771
|
'unicorn/no-redundant-comparison'?: Linter.RuleEntry<[]>;
|
|
8760
8772
|
/**
|
|
8761
8773
|
* Disallow using the return value of `Array#push()` and `Array#unshift()`.
|
|
8762
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8774
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-return-array-push.md
|
|
8763
8775
|
*/
|
|
8764
8776
|
'unicorn/no-return-array-push'?: Linter.RuleEntry<[]>;
|
|
8765
8777
|
/**
|
|
8766
8778
|
* Disallow selector syntax in DOM names.
|
|
8767
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8779
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-selector-as-dom-name.md
|
|
8768
8780
|
*/
|
|
8769
8781
|
'unicorn/no-selector-as-dom-name'?: Linter.RuleEntry<[]>;
|
|
8770
8782
|
/**
|
|
8771
8783
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
8772
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8784
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
8773
8785
|
*/
|
|
8774
8786
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
8775
8787
|
/**
|
|
8776
8788
|
* Disallow classes that only have static members.
|
|
8777
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8789
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-static-only-class.md
|
|
8778
8790
|
*/
|
|
8779
8791
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
8780
8792
|
/**
|
|
8781
8793
|
* Prefer comparing values directly over subtracting and comparing to `0`.
|
|
8782
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8794
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-subtraction-comparison.md
|
|
8783
8795
|
*/
|
|
8784
8796
|
'unicorn/no-subtraction-comparison'?: Linter.RuleEntry<[]>;
|
|
8785
8797
|
/**
|
|
8786
8798
|
* Disallow `then` property.
|
|
8787
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8799
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-thenable.md
|
|
8788
8800
|
*/
|
|
8789
8801
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
8790
8802
|
/**
|
|
8791
8803
|
* Disallow assigning `this` to a variable.
|
|
8792
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8804
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-this-assignment.md
|
|
8793
8805
|
*/
|
|
8794
8806
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
8795
8807
|
/**
|
|
8796
8808
|
* Disallow `this` outside of classes.
|
|
8797
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8809
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-this-outside-of-class.md
|
|
8798
8810
|
*/
|
|
8799
8811
|
'unicorn/no-this-outside-of-class'?: Linter.RuleEntry<[]>;
|
|
8800
8812
|
/**
|
|
8801
8813
|
* Disallow assigning to top-level variables from inside functions.
|
|
8802
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8814
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-top-level-assignment-in-function.md
|
|
8803
8815
|
*/
|
|
8804
8816
|
'unicorn/no-top-level-assignment-in-function'?: Linter.RuleEntry<[]>;
|
|
8805
8817
|
/**
|
|
8806
8818
|
* Disallow top-level side effects in exported modules.
|
|
8807
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8819
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-top-level-side-effects.md
|
|
8808
8820
|
*/
|
|
8809
8821
|
'unicorn/no-top-level-side-effects'?: Linter.RuleEntry<[]>;
|
|
8810
8822
|
/**
|
|
8811
8823
|
* Disallow comparing `undefined` using `typeof`.
|
|
8812
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8824
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-typeof-undefined.md
|
|
8813
8825
|
*/
|
|
8814
8826
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
8815
8827
|
/**
|
|
8816
8828
|
* Disallow referencing methods without calling them.
|
|
8817
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8829
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-uncalled-method.md
|
|
8818
8830
|
*/
|
|
8819
8831
|
'unicorn/no-uncalled-method'?: Linter.RuleEntry<[]>;
|
|
8820
8832
|
/**
|
|
8821
8833
|
* Require class members to be declared.
|
|
8822
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8834
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-undeclared-class-members.md
|
|
8823
8835
|
*/
|
|
8824
8836
|
'unicorn/no-undeclared-class-members'?: Linter.RuleEntry<[]>;
|
|
8825
8837
|
/**
|
|
8826
8838
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
8827
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8839
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
8828
8840
|
*/
|
|
8829
8841
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
8842
|
+
/**
|
|
8843
|
+
* Disallow `Array#flatMap()` callbacks that only wrap a single item.
|
|
8844
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unnecessary-array-flat-map.md
|
|
8845
|
+
*/
|
|
8846
|
+
'unicorn/no-unnecessary-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
8830
8847
|
/**
|
|
8831
8848
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
8832
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8849
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
8833
8850
|
*/
|
|
8834
8851
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
8835
8852
|
/**
|
|
8836
8853
|
* Disallow awaiting non-promise values.
|
|
8837
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8854
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unnecessary-await.md
|
|
8838
8855
|
*/
|
|
8839
8856
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
8840
8857
|
/**
|
|
8841
8858
|
* Disallow unnecessary comparisons against boolean literals.
|
|
8842
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8859
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unnecessary-boolean-comparison.md
|
|
8843
8860
|
*/
|
|
8844
8861
|
'unicorn/no-unnecessary-boolean-comparison'?: Linter.RuleEntry<[]>;
|
|
8862
|
+
/**
|
|
8863
|
+
* Disallow unnecessary options in `fetch()` and `new Request()`.
|
|
8864
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unnecessary-fetch-options.md
|
|
8865
|
+
*/
|
|
8866
|
+
'unicorn/no-unnecessary-fetch-options'?: Linter.RuleEntry<[]>;
|
|
8845
8867
|
/**
|
|
8846
8868
|
* Disallow unnecessary `globalThis` references.
|
|
8847
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8869
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unnecessary-global-this.md
|
|
8848
8870
|
*/
|
|
8849
8871
|
'unicorn/no-unnecessary-global-this'?: Linter.RuleEntry<[]>;
|
|
8850
8872
|
/**
|
|
8851
8873
|
* Disallow unnecessary nested ternary expressions.
|
|
8852
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8874
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unnecessary-nested-ternary.md
|
|
8853
8875
|
*/
|
|
8854
8876
|
'unicorn/no-unnecessary-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
8855
8877
|
/**
|
|
8856
8878
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
8857
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8879
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unnecessary-polyfills.md
|
|
8858
8880
|
*/
|
|
8859
8881
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
8860
8882
|
/**
|
|
8861
8883
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
8862
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8884
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unnecessary-slice-end.md
|
|
8863
8885
|
*/
|
|
8864
8886
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
8865
8887
|
/**
|
|
8866
8888
|
* Disallow `Array#splice()` when simpler alternatives exist.
|
|
8867
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8889
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unnecessary-splice.md
|
|
8868
8890
|
*/
|
|
8869
8891
|
'unicorn/no-unnecessary-splice'?: Linter.RuleEntry<[]>;
|
|
8870
8892
|
/**
|
|
8871
8893
|
* Disallow unreadable array destructuring.
|
|
8872
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8894
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unreadable-array-destructuring.md
|
|
8873
8895
|
*/
|
|
8874
8896
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<UnicornNoUnreadableArrayDestructuring>;
|
|
8875
8897
|
/**
|
|
8876
8898
|
* Disallow unreadable iterable expressions in `for…of` and `for await…of` loop headers.
|
|
8877
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8899
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unreadable-for-of-expression.md
|
|
8878
8900
|
*/
|
|
8879
8901
|
'unicorn/no-unreadable-for-of-expression'?: Linter.RuleEntry<[]>;
|
|
8880
8902
|
/**
|
|
8881
8903
|
* Disallow unreadable IIFEs.
|
|
8882
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8904
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unreadable-iife.md
|
|
8883
8905
|
*/
|
|
8884
8906
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
8885
8907
|
/**
|
|
8886
8908
|
* Disallow unreadable `new` expressions.
|
|
8887
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8909
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unreadable-new-expression.md
|
|
8888
8910
|
*/
|
|
8889
8911
|
'unicorn/no-unreadable-new-expression'?: Linter.RuleEntry<[]>;
|
|
8890
8912
|
/**
|
|
8891
8913
|
* Disallow unreadable object destructuring.
|
|
8892
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8914
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unreadable-object-destructuring.md
|
|
8893
8915
|
*/
|
|
8894
8916
|
'unicorn/no-unreadable-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
8895
8917
|
/**
|
|
8896
8918
|
* Prevent unsafe use of ArrayBuffer view `.buffer`.
|
|
8897
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8919
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unsafe-buffer-conversion.md
|
|
8898
8920
|
*/
|
|
8899
8921
|
'unicorn/no-unsafe-buffer-conversion'?: Linter.RuleEntry<[]>;
|
|
8900
8922
|
/**
|
|
8901
8923
|
* Disallow unsafe DOM HTML APIs.
|
|
8902
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8924
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unsafe-dom-html.md
|
|
8903
8925
|
*/
|
|
8904
8926
|
'unicorn/no-unsafe-dom-html'?: Linter.RuleEntry<[]>;
|
|
8927
|
+
/**
|
|
8928
|
+
* Disallow reading `.value` from `Promise.allSettled()` results without a fulfilled status guard.
|
|
8929
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unsafe-promise-all-settled-values.md
|
|
8930
|
+
*/
|
|
8931
|
+
'unicorn/no-unsafe-promise-all-settled-values'?: Linter.RuleEntry<[]>;
|
|
8905
8932
|
/**
|
|
8906
8933
|
* Disallow unsafe values as property keys.
|
|
8907
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8934
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unsafe-property-key.md
|
|
8908
8935
|
*/
|
|
8909
8936
|
'unicorn/no-unsafe-property-key'?: Linter.RuleEntry<[]>;
|
|
8910
8937
|
/**
|
|
8911
8938
|
* Disallow non-literal replacement values in `String#replace()` and `String#replaceAll()`.
|
|
8912
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8939
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unsafe-string-replacement.md
|
|
8913
8940
|
*/
|
|
8914
8941
|
'unicorn/no-unsafe-string-replacement'?: Linter.RuleEntry<[]>;
|
|
8915
8942
|
/**
|
|
8916
8943
|
* Disallow ignoring the return value of selected array methods.
|
|
8917
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8944
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unused-array-method-return.md
|
|
8918
8945
|
*/
|
|
8919
8946
|
'unicorn/no-unused-array-method-return'?: Linter.RuleEntry<[]>;
|
|
8920
8947
|
/**
|
|
8921
8948
|
* Disallow unused object properties.
|
|
8922
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8949
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-unused-properties.md
|
|
8923
8950
|
*/
|
|
8924
8951
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
8925
8952
|
/**
|
|
8926
8953
|
* Disallow unnecessary `Boolean()` casts in array predicate callbacks.
|
|
8927
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8954
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-boolean-cast.md
|
|
8928
8955
|
*/
|
|
8929
8956
|
'unicorn/no-useless-boolean-cast'?: Linter.RuleEntry<[]>;
|
|
8930
8957
|
/**
|
|
8931
8958
|
* Disallow useless type coercions of values that are already of the target type.
|
|
8932
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8959
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-coercion.md
|
|
8933
8960
|
*/
|
|
8934
8961
|
'unicorn/no-useless-coercion'?: Linter.RuleEntry<[]>;
|
|
8935
8962
|
/**
|
|
8936
8963
|
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
8937
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8964
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-collection-argument.md
|
|
8938
8965
|
*/
|
|
8939
8966
|
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
|
|
8940
8967
|
/**
|
|
8941
8968
|
* Disallow useless compound assignments such as `x += 0`.
|
|
8942
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8969
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-compound-assignment.md
|
|
8943
8970
|
*/
|
|
8944
8971
|
'unicorn/no-useless-compound-assignment'?: Linter.RuleEntry<[]>;
|
|
8945
8972
|
/**
|
|
8946
8973
|
* Disallow useless concatenation of literals.
|
|
8947
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8974
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-concat.md
|
|
8948
8975
|
*/
|
|
8949
8976
|
'unicorn/no-useless-concat'?: Linter.RuleEntry<[]>;
|
|
8950
8977
|
/**
|
|
8951
8978
|
* Disallow useless `continue` statements.
|
|
8952
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8979
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-continue.md
|
|
8953
8980
|
*/
|
|
8954
8981
|
'unicorn/no-useless-continue'?: Linter.RuleEntry<[]>;
|
|
8955
8982
|
/**
|
|
8956
8983
|
* Disallow unnecessary existence checks before deletion.
|
|
8957
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8984
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-delete-check.md
|
|
8958
8985
|
*/
|
|
8959
8986
|
'unicorn/no-useless-delete-check'?: Linter.RuleEntry<[]>;
|
|
8960
8987
|
/**
|
|
8961
8988
|
* Disallow `else` after a statement that exits.
|
|
8962
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8989
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-else.md
|
|
8963
8990
|
*/
|
|
8964
8991
|
'unicorn/no-useless-else'?: Linter.RuleEntry<[]>;
|
|
8965
8992
|
/**
|
|
8966
8993
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
8967
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8994
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
8968
8995
|
*/
|
|
8969
8996
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
8970
8997
|
/**
|
|
8971
8998
|
* Disallow useless fallback when spreading in object literals.
|
|
8972
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
8999
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-fallback-in-spread.md
|
|
8973
9000
|
*/
|
|
8974
9001
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
8975
9002
|
/**
|
|
8976
9003
|
* Disallow unnecessary `.toArray()` on iterators.
|
|
8977
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9004
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-iterator-to-array.md
|
|
8978
9005
|
*/
|
|
8979
9006
|
'unicorn/no-useless-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
8980
9007
|
/**
|
|
8981
9008
|
* Disallow useless array length check.
|
|
8982
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9009
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-length-check.md
|
|
8983
9010
|
*/
|
|
8984
9011
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
8985
9012
|
/**
|
|
8986
9013
|
* Disallow unnecessary operands in logical expressions involving boolean literals.
|
|
8987
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9014
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-logical-operand.md
|
|
8988
9015
|
*/
|
|
8989
9016
|
'unicorn/no-useless-logical-operand'?: Linter.RuleEntry<[]>;
|
|
8990
9017
|
/**
|
|
8991
9018
|
* Disallow useless overrides of class methods.
|
|
8992
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9019
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-override.md
|
|
8993
9020
|
*/
|
|
8994
9021
|
'unicorn/no-useless-override'?: Linter.RuleEntry<[]>;
|
|
8995
9022
|
/**
|
|
8996
9023
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
8997
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9024
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
8998
9025
|
*/
|
|
8999
9026
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
9000
9027
|
/**
|
|
9001
9028
|
* Disallow simple recursive function calls that can be replaced with a loop.
|
|
9002
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9029
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-recursion.md
|
|
9003
9030
|
*/
|
|
9004
9031
|
'unicorn/no-useless-recursion'?: Linter.RuleEntry<[]>;
|
|
9005
9032
|
/**
|
|
9006
9033
|
* Disallow unnecessary spread.
|
|
9007
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9034
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-spread.md
|
|
9008
9035
|
*/
|
|
9009
9036
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
9010
9037
|
/**
|
|
9011
9038
|
* Disallow useless case in switch statements.
|
|
9012
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9039
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-switch-case.md
|
|
9013
9040
|
*/
|
|
9014
9041
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
9015
9042
|
/**
|
|
9016
9043
|
* Disallow useless template literal expressions.
|
|
9017
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9044
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-template-literals.md
|
|
9018
9045
|
*/
|
|
9019
9046
|
'unicorn/no-useless-template-literals'?: Linter.RuleEntry<[]>;
|
|
9020
9047
|
/**
|
|
9021
9048
|
* Disallow useless `undefined`.
|
|
9022
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9049
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-useless-undefined.md
|
|
9023
9050
|
*/
|
|
9024
9051
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
9025
9052
|
/**
|
|
9026
9053
|
* Disallow the bitwise XOR operator where exponentiation was likely intended.
|
|
9027
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9054
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-xor-as-exponentiation.md
|
|
9028
9055
|
*/
|
|
9029
9056
|
'unicorn/no-xor-as-exponentiation'?: Linter.RuleEntry<[]>;
|
|
9030
9057
|
/**
|
|
9031
9058
|
* Disallow number literals with zero fractions or dangling dots.
|
|
9032
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9059
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/no-zero-fractions.md
|
|
9033
9060
|
*/
|
|
9034
9061
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
9035
9062
|
/**
|
|
9036
9063
|
* Enforce proper case for numeric literals.
|
|
9037
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9064
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/number-literal-case.md
|
|
9038
9065
|
*/
|
|
9039
9066
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
9040
9067
|
/**
|
|
9041
9068
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
9042
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9069
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/numeric-separators-style.md
|
|
9043
9070
|
*/
|
|
9044
9071
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
9045
9072
|
/**
|
|
9046
9073
|
* Require assignment operator shorthand where possible.
|
|
9047
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9074
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/operator-assignment.md
|
|
9048
9075
|
*/
|
|
9049
9076
|
'unicorn/operator-assignment'?: Linter.RuleEntry<UnicornOperatorAssignment>;
|
|
9077
|
+
/**
|
|
9078
|
+
* Prefer `AbortSignal.any()` over manually forwarding abort events between signals.
|
|
9079
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-abort-signal-any.md
|
|
9080
|
+
*/
|
|
9081
|
+
'unicorn/prefer-abort-signal-any'?: Linter.RuleEntry<[]>;
|
|
9050
9082
|
/**
|
|
9051
9083
|
* Prefer `AbortSignal.timeout()` over manually aborting an `AbortController` with `setTimeout()`.
|
|
9052
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9084
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-abort-signal-timeout.md
|
|
9053
9085
|
*/
|
|
9054
9086
|
'unicorn/prefer-abort-signal-timeout'?: Linter.RuleEntry<[]>;
|
|
9055
9087
|
/**
|
|
9056
9088
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
9057
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9089
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-add-event-listener.md
|
|
9058
9090
|
*/
|
|
9059
9091
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
9060
9092
|
/**
|
|
9061
9093
|
* Prefer an options object over a boolean in `.addEventListener()`.
|
|
9062
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9094
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-add-event-listener-options.md
|
|
9063
9095
|
*/
|
|
9064
9096
|
'unicorn/prefer-add-event-listener-options'?: Linter.RuleEntry<[]>;
|
|
9065
9097
|
/**
|
|
9066
9098
|
* Prefer `AggregateError` when throwing collected errors.
|
|
9067
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9099
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-aggregate-error.md
|
|
9068
9100
|
*/
|
|
9069
9101
|
'unicorn/prefer-aggregate-error'?: Linter.RuleEntry<[]>;
|
|
9070
9102
|
/**
|
|
9071
9103
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
9072
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9104
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-array-find.md
|
|
9073
9105
|
*/
|
|
9074
9106
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
9075
9107
|
/**
|
|
9076
9108
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
9077
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9109
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-array-flat.md
|
|
9078
9110
|
*/
|
|
9079
9111
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
9080
9112
|
/**
|
|
9081
9113
|
* Prefer `.flatMap(…)` over `.map(…).flat()` and `.filter(…).flatMap(…)`.
|
|
9082
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9114
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-array-flat-map.md
|
|
9083
9115
|
*/
|
|
9084
9116
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
9085
9117
|
/**
|
|
9086
9118
|
* Prefer `Array.fromAsync()` over `for await…of` array accumulation.
|
|
9087
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9119
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-array-from-async.md
|
|
9088
9120
|
*/
|
|
9089
9121
|
'unicorn/prefer-array-from-async'?: Linter.RuleEntry<[]>;
|
|
9090
9122
|
/**
|
|
9091
9123
|
* Prefer using the `Array.from()` mapping function argument.
|
|
9092
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9124
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-array-from-map.md
|
|
9093
9125
|
*/
|
|
9094
9126
|
'unicorn/prefer-array-from-map'?: Linter.RuleEntry<[]>;
|
|
9127
|
+
/**
|
|
9128
|
+
* Prefer `Array.from({length}, …)` when creating range arrays.
|
|
9129
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-array-from-range.md
|
|
9130
|
+
*/
|
|
9131
|
+
'unicorn/prefer-array-from-range'?: Linter.RuleEntry<[]>;
|
|
9095
9132
|
/**
|
|
9096
9133
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
9097
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9134
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-array-index-of.md
|
|
9098
9135
|
*/
|
|
9099
9136
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
9100
9137
|
/**
|
|
9101
9138
|
* Prefer iterating an array directly or with `Array#keys()` over `Array#entries()` when the index or value is unused.
|
|
9102
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9139
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-array-iterable-methods.md
|
|
9103
9140
|
*/
|
|
9104
9141
|
'unicorn/prefer-array-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
9105
9142
|
/**
|
|
9106
9143
|
* Prefer last-oriented array methods over `Array#reverse()` or `Array#toReversed()` followed by a method.
|
|
9107
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9144
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-array-last-methods.md
|
|
9108
9145
|
*/
|
|
9109
9146
|
'unicorn/prefer-array-last-methods'?: Linter.RuleEntry<[]>;
|
|
9110
9147
|
/**
|
|
9111
9148
|
* Prefer `Array#slice()` over `Array#splice()` when reading from the returned array.
|
|
9112
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9149
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-array-slice.md
|
|
9113
9150
|
*/
|
|
9114
9151
|
'unicorn/prefer-array-slice'?: Linter.RuleEntry<[]>;
|
|
9115
9152
|
/**
|
|
9116
9153
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
9117
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9154
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-array-some.md
|
|
9118
9155
|
*/
|
|
9119
9156
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
9120
9157
|
/**
|
|
9121
9158
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
9122
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9159
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-at.md
|
|
9123
9160
|
*/
|
|
9124
9161
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
9125
9162
|
/**
|
|
9126
9163
|
* Prefer `await` over promise chaining.
|
|
9127
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9164
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-await.md
|
|
9128
9165
|
*/
|
|
9129
9166
|
'unicorn/prefer-await'?: Linter.RuleEntry<[]>;
|
|
9130
9167
|
/**
|
|
9131
9168
|
* Prefer `BigInt` literals over the constructor.
|
|
9132
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9169
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-bigint-literals.md
|
|
9133
9170
|
*/
|
|
9134
9171
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
9135
9172
|
/**
|
|
9136
9173
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
9137
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9174
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-blob-reading-methods.md
|
|
9138
9175
|
*/
|
|
9139
9176
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
9177
|
+
/**
|
|
9178
|
+
* Prefer block statements over IIFEs used only for scoping.
|
|
9179
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-block-statement-over-iife.md
|
|
9180
|
+
*/
|
|
9181
|
+
'unicorn/prefer-block-statement-over-iife'?: Linter.RuleEntry<[]>;
|
|
9140
9182
|
/**
|
|
9141
9183
|
* Prefer directly returning boolean expressions over `if` statements.
|
|
9142
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9184
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-boolean-return.md
|
|
9143
9185
|
*/
|
|
9144
9186
|
'unicorn/prefer-boolean-return'?: Linter.RuleEntry<[]>;
|
|
9145
9187
|
/**
|
|
9146
9188
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
9147
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9189
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-class-fields.md
|
|
9148
9190
|
*/
|
|
9149
9191
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
9150
9192
|
/**
|
|
9151
9193
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
9152
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9194
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-classlist-toggle.md
|
|
9153
9195
|
*/
|
|
9154
9196
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
9155
9197
|
/**
|
|
9156
9198
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
9157
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9199
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-code-point.md
|
|
9158
9200
|
*/
|
|
9159
9201
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
9160
9202
|
/**
|
|
9161
9203
|
* Prefer early continues over whole-loop conditional wrapping.
|
|
9162
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9204
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-continue.md
|
|
9163
9205
|
*/
|
|
9164
9206
|
'unicorn/prefer-continue'?: Linter.RuleEntry<UnicornPreferContinue>;
|
|
9165
9207
|
/**
|
|
9166
9208
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
9167
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9209
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-date-now.md
|
|
9168
9210
|
*/
|
|
9169
9211
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
9170
9212
|
/**
|
|
9171
9213
|
* Prefer default parameters over reassignment.
|
|
9172
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9214
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-default-parameters.md
|
|
9173
9215
|
*/
|
|
9174
9216
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
9175
9217
|
/**
|
|
9176
9218
|
* Prefer direct iteration over default iterator method calls.
|
|
9177
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9219
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-direct-iteration.md
|
|
9178
9220
|
*/
|
|
9179
9221
|
'unicorn/prefer-direct-iteration'?: Linter.RuleEntry<[]>;
|
|
9180
9222
|
/**
|
|
9181
9223
|
* Prefer using `using`/`await using` over manual `try`/`finally` resource disposal.
|
|
9182
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9224
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-dispose.md
|
|
9183
9225
|
*/
|
|
9184
9226
|
'unicorn/prefer-dispose'?: Linter.RuleEntry<[]>;
|
|
9185
9227
|
/**
|
|
9186
9228
|
* Prefer `Element#append()` over `Node#appendChild()`.
|
|
9187
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9229
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-dom-node-append.md
|
|
9188
9230
|
*/
|
|
9189
9231
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
9190
9232
|
/**
|
|
9191
9233
|
* Renamed to `unicorn/dom-node-dataset`.
|
|
9192
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9234
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/deleted-and-deprecated-rules.md#prefer-dom-node-dataset
|
|
9193
9235
|
* @deprecated
|
|
9194
9236
|
*/
|
|
9195
9237
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
9196
9238
|
/**
|
|
9197
9239
|
* Prefer `.getHTML()` and `.setHTML()` over `.innerHTML`.
|
|
9198
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9240
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-dom-node-html-methods.md
|
|
9199
9241
|
*/
|
|
9200
9242
|
'unicorn/prefer-dom-node-html-methods'?: Linter.RuleEntry<[]>;
|
|
9201
9243
|
/**
|
|
9202
9244
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
9203
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9245
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-dom-node-remove.md
|
|
9204
9246
|
*/
|
|
9205
9247
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
9206
9248
|
/**
|
|
9207
9249
|
* Prefer `.replaceChildren()` when emptying DOM children.
|
|
9208
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9250
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-dom-node-replace-children.md
|
|
9209
9251
|
*/
|
|
9210
9252
|
'unicorn/prefer-dom-node-replace-children'?: Linter.RuleEntry<[]>;
|
|
9211
9253
|
/**
|
|
9212
9254
|
* Prefer `.textContent` over `.innerText`.
|
|
9213
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9255
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-dom-node-text-content.md
|
|
9214
9256
|
*/
|
|
9215
9257
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
9216
9258
|
/**
|
|
9217
9259
|
* Prefer early returns over full-function conditional wrapping.
|
|
9218
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9260
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-early-return.md
|
|
9219
9261
|
*/
|
|
9220
9262
|
'unicorn/prefer-early-return'?: Linter.RuleEntry<UnicornPreferEarlyReturn>;
|
|
9221
9263
|
/**
|
|
9222
9264
|
* Prefer `else if` over adjacent `if` statements with related conditions.
|
|
9223
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9265
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-else-if.md
|
|
9224
9266
|
*/
|
|
9225
9267
|
'unicorn/prefer-else-if'?: Linter.RuleEntry<[]>;
|
|
9226
9268
|
/**
|
|
9227
9269
|
* Prefer `Error.isError()` when checking for errors.
|
|
9228
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9270
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-error-is-error.md
|
|
9229
9271
|
*/
|
|
9230
9272
|
'unicorn/prefer-error-is-error'?: Linter.RuleEntry<[]>;
|
|
9231
9273
|
/**
|
|
9232
9274
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
9233
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9275
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-event-target.md
|
|
9234
9276
|
*/
|
|
9235
9277
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
9236
9278
|
/**
|
|
9237
9279
|
* Prefer `export…from` when re-exporting.
|
|
9238
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9280
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-export-from.md
|
|
9239
9281
|
*/
|
|
9240
9282
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
9241
9283
|
/**
|
|
9242
9284
|
* Prefer flat `Math.min()` and `Math.max()` calls over nested calls.
|
|
9243
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9285
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-flat-math-min-max.md
|
|
9244
9286
|
*/
|
|
9245
9287
|
'unicorn/prefer-flat-math-min-max'?: Linter.RuleEntry<[]>;
|
|
9246
9288
|
/**
|
|
9247
9289
|
* Prefer `.getOrInsertComputed()` when the default value has side effects.
|
|
9248
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9290
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-get-or-insert-computed.md
|
|
9249
9291
|
*/
|
|
9250
9292
|
'unicorn/prefer-get-or-insert-computed'?: Linter.RuleEntry<[]>;
|
|
9251
9293
|
/**
|
|
9252
9294
|
* Prefer global numeric constants over `Number` static properties.
|
|
9253
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9295
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-global-number-constants.md
|
|
9254
9296
|
*/
|
|
9255
9297
|
'unicorn/prefer-global-number-constants'?: Linter.RuleEntry<[]>;
|
|
9256
9298
|
/**
|
|
9257
9299
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
9258
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9300
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-global-this.md
|
|
9259
9301
|
*/
|
|
9260
9302
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
9303
|
+
/**
|
|
9304
|
+
* Prefer `Object.groupBy()` or `Map.groupBy()` over reduce-based grouping.
|
|
9305
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-group-by.md
|
|
9306
|
+
*/
|
|
9307
|
+
'unicorn/prefer-group-by'?: Linter.RuleEntry<[]>;
|
|
9261
9308
|
/**
|
|
9262
9309
|
* Prefer `.has()` when checking existence.
|
|
9263
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9310
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-has-check.md
|
|
9264
9311
|
*/
|
|
9265
9312
|
'unicorn/prefer-has-check'?: Linter.RuleEntry<[]>;
|
|
9266
9313
|
/**
|
|
9267
9314
|
* Prefer moving code shared by all branches of an `if` statement out of the branches.
|
|
9268
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9315
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-hoisting-branch-code.md
|
|
9269
9316
|
*/
|
|
9270
9317
|
'unicorn/prefer-hoisting-branch-code'?: Linter.RuleEntry<[]>;
|
|
9271
9318
|
/**
|
|
9272
9319
|
* Prefer HTTPS over HTTP.
|
|
9273
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9320
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-https.md
|
|
9274
9321
|
*/
|
|
9275
9322
|
'unicorn/prefer-https'?: Linter.RuleEntry<[]>;
|
|
9276
9323
|
/**
|
|
9277
9324
|
* Prefer identifiers over string literals in import and export specifiers.
|
|
9278
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9325
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-identifier-import-export-specifiers.md
|
|
9279
9326
|
*/
|
|
9280
9327
|
'unicorn/prefer-identifier-import-export-specifiers'?: Linter.RuleEntry<[]>;
|
|
9281
9328
|
/**
|
|
9282
9329
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
9283
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9330
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-import-meta-properties.md
|
|
9284
9331
|
*/
|
|
9285
9332
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
9286
9333
|
/**
|
|
9287
9334
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
9288
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9335
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-includes.md
|
|
9289
9336
|
*/
|
|
9290
9337
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
9291
9338
|
/**
|
|
9292
9339
|
* Prefer `.includes()` over repeated equality comparisons.
|
|
9293
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9340
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-includes-over-repeated-comparisons.md
|
|
9294
9341
|
*/
|
|
9295
9342
|
'unicorn/prefer-includes-over-repeated-comparisons'?: Linter.RuleEntry<UnicornPreferIncludesOverRepeatedComparisons>;
|
|
9296
9343
|
/**
|
|
9297
9344
|
* Prefer passing iterables directly to constructors instead of filling empty collections.
|
|
9298
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9345
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-iterable-in-constructor.md
|
|
9299
9346
|
*/
|
|
9300
9347
|
'unicorn/prefer-iterable-in-constructor'?: Linter.RuleEntry<[]>;
|
|
9301
9348
|
/**
|
|
9302
9349
|
* Prefer `Iterator.concat(…)` over temporary spread arrays.
|
|
9303
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9350
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-iterator-concat.md
|
|
9304
9351
|
*/
|
|
9305
9352
|
'unicorn/prefer-iterator-concat'?: Linter.RuleEntry<[]>;
|
|
9353
|
+
/**
|
|
9354
|
+
* Prefer iterator helpers over temporary arrays from iterators.
|
|
9355
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-iterator-helpers.md
|
|
9356
|
+
*/
|
|
9357
|
+
'unicorn/prefer-iterator-helpers'?: Linter.RuleEntry<[]>;
|
|
9306
9358
|
/**
|
|
9307
9359
|
* Prefer `Iterator#toArray()` over temporary arrays from iterator spreads.
|
|
9308
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9360
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-iterator-to-array.md
|
|
9309
9361
|
*/
|
|
9310
9362
|
'unicorn/prefer-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
9311
9363
|
/**
|
|
9312
9364
|
* Prefer moving `.toArray()` to the end of iterator helper chains.
|
|
9313
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9365
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-iterator-to-array-at-end.md
|
|
9314
9366
|
*/
|
|
9315
9367
|
'unicorn/prefer-iterator-to-array-at-end'?: Linter.RuleEntry<[]>;
|
|
9316
9368
|
/**
|
|
9317
9369
|
* Renamed to `unicorn/consistent-json-file-read`.
|
|
9318
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9370
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/deleted-and-deprecated-rules.md#prefer-json-parse-buffer
|
|
9319
9371
|
* @deprecated
|
|
9320
9372
|
*/
|
|
9321
9373
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
9322
9374
|
/**
|
|
9323
9375
|
* Prefer `KeyboardEvent#key` over deprecated keyboard event properties.
|
|
9324
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9376
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-keyboard-event-key.md
|
|
9325
9377
|
*/
|
|
9326
9378
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
9327
9379
|
/**
|
|
9328
9380
|
* Prefer `location.assign()` over assigning to `location.href`.
|
|
9329
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9381
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-location-assign.md
|
|
9330
9382
|
*/
|
|
9331
9383
|
'unicorn/prefer-location-assign'?: Linter.RuleEntry<[]>;
|
|
9332
9384
|
/**
|
|
9333
9385
|
* Prefer using a logical operator over a ternary.
|
|
9334
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9386
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
9335
9387
|
*/
|
|
9336
9388
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
9337
9389
|
/**
|
|
9338
9390
|
* Prefer `new Map()` over `Object.fromEntries()` when using the result as a map.
|
|
9339
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9391
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-map-from-entries.md
|
|
9340
9392
|
*/
|
|
9341
9393
|
'unicorn/prefer-map-from-entries'?: Linter.RuleEntry<[]>;
|
|
9342
9394
|
/**
|
|
9343
9395
|
* Prefer `Math.abs()` over manual absolute value expressions and symmetric range checks.
|
|
9344
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9396
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-math-abs.md
|
|
9345
9397
|
*/
|
|
9346
9398
|
'unicorn/prefer-math-abs'?: Linter.RuleEntry<[]>;
|
|
9347
9399
|
/**
|
|
9348
9400
|
* Prefer `Math` constants over their approximate numeric values.
|
|
9349
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9401
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-math-constants.md
|
|
9350
9402
|
*/
|
|
9351
9403
|
'unicorn/prefer-math-constants'?: Linter.RuleEntry<[]>;
|
|
9352
9404
|
/**
|
|
9353
9405
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
9354
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9406
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-math-min-max.md
|
|
9355
9407
|
*/
|
|
9356
9408
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
9357
9409
|
/**
|
|
9358
9410
|
* Prefer `Math.trunc()` for truncating numbers.
|
|
9359
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9411
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-math-trunc.md
|
|
9360
9412
|
*/
|
|
9361
9413
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
9362
9414
|
/**
|
|
9363
9415
|
* Prefer moving ternaries into the minimal varying part of an expression.
|
|
9364
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9416
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-minimal-ternary.md
|
|
9365
9417
|
*/
|
|
9366
9418
|
'unicorn/prefer-minimal-ternary'?: Linter.RuleEntry<UnicornPreferMinimalTernary>;
|
|
9367
9419
|
/**
|
|
9368
9420
|
* Prefer modern DOM APIs.
|
|
9369
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9421
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-modern-dom-apis.md
|
|
9370
9422
|
*/
|
|
9371
9423
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
9372
9424
|
/**
|
|
9373
9425
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
9374
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9426
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-modern-math-apis.md
|
|
9375
9427
|
*/
|
|
9376
9428
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
9377
9429
|
/**
|
|
9378
9430
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
9379
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9431
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-module.md
|
|
9380
9432
|
*/
|
|
9381
9433
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
9382
9434
|
/**
|
|
9383
9435
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
9384
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9436
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-native-coercion-functions.md
|
|
9385
9437
|
*/
|
|
9386
9438
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
9387
9439
|
/**
|
|
9388
9440
|
* Prefer negative index over `.length - index` when possible.
|
|
9389
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9441
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-negative-index.md
|
|
9390
9442
|
*/
|
|
9391
9443
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
9392
9444
|
/**
|
|
9393
9445
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
9394
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9446
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-node-protocol.md
|
|
9395
9447
|
*/
|
|
9396
9448
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
9397
9449
|
/**
|
|
9398
9450
|
* Prefer `Number()` over `parseFloat()` and base-10 `parseInt()`.
|
|
9399
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9451
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-number-coercion.md
|
|
9400
9452
|
*/
|
|
9401
9453
|
'unicorn/prefer-number-coercion'?: Linter.RuleEntry<[]>;
|
|
9402
9454
|
/**
|
|
9403
9455
|
* Prefer `Number.isSafeInteger()` over integer checks.
|
|
9404
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9456
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-number-is-safe-integer.md
|
|
9405
9457
|
*/
|
|
9406
9458
|
'unicorn/prefer-number-is-safe-integer'?: Linter.RuleEntry<[]>;
|
|
9407
9459
|
/**
|
|
9408
9460
|
* Prefer `Number` static methods over global functions and optionally static properties over global constants.
|
|
9409
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9461
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-number-properties.md
|
|
9410
9462
|
*/
|
|
9411
9463
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
9412
9464
|
/**
|
|
9413
9465
|
* Prefer `Object.defineProperties()` over multiple `Object.defineProperty()` calls.
|
|
9414
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9466
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-object-define-properties.md
|
|
9415
9467
|
*/
|
|
9416
9468
|
'unicorn/prefer-object-define-properties'?: Linter.RuleEntry<[]>;
|
|
9417
9469
|
/**
|
|
9418
9470
|
* Prefer object destructuring defaults over default object literals with spread.
|
|
9419
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9471
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-object-destructuring-defaults.md
|
|
9420
9472
|
*/
|
|
9421
9473
|
'unicorn/prefer-object-destructuring-defaults'?: Linter.RuleEntry<[]>;
|
|
9422
9474
|
/**
|
|
9423
9475
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
9424
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9476
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-object-from-entries.md
|
|
9425
9477
|
*/
|
|
9426
9478
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
9427
9479
|
/**
|
|
9428
9480
|
* Prefer the most specific `Object` iterable method.
|
|
9429
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9481
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-object-iterable-methods.md
|
|
9430
9482
|
*/
|
|
9431
9483
|
'unicorn/prefer-object-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
9432
9484
|
/**
|
|
9433
9485
|
* Prefer observer APIs over resize and scroll listeners with layout reads.
|
|
9434
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9486
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-observer-apis.md
|
|
9435
9487
|
*/
|
|
9436
9488
|
'unicorn/prefer-observer-apis'?: Linter.RuleEntry<[]>;
|
|
9437
9489
|
/**
|
|
9438
9490
|
* Prefer omitting the `catch` binding parameter.
|
|
9439
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9491
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-optional-catch-binding.md
|
|
9440
9492
|
*/
|
|
9441
9493
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
9442
9494
|
/**
|
|
9443
9495
|
* Prefer `Path2D` for repeatedly drawn canvas paths.
|
|
9444
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9496
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-path2d.md
|
|
9445
9497
|
*/
|
|
9446
9498
|
'unicorn/prefer-path2d'?: Linter.RuleEntry<[]>;
|
|
9447
9499
|
/**
|
|
9448
9500
|
* Prefer private class fields over the underscore-prefix convention.
|
|
9449
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9501
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-private-class-fields.md
|
|
9450
9502
|
*/
|
|
9451
9503
|
'unicorn/prefer-private-class-fields'?: Linter.RuleEntry<[]>;
|
|
9452
9504
|
/**
|
|
9453
9505
|
* Prefer `Promise.try()` over promise-wrapping boilerplate.
|
|
9454
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9506
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-promise-try.md
|
|
9455
9507
|
*/
|
|
9456
9508
|
'unicorn/prefer-promise-try'?: Linter.RuleEntry<[]>;
|
|
9457
9509
|
/**
|
|
9458
9510
|
* Prefer `Promise.withResolvers()` when extracting resolver functions from `new Promise()`.
|
|
9459
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9511
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-promise-with-resolvers.md
|
|
9460
9512
|
*/
|
|
9461
9513
|
'unicorn/prefer-promise-with-resolvers'?: Linter.RuleEntry<[]>;
|
|
9462
9514
|
/**
|
|
9463
9515
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
9464
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9516
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-prototype-methods.md
|
|
9465
9517
|
*/
|
|
9466
9518
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
9467
9519
|
/**
|
|
9468
9520
|
* Prefer `.querySelector()` and `.querySelectorAll()` over older DOM query methods.
|
|
9469
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9521
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-query-selector.md
|
|
9470
9522
|
*/
|
|
9471
9523
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<UnicornPreferQuerySelector>;
|
|
9472
9524
|
/**
|
|
9473
9525
|
* Prefer `queueMicrotask()` over `process.nextTick()`, `setImmediate()`, and `setTimeout(…, 0)`.
|
|
9474
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9526
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-queue-microtask.md
|
|
9475
9527
|
*/
|
|
9476
9528
|
'unicorn/prefer-queue-microtask'?: Linter.RuleEntry<UnicornPreferQueueMicrotask>;
|
|
9477
9529
|
/**
|
|
9478
9530
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
9479
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9531
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-reflect-apply.md
|
|
9480
9532
|
*/
|
|
9481
9533
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
9482
9534
|
/**
|
|
9483
9535
|
* Prefer `RegExp.escape()` for escaping strings to use in regular expressions.
|
|
9484
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9536
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-regexp-escape.md
|
|
9485
9537
|
*/
|
|
9486
9538
|
'unicorn/prefer-regexp-escape'?: Linter.RuleEntry<[]>;
|
|
9487
9539
|
/**
|
|
9488
9540
|
* Prefer `RegExp#test()` over `String#match()`, `String#search()`, and `RegExp#exec()`.
|
|
9489
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9541
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-regexp-test.md
|
|
9490
9542
|
*/
|
|
9491
9543
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
9492
9544
|
/**
|
|
9493
9545
|
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
9494
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9546
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-response-static-json.md
|
|
9495
9547
|
*/
|
|
9496
9548
|
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
|
|
9497
9549
|
/**
|
|
9498
9550
|
* Prefer `:scope` when using element query selector methods.
|
|
9499
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9551
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-scoped-selector.md
|
|
9500
9552
|
*/
|
|
9501
9553
|
'unicorn/prefer-scoped-selector'?: Linter.RuleEntry<[]>;
|
|
9502
9554
|
/**
|
|
9503
9555
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
9504
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9556
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-set-has.md
|
|
9505
9557
|
*/
|
|
9506
9558
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<UnicornPreferSetHas>;
|
|
9507
9559
|
/**
|
|
9508
9560
|
* Prefer `Set` methods for Set operations.
|
|
9509
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9561
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-set-methods.md
|
|
9510
9562
|
*/
|
|
9511
9563
|
'unicorn/prefer-set-methods'?: Linter.RuleEntry<[]>;
|
|
9512
9564
|
/**
|
|
9513
9565
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
9514
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9566
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-set-size.md
|
|
9515
9567
|
*/
|
|
9516
9568
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
9517
9569
|
/**
|
|
9518
9570
|
* Prefer arrow function properties over methods with a single return.
|
|
9519
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9571
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-short-arrow-method.md
|
|
9520
9572
|
*/
|
|
9521
9573
|
'unicorn/prefer-short-arrow-method'?: Linter.RuleEntry<[]>;
|
|
9522
9574
|
/**
|
|
9523
9575
|
* Prefer simple conditions first in logical expressions.
|
|
9524
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9576
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-simple-condition-first.md
|
|
9525
9577
|
*/
|
|
9526
9578
|
'unicorn/prefer-simple-condition-first'?: Linter.RuleEntry<[]>;
|
|
9527
9579
|
/**
|
|
9528
9580
|
* Prefer a simple comparison function for `Array#sort()`.
|
|
9529
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9581
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-simple-sort-comparator.md
|
|
9530
9582
|
*/
|
|
9531
9583
|
'unicorn/prefer-simple-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
9584
|
+
/**
|
|
9585
|
+
* Prefer simplified conditions.
|
|
9586
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-simplified-conditions.md
|
|
9587
|
+
*/
|
|
9588
|
+
'unicorn/prefer-simplified-conditions'?: Linter.RuleEntry<[]>;
|
|
9532
9589
|
/**
|
|
9533
9590
|
* Prefer a single `Array#some()` or `Array#every()` with a combined predicate.
|
|
9534
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9591
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-single-array-predicate.md
|
|
9535
9592
|
*/
|
|
9536
9593
|
'unicorn/prefer-single-array-predicate'?: Linter.RuleEntry<[]>;
|
|
9537
9594
|
/**
|
|
9538
9595
|
* Enforce combining multiple `Array#{push,unshift}()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
9539
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9596
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-single-call.md
|
|
9540
9597
|
*/
|
|
9541
9598
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
9542
9599
|
/**
|
|
9543
9600
|
* Prefer a single object destructuring declaration per local const source.
|
|
9544
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9601
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-single-object-destructuring.md
|
|
9545
9602
|
*/
|
|
9546
9603
|
'unicorn/prefer-single-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
9547
9604
|
/**
|
|
9548
9605
|
* Enforce combining multiple single-character replacements into a single `String#replaceAll()` with a regular expression.
|
|
9549
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9606
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-single-replace.md
|
|
9550
9607
|
*/
|
|
9551
9608
|
'unicorn/prefer-single-replace'?: Linter.RuleEntry<[]>;
|
|
9552
9609
|
/**
|
|
9553
9610
|
* Prefer declaring variables in the smallest possible scope.
|
|
9554
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9611
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-smaller-scope.md
|
|
9555
9612
|
*/
|
|
9556
9613
|
'unicorn/prefer-smaller-scope'?: Linter.RuleEntry<[]>;
|
|
9557
9614
|
/**
|
|
9558
9615
|
* Prefer `String#split()` with a limit.
|
|
9559
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9616
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-split-limit.md
|
|
9560
9617
|
*/
|
|
9561
9618
|
'unicorn/prefer-split-limit'?: Linter.RuleEntry<[]>;
|
|
9562
9619
|
/**
|
|
9563
9620
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()`, and trivial `for…of` copies.
|
|
9564
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9621
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-spread.md
|
|
9565
9622
|
*/
|
|
9566
9623
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
9567
9624
|
/**
|
|
9568
9625
|
* Prefer `String#matchAll()` over `RegExp#exec()` loops.
|
|
9569
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9626
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-string-match-all.md
|
|
9570
9627
|
*/
|
|
9571
9628
|
'unicorn/prefer-string-match-all'?: Linter.RuleEntry<[]>;
|
|
9572
9629
|
/**
|
|
9573
9630
|
* Prefer `String#padStart()` and `String#padEnd()` over manual string padding.
|
|
9574
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9631
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-string-pad-start-end.md
|
|
9575
9632
|
*/
|
|
9576
9633
|
'unicorn/prefer-string-pad-start-end'?: Linter.RuleEntry<[]>;
|
|
9577
9634
|
/**
|
|
9578
9635
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
9579
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9636
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-string-raw.md
|
|
9580
9637
|
*/
|
|
9581
9638
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
9582
9639
|
/**
|
|
9583
9640
|
* Prefer `String#repeat()` for repeated whitespace.
|
|
9584
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9641
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-string-repeat.md
|
|
9585
9642
|
*/
|
|
9586
9643
|
'unicorn/prefer-string-repeat'?: Linter.RuleEntry<UnicornPreferStringRepeat>;
|
|
9587
9644
|
/**
|
|
9588
9645
|
* Prefer `String#replaceAll()` over regex searches with the global flag and `String#split().join()`.
|
|
9589
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9646
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-string-replace-all.md
|
|
9590
9647
|
*/
|
|
9591
9648
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
9592
9649
|
/**
|
|
9593
9650
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
9594
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9651
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-string-slice.md
|
|
9595
9652
|
*/
|
|
9596
9653
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
9597
9654
|
/**
|
|
9598
9655
|
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()` and `String#indexOf() === 0`.
|
|
9599
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9656
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-string-starts-ends-with.md
|
|
9600
9657
|
*/
|
|
9601
9658
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
9602
9659
|
/**
|
|
9603
9660
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
9604
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9661
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-string-trim-start-end.md
|
|
9605
9662
|
*/
|
|
9606
9663
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
9607
9664
|
/**
|
|
9608
9665
|
* Prefer using `structuredClone` to create a deep clone.
|
|
9609
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9666
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-structured-clone.md
|
|
9610
9667
|
*/
|
|
9611
9668
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
9612
9669
|
/**
|
|
9613
9670
|
* Prefer `switch` over multiple `else-if`.
|
|
9614
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9671
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-switch.md
|
|
9615
9672
|
*/
|
|
9616
9673
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
9617
9674
|
/**
|
|
9618
9675
|
* Prefer `Temporal` over `Date`.
|
|
9619
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9676
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-temporal.md
|
|
9620
9677
|
*/
|
|
9621
9678
|
'unicorn/prefer-temporal'?: Linter.RuleEntry<UnicornPreferTemporal>;
|
|
9622
9679
|
/**
|
|
9623
9680
|
* Prefer ternary expressions over simple `if` statements that return or assign values.
|
|
9624
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9681
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-ternary.md
|
|
9625
9682
|
*/
|
|
9626
9683
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
9627
9684
|
/**
|
|
9628
9685
|
* Prefer using `Element#toggleAttribute()` to toggle attributes.
|
|
9629
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9686
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-toggle-attribute.md
|
|
9630
9687
|
*/
|
|
9631
9688
|
'unicorn/prefer-toggle-attribute'?: Linter.RuleEntry<[]>;
|
|
9632
9689
|
/**
|
|
9633
9690
|
* Prefer top-level await over top-level promises and async function calls.
|
|
9634
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9691
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-top-level-await.md
|
|
9635
9692
|
*/
|
|
9636
9693
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
9637
9694
|
/**
|
|
9638
9695
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
9639
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9696
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-type-error.md
|
|
9640
9697
|
*/
|
|
9641
9698
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
9642
9699
|
/**
|
|
9643
9700
|
* Require type literals to be last in union types.
|
|
9644
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9701
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-type-literal-last.md
|
|
9645
9702
|
*/
|
|
9646
9703
|
'unicorn/prefer-type-literal-last'?: Linter.RuleEntry<[]>;
|
|
9647
9704
|
/**
|
|
9648
9705
|
* Prefer `Uint8Array#toBase64()` and `Uint8Array.fromBase64()` over `atob()`, `btoa()`, and `Buffer` base64 conversions.
|
|
9649
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9706
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-uint8array-base64.md
|
|
9650
9707
|
*/
|
|
9651
9708
|
'unicorn/prefer-uint8array-base64'?: Linter.RuleEntry<[]>;
|
|
9652
9709
|
/**
|
|
9653
9710
|
* Prefer the unary minus operator over multiplying or dividing by `-1`.
|
|
9654
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9711
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-unary-minus.md
|
|
9655
9712
|
*/
|
|
9656
9713
|
'unicorn/prefer-unary-minus'?: Linter.RuleEntry<[]>;
|
|
9657
9714
|
/**
|
|
9658
9715
|
* Prefer Unicode code point escapes over legacy escape sequences.
|
|
9659
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9716
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-unicode-code-point-escapes.md
|
|
9660
9717
|
*/
|
|
9661
9718
|
'unicorn/prefer-unicode-code-point-escapes'?: Linter.RuleEntry<[]>;
|
|
9662
9719
|
/**
|
|
9663
9720
|
* Prefer `URL.canParse()` over constructing a `URL` in a try/catch for validation.
|
|
9664
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9721
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-url-can-parse.md
|
|
9665
9722
|
*/
|
|
9666
9723
|
'unicorn/prefer-url-can-parse'?: Linter.RuleEntry<[]>;
|
|
9667
9724
|
/**
|
|
9668
9725
|
* Prefer `URL#href` over stringifying a `URL`.
|
|
9669
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9726
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-url-href.md
|
|
9670
9727
|
*/
|
|
9671
9728
|
'unicorn/prefer-url-href'?: Linter.RuleEntry<[]>;
|
|
9672
9729
|
/**
|
|
9673
9730
|
* Prefer `URLSearchParams` over manually splitting query strings.
|
|
9674
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9731
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-url-search-parameters.md
|
|
9675
9732
|
*/
|
|
9676
9733
|
'unicorn/prefer-url-search-parameters'?: Linter.RuleEntry<[]>;
|
|
9677
9734
|
/**
|
|
9678
9735
|
* Prefer putting the condition in the while statement.
|
|
9679
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9736
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/prefer-while-loop-condition.md
|
|
9680
9737
|
*/
|
|
9681
9738
|
'unicorn/prefer-while-loop-condition'?: Linter.RuleEntry<[]>;
|
|
9682
9739
|
/**
|
|
9683
9740
|
* Renamed to `unicorn/name-replacements`.
|
|
9684
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9741
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/deleted-and-deprecated-rules.md#prevent-abbreviations
|
|
9685
9742
|
* @deprecated
|
|
9686
9743
|
*/
|
|
9687
9744
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<[]>;
|
|
9688
9745
|
/**
|
|
9689
9746
|
* Enforce consistent relative URL style.
|
|
9690
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9747
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/relative-url-style.md
|
|
9691
9748
|
*/
|
|
9692
9749
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
9693
9750
|
/**
|
|
9694
9751
|
* Enforce using the separator argument with `Array#join()`.
|
|
9695
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9752
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/require-array-join-separator.md
|
|
9696
9753
|
*/
|
|
9697
9754
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
9698
9755
|
/**
|
|
9699
9756
|
* Require a compare function when calling `Array#sort()` or `Array#toSorted()`.
|
|
9700
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9757
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/require-array-sort-compare.md
|
|
9701
9758
|
*/
|
|
9702
9759
|
'unicorn/require-array-sort-compare'?: Linter.RuleEntry<[]>;
|
|
9703
9760
|
/**
|
|
9704
9761
|
* Require `CSS.escape()` for interpolated values in CSS selectors.
|
|
9705
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9762
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/require-css-escape.md
|
|
9706
9763
|
*/
|
|
9707
9764
|
'unicorn/require-css-escape'?: Linter.RuleEntry<UnicornRequireCssEscape>;
|
|
9708
9765
|
/**
|
|
9709
9766
|
* Require non-empty module attributes for imports and exports
|
|
9710
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9767
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/require-module-attributes.md
|
|
9711
9768
|
*/
|
|
9712
9769
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
9713
9770
|
/**
|
|
9714
9771
|
* Require non-empty specifier list in import and export statements.
|
|
9715
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9772
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/require-module-specifiers.md
|
|
9716
9773
|
*/
|
|
9717
9774
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
9718
9775
|
/**
|
|
9719
9776
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
9720
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9777
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
9721
9778
|
*/
|
|
9722
9779
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
9723
9780
|
/**
|
|
9724
9781
|
* Require passive event listeners for high-frequency events.
|
|
9725
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9782
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/require-passive-events.md
|
|
9726
9783
|
*/
|
|
9727
9784
|
'unicorn/require-passive-events'?: Linter.RuleEntry<[]>;
|
|
9728
9785
|
/**
|
|
9729
9786
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
9730
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9787
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/require-post-message-target-origin.md
|
|
9731
9788
|
*/
|
|
9732
9789
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
9733
9790
|
/**
|
|
9734
9791
|
* Require boolean-returning Proxy traps to return booleans.
|
|
9735
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9792
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/require-proxy-trap-boolean-return.md
|
|
9736
9793
|
*/
|
|
9737
9794
|
'unicorn/require-proxy-trap-boolean-return'?: Linter.RuleEntry<[]>;
|
|
9738
9795
|
/**
|
|
9739
9796
|
* Enforce better string content.
|
|
9740
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9797
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/string-content.md
|
|
9741
9798
|
*/
|
|
9742
9799
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
9743
9800
|
/**
|
|
9744
9801
|
* Enforce consistent brace style for `case` clauses.
|
|
9745
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9802
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/switch-case-braces.md
|
|
9746
9803
|
*/
|
|
9747
9804
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
9748
9805
|
/**
|
|
9749
9806
|
* Enforce consistent `break`/`return`/`continue`/`throw` position in `case` clauses.
|
|
9750
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9807
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/switch-case-break-position.md
|
|
9751
9808
|
*/
|
|
9752
9809
|
'unicorn/switch-case-break-position'?: Linter.RuleEntry<[]>;
|
|
9753
9810
|
/**
|
|
9754
9811
|
* Fix whitespace-insensitive template indentation.
|
|
9755
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9812
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/template-indent.md
|
|
9756
9813
|
*/
|
|
9757
9814
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
9758
9815
|
/**
|
|
9759
9816
|
* Enforce consistent case for text encoding identifiers.
|
|
9760
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9817
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/text-encoding-identifier-case.md
|
|
9761
9818
|
*/
|
|
9762
9819
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
9763
9820
|
/**
|
|
9764
9821
|
* Require `new` when creating an error.
|
|
9765
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9822
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/throw-new-error.md
|
|
9766
9823
|
*/
|
|
9767
9824
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
9768
9825
|
/**
|
|
9769
9826
|
* Limit the complexity of `try` blocks.
|
|
9770
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
9827
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v71.1.0/docs/rules/try-complexity.md
|
|
9771
9828
|
*/
|
|
9772
9829
|
'unicorn/try-complexity'?: Linter.RuleEntry<UnicornTryComplexity>;
|
|
9773
9830
|
/**
|
|
@@ -12494,11 +12551,13 @@ type JsoncSortArrayValues = [{
|
|
|
12494
12551
|
type?: ("asc" | "desc");
|
|
12495
12552
|
caseSensitive?: boolean;
|
|
12496
12553
|
natural?: boolean;
|
|
12554
|
+
key?: string;
|
|
12497
12555
|
};
|
|
12498
12556
|
})[] | {
|
|
12499
12557
|
type?: ("asc" | "desc");
|
|
12500
12558
|
caseSensitive?: boolean;
|
|
12501
12559
|
natural?: boolean;
|
|
12560
|
+
key?: string;
|
|
12502
12561
|
});
|
|
12503
12562
|
minValues?: number;
|
|
12504
12563
|
}, ...({
|
|
@@ -12509,11 +12568,13 @@ type JsoncSortArrayValues = [{
|
|
|
12509
12568
|
type?: ("asc" | "desc");
|
|
12510
12569
|
caseSensitive?: boolean;
|
|
12511
12570
|
natural?: boolean;
|
|
12571
|
+
key?: string;
|
|
12512
12572
|
};
|
|
12513
12573
|
})[] | {
|
|
12514
12574
|
type?: ("asc" | "desc");
|
|
12515
12575
|
caseSensitive?: boolean;
|
|
12516
12576
|
natural?: boolean;
|
|
12577
|
+
key?: string;
|
|
12517
12578
|
});
|
|
12518
12579
|
minValues?: number;
|
|
12519
12580
|
})[]]; // ----- jsonc/sort-keys -----
|
|
@@ -13243,6 +13304,7 @@ type MaxLinesPerFunction = [] | [({
|
|
|
13243
13304
|
type MaxNestedCallbacks = [] | [(number | {
|
|
13244
13305
|
maximum?: number;
|
|
13245
13306
|
max?: number;
|
|
13307
|
+
checkConstructorCallCallbacks?: boolean;
|
|
13246
13308
|
})]; // ----- max-params -----
|
|
13247
13309
|
type MaxParams = [] | [(number | {
|
|
13248
13310
|
maximum?: number;
|
|
@@ -13292,6 +13354,9 @@ type NoConfusingArrow = [] | [{
|
|
|
13292
13354
|
}]; // ----- no-console -----
|
|
13293
13355
|
type NoConsole = [] | [{
|
|
13294
13356
|
allow?: [string, ...(string)[]];
|
|
13357
|
+
}]; // ----- no-constant-binary-expression -----
|
|
13358
|
+
type NoConstantBinaryExpression = [] | [{
|
|
13359
|
+
checkRelationalComparisons?: boolean;
|
|
13295
13360
|
}]; // ----- no-constant-condition -----
|
|
13296
13361
|
type NoConstantCondition = [] | [{
|
|
13297
13362
|
checkLoops?: ("all" | "allExceptWhileTrue" | "none" | true | false);
|
|
@@ -14028,7 +14093,112 @@ type PerfectionistSortArrayIncludes = {
|
|
|
14028
14093
|
});
|
|
14029
14094
|
partitionByNewLine?: boolean;
|
|
14030
14095
|
}[]; // ----- perfectionist/sort-arrays -----
|
|
14031
|
-
type PerfectionistSortArrays = {
|
|
14096
|
+
type PerfectionistSortArrays = [{
|
|
14097
|
+
fallbackSort?: {
|
|
14098
|
+
type: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
14099
|
+
order?: ("asc" | "desc");
|
|
14100
|
+
};
|
|
14101
|
+
type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
14102
|
+
specialCharacters?: ("remove" | "trim" | "keep");
|
|
14103
|
+
ignoreCase?: boolean;
|
|
14104
|
+
alphabet?: string;
|
|
14105
|
+
locales?: (string | string[]);
|
|
14106
|
+
order?: ("asc" | "desc");
|
|
14107
|
+
customGroups?: ({
|
|
14108
|
+
fallbackSort?: {
|
|
14109
|
+
type: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
14110
|
+
order?: ("asc" | "desc");
|
|
14111
|
+
};
|
|
14112
|
+
type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
14113
|
+
groupName: string;
|
|
14114
|
+
newlinesInside?: ("ignore" | number);
|
|
14115
|
+
order?: ("asc" | "desc");
|
|
14116
|
+
anyOf: [{
|
|
14117
|
+
elementNamePattern?: (({
|
|
14118
|
+
pattern: string;
|
|
14119
|
+
flags?: string;
|
|
14120
|
+
} | string)[] | ({
|
|
14121
|
+
pattern: string;
|
|
14122
|
+
flags?: string;
|
|
14123
|
+
} | string));
|
|
14124
|
+
selector?: "literal";
|
|
14125
|
+
}, ...({
|
|
14126
|
+
elementNamePattern?: (({
|
|
14127
|
+
pattern: string;
|
|
14128
|
+
flags?: string;
|
|
14129
|
+
} | string)[] | ({
|
|
14130
|
+
pattern: string;
|
|
14131
|
+
flags?: string;
|
|
14132
|
+
} | string));
|
|
14133
|
+
selector?: "literal";
|
|
14134
|
+
})[]];
|
|
14135
|
+
} | {
|
|
14136
|
+
fallbackSort?: {
|
|
14137
|
+
type: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
14138
|
+
order?: ("asc" | "desc");
|
|
14139
|
+
};
|
|
14140
|
+
type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
14141
|
+
groupName: string;
|
|
14142
|
+
newlinesInside?: ("ignore" | number);
|
|
14143
|
+
order?: ("asc" | "desc");
|
|
14144
|
+
elementNamePattern?: (({
|
|
14145
|
+
pattern: string;
|
|
14146
|
+
flags?: string;
|
|
14147
|
+
} | string)[] | ({
|
|
14148
|
+
pattern: string;
|
|
14149
|
+
flags?: string;
|
|
14150
|
+
} | string));
|
|
14151
|
+
selector?: "literal";
|
|
14152
|
+
})[];
|
|
14153
|
+
newlinesInside?: (("ignore" | number) | "newlinesBetween");
|
|
14154
|
+
groups?: (string | [string, ...(string)[]] | {
|
|
14155
|
+
newlinesBetween: ("ignore" | number);
|
|
14156
|
+
} | {
|
|
14157
|
+
group: (string | [string, ...(string)[]]);
|
|
14158
|
+
fallbackSort?: {
|
|
14159
|
+
type: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
14160
|
+
order?: ("asc" | "desc");
|
|
14161
|
+
};
|
|
14162
|
+
commentAbove?: string;
|
|
14163
|
+
type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
14164
|
+
newlinesInside?: ("ignore" | number);
|
|
14165
|
+
order?: ("asc" | "desc");
|
|
14166
|
+
})[];
|
|
14167
|
+
newlinesBetween?: ("ignore" | number);
|
|
14168
|
+
useConfigurationIf: {
|
|
14169
|
+
allNamesMatchPattern?: (({
|
|
14170
|
+
pattern: string;
|
|
14171
|
+
flags?: string;
|
|
14172
|
+
} | string)[] | ({
|
|
14173
|
+
pattern: string;
|
|
14174
|
+
flags?: string;
|
|
14175
|
+
} | string));
|
|
14176
|
+
matchesAstSelector?: string;
|
|
14177
|
+
};
|
|
14178
|
+
partitionByComment?: (boolean | (({
|
|
14179
|
+
pattern: string;
|
|
14180
|
+
flags?: string;
|
|
14181
|
+
} | string)[] | ({
|
|
14182
|
+
pattern: string;
|
|
14183
|
+
flags?: string;
|
|
14184
|
+
} | string)) | {
|
|
14185
|
+
block?: (boolean | (({
|
|
14186
|
+
pattern: string;
|
|
14187
|
+
flags?: string;
|
|
14188
|
+
} | string)[] | ({
|
|
14189
|
+
pattern: string;
|
|
14190
|
+
flags?: string;
|
|
14191
|
+
} | string)));
|
|
14192
|
+
line?: (boolean | (({
|
|
14193
|
+
pattern: string;
|
|
14194
|
+
flags?: string;
|
|
14195
|
+
} | string)[] | ({
|
|
14196
|
+
pattern: string;
|
|
14197
|
+
flags?: string;
|
|
14198
|
+
} | string)));
|
|
14199
|
+
});
|
|
14200
|
+
partitionByNewLine?: boolean;
|
|
14201
|
+
}, ...({
|
|
14032
14202
|
fallbackSort?: {
|
|
14033
14203
|
type: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
14034
14204
|
order?: ("asc" | "desc");
|
|
@@ -14133,7 +14303,7 @@ type PerfectionistSortArrays = {
|
|
|
14133
14303
|
} | string)));
|
|
14134
14304
|
});
|
|
14135
14305
|
partitionByNewLine?: boolean;
|
|
14136
|
-
}[]; // ----- perfectionist/sort-classes -----
|
|
14306
|
+
})[]]; // ----- perfectionist/sort-classes -----
|
|
14137
14307
|
type PerfectionistSortClasses = {
|
|
14138
14308
|
fallbackSort?: {
|
|
14139
14309
|
type: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
@@ -14482,6 +14652,7 @@ type PerfectionistSortEnums = {
|
|
|
14482
14652
|
order?: ("asc" | "desc");
|
|
14483
14653
|
})[];
|
|
14484
14654
|
newlinesBetween?: ("ignore" | number);
|
|
14655
|
+
sortByValue?: ("always" | "ifNumericEnum" | "never");
|
|
14485
14656
|
useConfigurationIf?: {
|
|
14486
14657
|
allNamesMatchPattern?: (({
|
|
14487
14658
|
pattern: string;
|
|
@@ -14492,7 +14663,6 @@ type PerfectionistSortEnums = {
|
|
|
14492
14663
|
} | string));
|
|
14493
14664
|
matchesAstSelector?: string;
|
|
14494
14665
|
};
|
|
14495
|
-
sortByValue?: ("always" | "ifNumericEnum" | "never");
|
|
14496
14666
|
useExperimentalDependencyDetection?: boolean;
|
|
14497
14667
|
partitionByComment?: (boolean | (({
|
|
14498
14668
|
pattern: string;
|
|
@@ -15310,6 +15480,7 @@ type PerfectionistSortIntersectionTypes = {
|
|
|
15310
15480
|
} | string)));
|
|
15311
15481
|
});
|
|
15312
15482
|
partitionByNewLine?: boolean;
|
|
15483
|
+
ignoreCallableTypes?: boolean;
|
|
15313
15484
|
}[]; // ----- perfectionist/sort-jsx-props -----
|
|
15314
15485
|
type PerfectionistSortJsxProps = {
|
|
15315
15486
|
fallbackSort?: {
|
|
@@ -16606,6 +16777,10 @@ type PreferRegexLiterals = [] | [{
|
|
|
16606
16777
|
}]; // ----- preserve-caught-error -----
|
|
16607
16778
|
type PreserveCaughtError = [] | [{
|
|
16608
16779
|
requireCatchParameter?: boolean;
|
|
16780
|
+
errorClassNames?: (string | {
|
|
16781
|
+
name: string;
|
|
16782
|
+
argumentPosition: number;
|
|
16783
|
+
})[];
|
|
16609
16784
|
}]; // ----- quote-props -----
|
|
16610
16785
|
type QuoteProps = ([] | [("always" | "as-needed" | "consistent" | "consistent-as-needed")] | [] | [("always" | "as-needed" | "consistent" | "consistent-as-needed")] | [("always" | "as-needed" | "consistent" | "consistent-as-needed"), {
|
|
16611
16786
|
keywords?: boolean;
|
|
@@ -18317,7 +18492,7 @@ type TestNoFocusedTests = [] | [{
|
|
|
18317
18492
|
fixable?: boolean;
|
|
18318
18493
|
}]; // ----- test/no-hooks -----
|
|
18319
18494
|
type TestNoHooks = [] | [{
|
|
18320
|
-
allow?: ("beforeAll" | "beforeEach" | "afterAll" | "afterEach")[];
|
|
18495
|
+
allow?: ("beforeAll" | "beforeEach" | "afterAll" | "afterEach" | "aroundAll" | "aroundEach")[];
|
|
18321
18496
|
}]; // ----- test/no-large-snapshots -----
|
|
18322
18497
|
type TestNoLargeSnapshots = [] | [{
|
|
18323
18498
|
maxSize?: number;
|
|
@@ -18345,6 +18520,7 @@ type TestPreferExpectAssertions = [] | [{
|
|
|
18345
18520
|
onlyFunctionsWithAsyncKeyword?: boolean;
|
|
18346
18521
|
onlyFunctionsWithExpectInLoop?: boolean;
|
|
18347
18522
|
onlyFunctionsWithExpectInCallback?: boolean;
|
|
18523
|
+
disallowHasAssertions?: boolean;
|
|
18348
18524
|
}]; // ----- test/prefer-import-in-mock -----
|
|
18349
18525
|
type TestPreferImportInMock = [] | [{
|
|
18350
18526
|
fixable?: boolean;
|
|
@@ -19589,6 +19765,7 @@ type UnicornNoNegatedComparison = [] | [{
|
|
|
19589
19765
|
}]; // ----- unicorn/no-non-function-verb-prefix -----
|
|
19590
19766
|
type UnicornNoNonFunctionVerbPrefix = [] | [{
|
|
19591
19767
|
verbs?: string[];
|
|
19768
|
+
ignore?: unknown[];
|
|
19592
19769
|
}]; // ----- unicorn/no-null -----
|
|
19593
19770
|
type UnicornNoNull = [] | [{
|
|
19594
19771
|
checkArguments?: boolean;
|
|
@@ -21134,11 +21311,13 @@ type YamlSortSequenceValues = [{
|
|
|
21134
21311
|
type?: ("asc" | "desc");
|
|
21135
21312
|
caseSensitive?: boolean;
|
|
21136
21313
|
natural?: boolean;
|
|
21314
|
+
key?: string;
|
|
21137
21315
|
};
|
|
21138
21316
|
})[] | {
|
|
21139
21317
|
type?: ("asc" | "desc");
|
|
21140
21318
|
caseSensitive?: boolean;
|
|
21141
21319
|
natural?: boolean;
|
|
21320
|
+
key?: string;
|
|
21142
21321
|
});
|
|
21143
21322
|
minValues?: number;
|
|
21144
21323
|
}, ...({
|
|
@@ -21149,11 +21328,13 @@ type YamlSortSequenceValues = [{
|
|
|
21149
21328
|
type?: ("asc" | "desc");
|
|
21150
21329
|
caseSensitive?: boolean;
|
|
21151
21330
|
natural?: boolean;
|
|
21331
|
+
key?: string;
|
|
21152
21332
|
};
|
|
21153
21333
|
})[] | {
|
|
21154
21334
|
type?: ("asc" | "desc");
|
|
21155
21335
|
caseSensitive?: boolean;
|
|
21156
21336
|
natural?: boolean;
|
|
21337
|
+
key?: string;
|
|
21157
21338
|
});
|
|
21158
21339
|
minValues?: number;
|
|
21159
21340
|
})[]]; // ----- yaml/spaced-comment -----
|