@nicksp/eslint-config 1.3.0 → 1.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/README.md +3 -1
- package/dist/index.d.ts +345 -289
- package/dist/index.js +1 -1
- package/package.json +18 -18
package/dist/index.d.ts
CHANGED
|
@@ -1141,6 +1141,11 @@ interface RuleOptions {
|
|
|
1141
1141
|
* @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-set-text-directive/
|
|
1142
1142
|
*/
|
|
1143
1143
|
'astro/no-set-text-directive'?: Linter.RuleEntry<[]>;
|
|
1144
|
+
/**
|
|
1145
|
+
* disallow inline `<script>` without `src` to encourage CSP-safe patterns
|
|
1146
|
+
* @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-unsafe-inline-scripts/
|
|
1147
|
+
*/
|
|
1148
|
+
'astro/no-unsafe-inline-scripts'?: Linter.RuleEntry<AstroNoUnsafeInlineScripts>;
|
|
1144
1149
|
/**
|
|
1145
1150
|
* disallow selectors defined in `style` tag that don't use in HTML
|
|
1146
1151
|
* @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-unused-css-selector/
|
|
@@ -3897,7 +3902,7 @@ interface RuleOptions {
|
|
|
3897
3902
|
*/
|
|
3898
3903
|
'react-hooks/use-memo'?: Linter.RuleEntry<ReactHooksUseMemo>;
|
|
3899
3904
|
/**
|
|
3900
|
-
* Validates that useMemos always return a value. See [`useMemo()` docs](https://react.dev/reference/react/useMemo) for more information.
|
|
3905
|
+
* Validates that useMemos always return a value and that the result of the useMemo is used by the component/hook. See [`useMemo()` docs](https://react.dev/reference/react/useMemo) for more information.
|
|
3901
3906
|
*/
|
|
3902
3907
|
'react-hooks/void-use-memo'?: Linter.RuleEntry<ReactHooksVoidUseMemo>;
|
|
3903
3908
|
/**
|
|
@@ -5177,710 +5182,725 @@ interface RuleOptions {
|
|
|
5177
5182
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
|
|
5178
5183
|
/**
|
|
5179
5184
|
* Improve regexes by making them shorter, consistent, and safer.
|
|
5180
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5185
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/better-regex.md
|
|
5181
5186
|
*/
|
|
5182
5187
|
'unicorn/better-regex'?: Linter.RuleEntry<UnicornBetterRegex>;
|
|
5183
5188
|
/**
|
|
5184
5189
|
* Enforce a specific parameter name in catch clauses.
|
|
5185
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5190
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/catch-error-name.md
|
|
5186
5191
|
*/
|
|
5187
5192
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
5188
5193
|
/**
|
|
5189
5194
|
* Enforce consistent assertion style with `node:assert`.
|
|
5190
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5195
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-assert.md
|
|
5191
5196
|
*/
|
|
5192
5197
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
5193
5198
|
/**
|
|
5194
5199
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
5195
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5200
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-date-clone.md
|
|
5196
5201
|
*/
|
|
5197
5202
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
5198
5203
|
/**
|
|
5199
5204
|
* Use destructured variables over properties.
|
|
5200
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5205
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-destructuring.md
|
|
5201
5206
|
*/
|
|
5202
5207
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
5203
5208
|
/**
|
|
5204
5209
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
5205
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5210
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-empty-array-spread.md
|
|
5206
5211
|
*/
|
|
5207
5212
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
5208
5213
|
/**
|
|
5209
5214
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
5210
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5215
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-existence-index-check.md
|
|
5211
5216
|
*/
|
|
5212
5217
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
5213
5218
|
/**
|
|
5214
5219
|
* Move function definitions to the highest possible scope.
|
|
5215
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5220
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/consistent-function-scoping.md
|
|
5216
5221
|
*/
|
|
5217
5222
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
5218
5223
|
/**
|
|
5219
5224
|
* Enforce correct `Error` subclassing.
|
|
5220
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5225
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/custom-error-definition.md
|
|
5221
5226
|
*/
|
|
5222
5227
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
5223
5228
|
/**
|
|
5224
5229
|
* Enforce no spaces between braces.
|
|
5225
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5230
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/empty-brace-spaces.md
|
|
5226
5231
|
*/
|
|
5227
5232
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
5228
5233
|
/**
|
|
5229
5234
|
* Enforce passing a `message` value when creating a built-in error.
|
|
5230
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5235
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/error-message.md
|
|
5231
5236
|
*/
|
|
5232
5237
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
5233
5238
|
/**
|
|
5234
5239
|
* Require escape sequences to use uppercase or lowercase values.
|
|
5235
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5240
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/escape-case.md
|
|
5236
5241
|
*/
|
|
5237
5242
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
5238
5243
|
/**
|
|
5239
5244
|
* Add expiration conditions to TODO comments.
|
|
5240
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5245
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/expiring-todo-comments.md
|
|
5241
5246
|
*/
|
|
5242
5247
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
5243
5248
|
/**
|
|
5244
5249
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
5245
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5250
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/explicit-length-check.md
|
|
5246
5251
|
*/
|
|
5247
5252
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
5248
5253
|
/**
|
|
5249
5254
|
* Enforce a case style for filenames.
|
|
5250
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5255
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/filename-case.md
|
|
5251
5256
|
*/
|
|
5252
5257
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
5253
5258
|
/**
|
|
5254
5259
|
* Enforce specific import styles per module.
|
|
5255
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5260
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/import-style.md
|
|
5256
5261
|
*/
|
|
5257
5262
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
5258
5263
|
/**
|
|
5259
5264
|
* Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
|
|
5260
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5265
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/new-for-builtins.md
|
|
5261
5266
|
*/
|
|
5262
5267
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
5263
5268
|
/**
|
|
5264
5269
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
5265
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5270
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
5266
5271
|
*/
|
|
5267
5272
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
5268
5273
|
/**
|
|
5269
5274
|
* Disallow recursive access to `this` within getters and setters.
|
|
5270
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5275
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-accessor-recursion.md
|
|
5271
5276
|
*/
|
|
5272
5277
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
5273
5278
|
/**
|
|
5274
5279
|
* Disallow anonymous functions and classes as the default export.
|
|
5275
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5280
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-anonymous-default-export.md
|
|
5276
5281
|
*/
|
|
5277
5282
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
5278
5283
|
/**
|
|
5279
5284
|
* Prevent passing a function reference directly to iterator methods.
|
|
5280
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5285
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-callback-reference.md
|
|
5281
5286
|
*/
|
|
5282
5287
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<[]>;
|
|
5283
5288
|
/**
|
|
5284
5289
|
* Prefer `for…of` over the `forEach` method.
|
|
5285
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5290
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-for-each.md
|
|
5286
5291
|
*/
|
|
5287
5292
|
'unicorn/no-array-for-each'?: Linter.RuleEntry<[]>;
|
|
5288
5293
|
/**
|
|
5289
5294
|
* Disallow using the `this` argument in array methods.
|
|
5290
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5295
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-method-this-argument.md
|
|
5291
5296
|
*/
|
|
5292
5297
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
5293
5298
|
/**
|
|
5294
5299
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
5295
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5300
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/deprecated-rules.md#no-array-push-push
|
|
5296
5301
|
* @deprecated
|
|
5297
5302
|
*/
|
|
5298
5303
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
5299
5304
|
/**
|
|
5300
5305
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
5301
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5306
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-reduce.md
|
|
5302
5307
|
*/
|
|
5303
5308
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
5304
5309
|
/**
|
|
5305
5310
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
5306
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5311
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-reverse.md
|
|
5307
5312
|
*/
|
|
5308
5313
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
5309
5314
|
/**
|
|
5310
5315
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
5311
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5316
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-array-sort.md
|
|
5312
5317
|
*/
|
|
5313
5318
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
5314
5319
|
/**
|
|
5315
5320
|
* Disallow member access from await expression.
|
|
5316
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5321
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-await-expression-member.md
|
|
5317
5322
|
*/
|
|
5318
5323
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
5319
5324
|
/**
|
|
5320
5325
|
* Disallow using `await` in `Promise` method parameters.
|
|
5321
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5326
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-await-in-promise-methods.md
|
|
5322
5327
|
*/
|
|
5323
5328
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
5324
5329
|
/**
|
|
5325
5330
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
5326
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5331
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-console-spaces.md
|
|
5327
5332
|
*/
|
|
5328
5333
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
5329
5334
|
/**
|
|
5330
5335
|
* Do not use `document.cookie` directly.
|
|
5331
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5336
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-document-cookie.md
|
|
5332
5337
|
*/
|
|
5333
5338
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
5334
5339
|
/**
|
|
5335
5340
|
* Disallow empty files.
|
|
5336
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5341
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-empty-file.md
|
|
5337
5342
|
*/
|
|
5338
5343
|
'unicorn/no-empty-file'?: Linter.RuleEntry<[]>;
|
|
5339
5344
|
/**
|
|
5340
5345
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
5341
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5346
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-for-loop.md
|
|
5342
5347
|
*/
|
|
5343
5348
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
5344
5349
|
/**
|
|
5345
5350
|
* Enforce the use of Unicode escapes instead of hexadecimal escapes.
|
|
5346
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5351
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-hex-escape.md
|
|
5347
5352
|
*/
|
|
5348
5353
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
5354
|
+
/**
|
|
5355
|
+
* Disallow immediate mutation after variable assignment.
|
|
5356
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-immediate-mutation.md
|
|
5357
|
+
*/
|
|
5358
|
+
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]>;
|
|
5349
5359
|
/**
|
|
5350
5360
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
5351
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5361
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/deprecated-rules.md#no-instanceof-array
|
|
5352
5362
|
* @deprecated
|
|
5353
5363
|
*/
|
|
5354
5364
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
5355
5365
|
/**
|
|
5356
5366
|
* Disallow `instanceof` with built-in objects
|
|
5357
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5367
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-instanceof-builtins.md
|
|
5358
5368
|
*/
|
|
5359
5369
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
5360
5370
|
/**
|
|
5361
5371
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
5362
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5372
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-invalid-fetch-options.md
|
|
5363
5373
|
*/
|
|
5364
5374
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
5365
5375
|
/**
|
|
5366
5376
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
5367
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5377
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
5368
5378
|
*/
|
|
5369
5379
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
5370
5380
|
/**
|
|
5371
5381
|
* Disallow identifiers starting with `new` or `class`.
|
|
5372
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5382
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-keyword-prefix.md
|
|
5373
5383
|
*/
|
|
5374
5384
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
5375
5385
|
/**
|
|
5376
5386
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
5377
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5387
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/deprecated-rules.md#no-length-as-slice-end
|
|
5378
5388
|
* @deprecated
|
|
5379
5389
|
*/
|
|
5380
5390
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
5381
5391
|
/**
|
|
5382
5392
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
5383
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5393
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-lonely-if.md
|
|
5384
5394
|
*/
|
|
5385
5395
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
5386
5396
|
/**
|
|
5387
5397
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
5388
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5398
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
5389
5399
|
*/
|
|
5390
5400
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
5391
5401
|
/**
|
|
5392
5402
|
* Disallow named usage of default import and export.
|
|
5393
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5403
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-named-default.md
|
|
5394
5404
|
*/
|
|
5395
5405
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
5396
5406
|
/**
|
|
5397
5407
|
* Disallow negated conditions.
|
|
5398
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5408
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-negated-condition.md
|
|
5399
5409
|
*/
|
|
5400
5410
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
5401
5411
|
/**
|
|
5402
5412
|
* Disallow negated expression in equality check.
|
|
5403
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5413
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-negation-in-equality-check.md
|
|
5404
5414
|
*/
|
|
5405
5415
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
5406
5416
|
/**
|
|
5407
5417
|
* Disallow nested ternary expressions.
|
|
5408
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5418
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-nested-ternary.md
|
|
5409
5419
|
*/
|
|
5410
5420
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
5411
5421
|
/**
|
|
5412
5422
|
* Disallow `new Array()`.
|
|
5413
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5423
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-new-array.md
|
|
5414
5424
|
*/
|
|
5415
5425
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
5416
5426
|
/**
|
|
5417
5427
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
5418
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5428
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-new-buffer.md
|
|
5419
5429
|
*/
|
|
5420
5430
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
5421
5431
|
/**
|
|
5422
5432
|
* Disallow the use of the `null` literal.
|
|
5423
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5433
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-null.md
|
|
5424
5434
|
*/
|
|
5425
5435
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
5426
5436
|
/**
|
|
5427
5437
|
* Disallow the use of objects as default parameters.
|
|
5428
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5438
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-object-as-default-parameter.md
|
|
5429
5439
|
*/
|
|
5430
5440
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
5431
5441
|
/**
|
|
5432
5442
|
* Disallow `process.exit()`.
|
|
5433
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5443
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-process-exit.md
|
|
5434
5444
|
*/
|
|
5435
5445
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
5436
5446
|
/**
|
|
5437
5447
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
5438
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5448
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
5439
5449
|
*/
|
|
5440
5450
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
5441
5451
|
/**
|
|
5442
5452
|
* Disallow classes that only have static members.
|
|
5443
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5453
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-static-only-class.md
|
|
5444
5454
|
*/
|
|
5445
5455
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
5446
5456
|
/**
|
|
5447
5457
|
* Disallow `then` property.
|
|
5448
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5458
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-thenable.md
|
|
5449
5459
|
*/
|
|
5450
5460
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
5451
5461
|
/**
|
|
5452
5462
|
* Disallow assigning `this` to a variable.
|
|
5453
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5463
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-this-assignment.md
|
|
5454
5464
|
*/
|
|
5455
5465
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
5456
5466
|
/**
|
|
5457
5467
|
* Disallow comparing `undefined` using `typeof`.
|
|
5458
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5468
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-typeof-undefined.md
|
|
5459
5469
|
*/
|
|
5460
5470
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
5461
5471
|
/**
|
|
5462
5472
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
5463
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5473
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
5464
5474
|
*/
|
|
5465
5475
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
5466
5476
|
/**
|
|
5467
5477
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
5468
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5478
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
5469
5479
|
*/
|
|
5470
5480
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
5471
5481
|
/**
|
|
5472
5482
|
* Disallow awaiting non-promise values.
|
|
5473
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5483
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-await.md
|
|
5474
5484
|
*/
|
|
5475
5485
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
5476
5486
|
/**
|
|
5477
5487
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
5478
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5488
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
5479
5489
|
*/
|
|
5480
5490
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
5481
5491
|
/**
|
|
5482
5492
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
5483
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5493
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
5484
5494
|
*/
|
|
5485
5495
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
5486
5496
|
/**
|
|
5487
5497
|
* Disallow unreadable array destructuring.
|
|
5488
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5498
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
5489
5499
|
*/
|
|
5490
5500
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<[]>;
|
|
5491
5501
|
/**
|
|
5492
5502
|
* Disallow unreadable IIFEs.
|
|
5493
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5503
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unreadable-iife.md
|
|
5494
5504
|
*/
|
|
5495
5505
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
5496
5506
|
/**
|
|
5497
5507
|
* Disallow unused object properties.
|
|
5498
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5508
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-unused-properties.md
|
|
5499
5509
|
*/
|
|
5500
5510
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
5511
|
+
/**
|
|
5512
|
+
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
5513
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-collection-argument.md
|
|
5514
|
+
*/
|
|
5515
|
+
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
|
|
5501
5516
|
/**
|
|
5502
5517
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
5503
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5518
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
5504
5519
|
*/
|
|
5505
5520
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
5506
5521
|
/**
|
|
5507
5522
|
* Disallow useless fallback when spreading in object literals.
|
|
5508
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5523
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
5509
5524
|
*/
|
|
5510
5525
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
5511
5526
|
/**
|
|
5512
5527
|
* Disallow useless array length check.
|
|
5513
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5528
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-length-check.md
|
|
5514
5529
|
*/
|
|
5515
5530
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
5516
5531
|
/**
|
|
5517
5532
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
5518
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5533
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
5519
5534
|
*/
|
|
5520
5535
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
5521
5536
|
/**
|
|
5522
5537
|
* Disallow unnecessary spread.
|
|
5523
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5538
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-spread.md
|
|
5524
5539
|
*/
|
|
5525
5540
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
5526
5541
|
/**
|
|
5527
5542
|
* Disallow useless case in switch statements.
|
|
5528
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5543
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-switch-case.md
|
|
5529
5544
|
*/
|
|
5530
5545
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
5531
5546
|
/**
|
|
5532
5547
|
* Disallow useless `undefined`.
|
|
5533
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5548
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-useless-undefined.md
|
|
5534
5549
|
*/
|
|
5535
5550
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
5536
5551
|
/**
|
|
5537
5552
|
* Disallow number literals with zero fractions or dangling dots.
|
|
5538
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5553
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/no-zero-fractions.md
|
|
5539
5554
|
*/
|
|
5540
5555
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
5541
5556
|
/**
|
|
5542
5557
|
* Enforce proper case for numeric literals.
|
|
5543
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5558
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/number-literal-case.md
|
|
5544
5559
|
*/
|
|
5545
5560
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
5546
5561
|
/**
|
|
5547
5562
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
5548
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5563
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/numeric-separators-style.md
|
|
5549
5564
|
*/
|
|
5550
5565
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
5551
5566
|
/**
|
|
5552
5567
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
5553
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5568
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-add-event-listener.md
|
|
5554
5569
|
*/
|
|
5555
5570
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
5556
5571
|
/**
|
|
5557
5572
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
5558
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5573
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-find.md
|
|
5559
5574
|
*/
|
|
5560
5575
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
5561
5576
|
/**
|
|
5562
5577
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
5563
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5578
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-flat.md
|
|
5564
5579
|
*/
|
|
5565
5580
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
5566
5581
|
/**
|
|
5567
5582
|
* Prefer `.flatMap(…)` over `.map(…).flat()`.
|
|
5568
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5583
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-flat-map.md
|
|
5569
5584
|
*/
|
|
5570
5585
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
5571
5586
|
/**
|
|
5572
5587
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
5573
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5588
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-index-of.md
|
|
5574
5589
|
*/
|
|
5575
5590
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
5576
5591
|
/**
|
|
5577
5592
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
5578
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5593
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-array-some.md
|
|
5579
5594
|
*/
|
|
5580
5595
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
5581
5596
|
/**
|
|
5582
5597
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
5583
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5598
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-at.md
|
|
5584
5599
|
*/
|
|
5585
5600
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
5586
5601
|
/**
|
|
5587
5602
|
* Prefer `BigInt` literals over the constructor.
|
|
5588
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5603
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-bigint-literals.md
|
|
5589
5604
|
*/
|
|
5590
5605
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
5591
5606
|
/**
|
|
5592
5607
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
5593
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5608
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
5594
5609
|
*/
|
|
5595
5610
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
5596
5611
|
/**
|
|
5597
5612
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
5598
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5613
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-class-fields.md
|
|
5599
5614
|
*/
|
|
5600
5615
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
5601
5616
|
/**
|
|
5602
5617
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
5603
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5618
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-classlist-toggle.md
|
|
5604
5619
|
*/
|
|
5605
5620
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
5606
5621
|
/**
|
|
5607
5622
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
5608
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5623
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-code-point.md
|
|
5609
5624
|
*/
|
|
5610
5625
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
5611
5626
|
/**
|
|
5612
5627
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
5613
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5628
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-date-now.md
|
|
5614
5629
|
*/
|
|
5615
5630
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
5616
5631
|
/**
|
|
5617
5632
|
* Prefer default parameters over reassignment.
|
|
5618
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5633
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-default-parameters.md
|
|
5619
5634
|
*/
|
|
5620
5635
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
5621
5636
|
/**
|
|
5622
5637
|
* Prefer `Node#append()` over `Node#appendChild()`.
|
|
5623
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5638
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-dom-node-append.md
|
|
5624
5639
|
*/
|
|
5625
5640
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
5626
5641
|
/**
|
|
5627
5642
|
* Prefer using `.dataset` on DOM elements over calling attribute methods.
|
|
5628
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5643
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-dom-node-dataset.md
|
|
5629
5644
|
*/
|
|
5630
5645
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
5631
5646
|
/**
|
|
5632
5647
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
5633
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5648
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-dom-node-remove.md
|
|
5634
5649
|
*/
|
|
5635
5650
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
5636
5651
|
/**
|
|
5637
5652
|
* Prefer `.textContent` over `.innerText`.
|
|
5638
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5653
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
5639
5654
|
*/
|
|
5640
5655
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
5641
5656
|
/**
|
|
5642
5657
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
5643
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5658
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-event-target.md
|
|
5644
5659
|
*/
|
|
5645
5660
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
5646
5661
|
/**
|
|
5647
5662
|
* Prefer `export…from` when re-exporting.
|
|
5648
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5663
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-export-from.md
|
|
5649
5664
|
*/
|
|
5650
5665
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
5651
5666
|
/**
|
|
5652
5667
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
5653
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5668
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-global-this.md
|
|
5654
5669
|
*/
|
|
5655
5670
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
5656
5671
|
/**
|
|
5657
5672
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
5658
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5673
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-import-meta-properties.md
|
|
5659
5674
|
*/
|
|
5660
5675
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
5661
5676
|
/**
|
|
5662
5677
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
5663
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5678
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-includes.md
|
|
5664
5679
|
*/
|
|
5665
5680
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
5666
5681
|
/**
|
|
5667
5682
|
* Prefer reading a JSON file as a buffer.
|
|
5668
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5683
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-json-parse-buffer.md
|
|
5669
5684
|
*/
|
|
5670
5685
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
5671
5686
|
/**
|
|
5672
5687
|
* Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
|
|
5673
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5688
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
5674
5689
|
*/
|
|
5675
5690
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
5676
5691
|
/**
|
|
5677
5692
|
* Prefer using a logical operator over a ternary.
|
|
5678
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5693
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
5679
5694
|
*/
|
|
5680
5695
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
5681
5696
|
/**
|
|
5682
5697
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
5683
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5698
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-math-min-max.md
|
|
5684
5699
|
*/
|
|
5685
5700
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
5686
5701
|
/**
|
|
5687
5702
|
* Enforce the use of `Math.trunc` instead of bitwise operators.
|
|
5688
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5703
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-math-trunc.md
|
|
5689
5704
|
*/
|
|
5690
5705
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
5691
5706
|
/**
|
|
5692
5707
|
* Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
|
|
5693
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5708
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
5694
5709
|
*/
|
|
5695
5710
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
5696
5711
|
/**
|
|
5697
5712
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
5698
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5713
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-modern-math-apis.md
|
|
5699
5714
|
*/
|
|
5700
5715
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
5701
5716
|
/**
|
|
5702
5717
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
5703
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5718
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-module.md
|
|
5704
5719
|
*/
|
|
5705
5720
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
5706
5721
|
/**
|
|
5707
5722
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
5708
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5723
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
5709
5724
|
*/
|
|
5710
5725
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
5711
5726
|
/**
|
|
5712
5727
|
* Prefer negative index over `.length - index` when possible.
|
|
5713
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5728
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-negative-index.md
|
|
5714
5729
|
*/
|
|
5715
5730
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
5716
5731
|
/**
|
|
5717
5732
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
5718
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5733
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-node-protocol.md
|
|
5719
5734
|
*/
|
|
5720
5735
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
5721
5736
|
/**
|
|
5722
5737
|
* Prefer `Number` static properties over global ones.
|
|
5723
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5738
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-number-properties.md
|
|
5724
5739
|
*/
|
|
5725
5740
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
5726
5741
|
/**
|
|
5727
5742
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
5728
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5743
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-object-from-entries.md
|
|
5729
5744
|
*/
|
|
5730
5745
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
5731
5746
|
/**
|
|
5732
5747
|
* Prefer omitting the `catch` binding parameter.
|
|
5733
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5748
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
5734
5749
|
*/
|
|
5735
5750
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
5736
5751
|
/**
|
|
5737
5752
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
5738
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5753
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-prototype-methods.md
|
|
5739
5754
|
*/
|
|
5740
5755
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
5741
5756
|
/**
|
|
5742
5757
|
* Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`.
|
|
5743
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5758
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-query-selector.md
|
|
5744
5759
|
*/
|
|
5745
5760
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<[]>;
|
|
5746
5761
|
/**
|
|
5747
5762
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
5748
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5763
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-reflect-apply.md
|
|
5749
5764
|
*/
|
|
5750
5765
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
5751
5766
|
/**
|
|
5752
5767
|
* Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
|
|
5753
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5768
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-regexp-test.md
|
|
5754
5769
|
*/
|
|
5755
5770
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
5771
|
+
/**
|
|
5772
|
+
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
5773
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-response-static-json.md
|
|
5774
|
+
*/
|
|
5775
|
+
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
|
|
5756
5776
|
/**
|
|
5757
5777
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
5758
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5778
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-set-has.md
|
|
5759
5779
|
*/
|
|
5760
5780
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<[]>;
|
|
5761
5781
|
/**
|
|
5762
5782
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
5763
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5783
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-set-size.md
|
|
5764
5784
|
*/
|
|
5765
5785
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
5766
5786
|
/**
|
|
5767
5787
|
* Enforce combining multiple `Array#push()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
5768
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5788
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-single-call.md
|
|
5769
5789
|
*/
|
|
5770
5790
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
5771
5791
|
/**
|
|
5772
5792
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
|
|
5773
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5793
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-spread.md
|
|
5774
5794
|
*/
|
|
5775
5795
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
5776
5796
|
/**
|
|
5777
5797
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
5778
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5798
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-raw.md
|
|
5779
5799
|
*/
|
|
5780
5800
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
5781
5801
|
/**
|
|
5782
5802
|
* Prefer `String#replaceAll()` over regex searches with the global flag.
|
|
5783
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5803
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-replace-all.md
|
|
5784
5804
|
*/
|
|
5785
5805
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
5786
5806
|
/**
|
|
5787
5807
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
5788
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5808
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-slice.md
|
|
5789
5809
|
*/
|
|
5790
5810
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
5791
5811
|
/**
|
|
5792
5812
|
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
|
|
5793
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5813
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
5794
5814
|
*/
|
|
5795
5815
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
5796
5816
|
/**
|
|
5797
5817
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
5798
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5818
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
5799
5819
|
*/
|
|
5800
5820
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
5801
5821
|
/**
|
|
5802
5822
|
* Prefer using `structuredClone` to create a deep clone.
|
|
5803
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5823
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-structured-clone.md
|
|
5804
5824
|
*/
|
|
5805
5825
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
5806
5826
|
/**
|
|
5807
5827
|
* Prefer `switch` over multiple `else-if`.
|
|
5808
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5828
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-switch.md
|
|
5809
5829
|
*/
|
|
5810
5830
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
5811
5831
|
/**
|
|
5812
5832
|
* Prefer ternary expressions over simple `if-else` statements.
|
|
5813
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5833
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-ternary.md
|
|
5814
5834
|
*/
|
|
5815
5835
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
5816
5836
|
/**
|
|
5817
5837
|
* Prefer top-level await over top-level promises and async function calls.
|
|
5818
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5838
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-top-level-await.md
|
|
5819
5839
|
*/
|
|
5820
5840
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
5821
5841
|
/**
|
|
5822
5842
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
5823
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5843
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prefer-type-error.md
|
|
5824
5844
|
*/
|
|
5825
5845
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
5826
5846
|
/**
|
|
5827
5847
|
* Prevent abbreviations.
|
|
5828
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5848
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/prevent-abbreviations.md
|
|
5829
5849
|
*/
|
|
5830
5850
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<UnicornPreventAbbreviations>;
|
|
5831
5851
|
/**
|
|
5832
5852
|
* Enforce consistent relative URL style.
|
|
5833
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5853
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/relative-url-style.md
|
|
5834
5854
|
*/
|
|
5835
5855
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
5836
5856
|
/**
|
|
5837
5857
|
* Enforce using the separator argument with `Array#join()`.
|
|
5838
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5858
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-array-join-separator.md
|
|
5839
5859
|
*/
|
|
5840
5860
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
5841
5861
|
/**
|
|
5842
5862
|
* Require non-empty module attributes for imports and exports
|
|
5843
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5863
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-module-attributes.md
|
|
5844
5864
|
*/
|
|
5845
5865
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
5846
5866
|
/**
|
|
5847
5867
|
* Require non-empty specifier list in import and export statements.
|
|
5848
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5868
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-module-specifiers.md
|
|
5849
5869
|
*/
|
|
5850
5870
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
5851
5871
|
/**
|
|
5852
5872
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
5853
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5873
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
5854
5874
|
*/
|
|
5855
5875
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
5856
5876
|
/**
|
|
5857
5877
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
5858
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5878
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/require-post-message-target-origin.md
|
|
5859
5879
|
*/
|
|
5860
5880
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
5861
5881
|
/**
|
|
5862
5882
|
* Enforce better string content.
|
|
5863
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5883
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/string-content.md
|
|
5864
5884
|
*/
|
|
5865
5885
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
5866
5886
|
/**
|
|
5867
5887
|
* Enforce consistent brace style for `case` clauses.
|
|
5868
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5888
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/switch-case-braces.md
|
|
5869
5889
|
*/
|
|
5870
5890
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
5871
5891
|
/**
|
|
5872
5892
|
* Fix whitespace-insensitive template indentation.
|
|
5873
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5893
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/template-indent.md
|
|
5874
5894
|
*/
|
|
5875
5895
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
5876
5896
|
/**
|
|
5877
5897
|
* Enforce consistent case for text encoding identifiers.
|
|
5878
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5898
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/text-encoding-identifier-case.md
|
|
5879
5899
|
*/
|
|
5880
|
-
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<
|
|
5900
|
+
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
5881
5901
|
/**
|
|
5882
5902
|
* Require `new` when creating an error.
|
|
5883
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
5903
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v62.0.0/docs/rules/throw-new-error.md
|
|
5884
5904
|
*/
|
|
5885
5905
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
5886
5906
|
/**
|
|
@@ -7298,6 +7318,13 @@ type AstroJsxA11YScope = [] | [{
|
|
|
7298
7318
|
type AstroJsxA11YTabindexNoPositive = [] | [{
|
|
7299
7319
|
[k: string]: unknown | undefined;
|
|
7300
7320
|
}];
|
|
7321
|
+
// ----- astro/no-unsafe-inline-scripts -----
|
|
7322
|
+
type AstroNoUnsafeInlineScripts = [] | [{
|
|
7323
|
+
allowDefineVars?: boolean;
|
|
7324
|
+
allowModuleScripts?: boolean;
|
|
7325
|
+
allowNonExecutingTypes?: string[];
|
|
7326
|
+
allowNonce?: boolean;
|
|
7327
|
+
}];
|
|
7301
7328
|
// ----- astro/prefer-split-class-list -----
|
|
7302
7329
|
type AstroPreferSplitClassList = [] | [{
|
|
7303
7330
|
splitLiteral?: boolean;
|
|
@@ -12346,6 +12373,10 @@ type UnicornTemplateIndent = [] | [{
|
|
|
12346
12373
|
selectors?: string[];
|
|
12347
12374
|
comments?: string[];
|
|
12348
12375
|
}];
|
|
12376
|
+
// ----- unicorn/text-encoding-identifier-case -----
|
|
12377
|
+
type UnicornTextEncodingIdentifierCase = [] | [{
|
|
12378
|
+
withDash?: boolean;
|
|
12379
|
+
}];
|
|
12349
12380
|
// ----- unused-imports/no-unused-imports -----
|
|
12350
12381
|
type UnusedImportsNoUnusedImports = [] | [(("all" | "local") | {
|
|
12351
12382
|
args?: ("all" | "after-used" | "none");
|
|
@@ -12606,192 +12637,215 @@ type Yoda = [] | [("always" | "never")] | [("always" | "never"), {
|
|
|
12606
12637
|
onlyEquality?: boolean;
|
|
12607
12638
|
}];
|
|
12608
12639
|
// Names of all the configs
|
|
12609
|
-
type ConfigNames = '
|
|
12640
|
+
type ConfigNames = 'nicksp/astro/setup' | 'nicksp/astro/rules' | 'nicksp/astro/script/javascript' | 'nicksp/astro/script/typescript' | 'nicksp/astro/disables' | 'nicksp/comments/recommended' | 'nicksp/comments/rules' | 'nicksp/prettier/setup' | 'nicksp/prettier/astro' | 'nicksp/prettier/rules' | 'nicksp/imports/rules' | 'nicksp/javascript/recommended' | 'nicksp/javascript/setup' | 'nicksp/javascript/rules' | 'nicksp/jsx/setup' | 'nicksp/jsdoc/rules' | 'nicksp/jsonc/setup' | 'nicksp/jsonc/rules' | 'nicksp/node/rules' | 'nicksp/sort/imports' | 'nicksp/nextjs/setup' | 'nicksp/nextjs/rules' | 'nicksp/react/setup' | 'nicksp/react/rules' | 'nicksp/sort/package-json' | 'nicksp/sort/tsconfig' | 'nicksp/test/setup' | 'nicksp/test/rules' | 'nicksp/regexp/rules' | 'nicksp/typescript/setup' | 'nicksp/typescript/parser' | 'nicksp/typescript/recommended' | 'nicksp/typescript/rules' | 'nicksp/typescript/dts-rules' | 'nicksp/typescript/cjs-rules' | 'nicksp/unicorn/unopinionated' | 'nicksp/unicorn/rules' | 'nicksp/yaml/setup' | 'nicksp/yaml/rules' | 'nicksp/yaml/pnpm-workspace' | 'builtin-rules';
|
|
12610
12641
|
//#endregion
|
|
12611
12642
|
//#region src/types.d.ts
|
|
12612
12643
|
type Rules = Record<string, Linter.RuleEntry<any> | undefined> & RuleOptions;
|
|
12613
12644
|
/**
|
|
12614
|
-
* An updated version of ESLint's `Linter.Config`, which provides autocompletion
|
|
12615
|
-
* for `rules` and relaxes type limitations for `plugins` and `rules`, because
|
|
12616
|
-
* many plugins still lack proper type definitions.
|
|
12617
|
-
*/
|
|
12618
|
-
type Config = Omit<Linter.Config,
|
|
12619
|
-
/**
|
|
12620
|
-
|
|
12621
|
-
|
|
12622
|
-
|
|
12623
|
-
|
|
12624
|
-
|
|
12645
|
+
* An updated version of ESLint's `Linter.Config`, which provides autocompletion
|
|
12646
|
+
* for `rules` and relaxes type limitations for `plugins` and `rules`, because
|
|
12647
|
+
* many plugins still lack proper type definitions.
|
|
12648
|
+
*/
|
|
12649
|
+
type Config = Omit<Linter.Config, 'plugins' | 'rules'> & {
|
|
12650
|
+
/**
|
|
12651
|
+
* An object containing a name-value mapping of plugin names to plugin objects.
|
|
12652
|
+
* When `files` is specified, these plugins are only available to the matching files.
|
|
12653
|
+
*
|
|
12654
|
+
* @see [Using plugins in your configuration](https://eslint.org/docs/latest/user-guide/configuring/configuration-files-new#using-plugins-in-your-configuration)
|
|
12655
|
+
*/
|
|
12625
12656
|
plugins?: Record<string, any>;
|
|
12626
12657
|
/**
|
|
12627
|
-
|
|
12628
|
-
|
|
12629
|
-
|
|
12658
|
+
* An object containing the configured rules. When `files` or `ignores` are
|
|
12659
|
+
* specified, these rule configurations are only available to the matching files.
|
|
12660
|
+
*/
|
|
12630
12661
|
rules?: Rules;
|
|
12631
12662
|
};
|
|
12632
12663
|
type ResolvedOptions<T> = T extends boolean ? never : NonNullable<T>;
|
|
12633
|
-
|
|
12664
|
+
interface OptionsFiles {
|
|
12634
12665
|
/**
|
|
12635
|
-
|
|
12636
|
-
|
|
12666
|
+
* Override the `files` option to provide custom globs.
|
|
12667
|
+
*/
|
|
12637
12668
|
files?: string[];
|
|
12638
|
-
}
|
|
12669
|
+
}
|
|
12639
12670
|
type OptionsJSXA11y = {} & OptionsOverrides;
|
|
12640
|
-
|
|
12641
|
-
/**
|
|
12642
|
-
|
|
12643
|
-
|
|
12644
|
-
|
|
12645
|
-
|
|
12646
|
-
|
|
12647
|
-
|
|
12648
|
-
|
|
12649
|
-
|
|
12671
|
+
interface OptionsJSX {
|
|
12672
|
+
/**
|
|
12673
|
+
* Enable JSX accessibility rules.
|
|
12674
|
+
*
|
|
12675
|
+
* Requires installing:
|
|
12676
|
+
* - `eslint-plugin-jsx-a11y`
|
|
12677
|
+
*
|
|
12678
|
+
* Can be a boolean or an object for custom options and overrides.
|
|
12679
|
+
* @default false
|
|
12680
|
+
*/
|
|
12650
12681
|
a11y?: boolean | OptionsJSXA11y;
|
|
12651
|
-
}
|
|
12652
|
-
type
|
|
12653
|
-
|
|
12654
|
-
|
|
12655
|
-
type
|
|
12682
|
+
}
|
|
12683
|
+
type OptionsTypescript = OptionsTypeScriptWithTypes & OptionsOverrides;
|
|
12684
|
+
interface OptionsTypeScriptWithTypes {
|
|
12685
|
+
/**
|
|
12686
|
+
* When this options is provided, type aware rules will be enabled.
|
|
12687
|
+
* @see https://typescript-eslint.io/getting-started/typed-linting/
|
|
12688
|
+
* @default true
|
|
12689
|
+
*/
|
|
12690
|
+
typeAware?: boolean;
|
|
12691
|
+
/**
|
|
12692
|
+
* Glob patterns for files that should be type aware.
|
|
12693
|
+
* @default ['**\/*.{ts,tsx}']
|
|
12694
|
+
*/
|
|
12695
|
+
filesTypeAware?: string[];
|
|
12696
|
+
/**
|
|
12697
|
+
* Glob patterns for files that should not be type aware.
|
|
12698
|
+
* @default ['**\/*.md\/**', '**\/*.astro/*.ts']
|
|
12699
|
+
*/
|
|
12700
|
+
ignoresTypeAware?: string[];
|
|
12701
|
+
/**
|
|
12702
|
+
* Override type aware rules.
|
|
12703
|
+
*/
|
|
12704
|
+
overridesTypeAware?: Config['rules'];
|
|
12705
|
+
}
|
|
12706
|
+
interface OptionsOverrides {
|
|
12707
|
+
overrides?: Config['rules'];
|
|
12708
|
+
}
|
|
12709
|
+
interface OptionsPrettierOptions {
|
|
12656
12710
|
options?: Options$1;
|
|
12657
|
-
}
|
|
12658
|
-
|
|
12711
|
+
}
|
|
12712
|
+
interface OptionsProjectType {
|
|
12659
12713
|
/**
|
|
12660
|
-
|
|
12661
|
-
|
|
12662
|
-
|
|
12663
|
-
|
|
12664
|
-
type?:
|
|
12665
|
-
}
|
|
12666
|
-
|
|
12714
|
+
* Type of the project. `lib` will enable more strict rules for libraries.
|
|
12715
|
+
*
|
|
12716
|
+
* @default 'app'
|
|
12717
|
+
*/
|
|
12718
|
+
type?: 'app' | 'lib';
|
|
12719
|
+
}
|
|
12720
|
+
interface OptionsRegExp {
|
|
12667
12721
|
/**
|
|
12668
|
-
|
|
12669
|
-
|
|
12670
|
-
level?:
|
|
12671
|
-
}
|
|
12672
|
-
|
|
12722
|
+
* Override rulelevels
|
|
12723
|
+
*/
|
|
12724
|
+
level?: 'error' | 'warn';
|
|
12725
|
+
}
|
|
12726
|
+
interface OptionsIsInEditor {
|
|
12673
12727
|
isInEditor?: boolean;
|
|
12674
|
-
}
|
|
12675
|
-
|
|
12728
|
+
}
|
|
12729
|
+
interface OptionsEnableAstro {
|
|
12676
12730
|
enableAstro?: boolean;
|
|
12677
|
-
}
|
|
12731
|
+
}
|
|
12678
12732
|
type Options = {
|
|
12679
12733
|
/**
|
|
12680
|
-
|
|
12681
|
-
|
|
12734
|
+
* Core rules. Can't be disabled.
|
|
12735
|
+
*/
|
|
12682
12736
|
javascript?: OptionsOverrides;
|
|
12683
12737
|
/**
|
|
12684
|
-
|
|
12685
|
-
|
|
12686
|
-
|
|
12687
|
-
|
|
12688
|
-
|
|
12689
|
-
|
|
12690
|
-
typescript?: boolean |
|
|
12691
|
-
/**
|
|
12692
|
-
|
|
12693
|
-
|
|
12694
|
-
|
|
12695
|
-
|
|
12696
|
-
|
|
12697
|
-
|
|
12738
|
+
* Enable TypeScript support.
|
|
12739
|
+
*
|
|
12740
|
+
* Passing an object to enable TypeScript Language Server support.
|
|
12741
|
+
*
|
|
12742
|
+
* @default auto-detect based on the dependencies
|
|
12743
|
+
*/
|
|
12744
|
+
typescript?: boolean | OptionsTypescript;
|
|
12745
|
+
/**
|
|
12746
|
+
* Enable JSX related rules.
|
|
12747
|
+
*
|
|
12748
|
+
* Passing an object to enable JSX accessibility rules.
|
|
12749
|
+
*
|
|
12750
|
+
* @default true
|
|
12751
|
+
*/
|
|
12698
12752
|
jsx?: boolean | OptionsJSX;
|
|
12699
12753
|
/**
|
|
12700
|
-
|
|
12701
|
-
|
|
12702
|
-
|
|
12703
|
-
|
|
12754
|
+
* Enable test support.
|
|
12755
|
+
*
|
|
12756
|
+
* @default true
|
|
12757
|
+
*/
|
|
12704
12758
|
test?: boolean | OptionsOverrides;
|
|
12705
12759
|
/**
|
|
12706
|
-
|
|
12707
|
-
|
|
12708
|
-
|
|
12709
|
-
|
|
12760
|
+
* Enable YAML support.
|
|
12761
|
+
*
|
|
12762
|
+
* @default true
|
|
12763
|
+
*/
|
|
12710
12764
|
yaml?: boolean | OptionsOverrides;
|
|
12711
12765
|
/**
|
|
12712
|
-
|
|
12713
|
-
|
|
12714
|
-
|
|
12715
|
-
|
|
12716
|
-
|
|
12717
|
-
|
|
12718
|
-
|
|
12766
|
+
* Enable Prettier support.
|
|
12767
|
+
*
|
|
12768
|
+
* By default it's controlled by our own config.
|
|
12769
|
+
*
|
|
12770
|
+
* @see https://prettier.io/docs/
|
|
12771
|
+
* @default true
|
|
12772
|
+
*/
|
|
12719
12773
|
prettier?: boolean | OptionsPrettierOptions;
|
|
12720
12774
|
/**
|
|
12721
|
-
|
|
12722
|
-
|
|
12723
|
-
|
|
12724
|
-
|
|
12725
|
-
|
|
12775
|
+
* Enable regexp rules.
|
|
12776
|
+
*
|
|
12777
|
+
* @see https://ota-meshi.github.io/eslint-plugin-regexp/
|
|
12778
|
+
* @default true
|
|
12779
|
+
*/
|
|
12726
12780
|
regexp?: boolean | (OptionsRegExp & OptionsOverrides);
|
|
12727
12781
|
/**
|
|
12728
|
-
|
|
12729
|
-
|
|
12730
|
-
|
|
12731
|
-
|
|
12732
|
-
|
|
12733
|
-
|
|
12734
|
-
|
|
12735
|
-
|
|
12736
|
-
|
|
12737
|
-
|
|
12782
|
+
* Enable Astro support.
|
|
12783
|
+
*
|
|
12784
|
+
* Requires installing:
|
|
12785
|
+
* - `eslint-plugin-astro`
|
|
12786
|
+
*
|
|
12787
|
+
* Requires installing for formatting .astro:
|
|
12788
|
+
* - `prettier-plugin-astro`
|
|
12789
|
+
*
|
|
12790
|
+
* @default false
|
|
12791
|
+
*/
|
|
12738
12792
|
astro?: boolean | OptionsOverrides;
|
|
12739
12793
|
/**
|
|
12740
|
-
|
|
12741
|
-
|
|
12742
|
-
|
|
12743
|
-
|
|
12744
|
-
|
|
12745
|
-
|
|
12746
|
-
|
|
12747
|
-
|
|
12748
|
-
|
|
12794
|
+
* Enable React rules.
|
|
12795
|
+
*
|
|
12796
|
+
* Requires installing:
|
|
12797
|
+
* - `@eslint-react/eslint-plugin`
|
|
12798
|
+
* - `eslint-plugin-react-hooks`
|
|
12799
|
+
* - `eslint-plugin-react-refresh`
|
|
12800
|
+
*
|
|
12801
|
+
* @default false
|
|
12802
|
+
*/
|
|
12749
12803
|
react?: boolean | OptionsOverrides;
|
|
12750
12804
|
/**
|
|
12751
|
-
|
|
12752
|
-
|
|
12753
|
-
|
|
12754
|
-
|
|
12755
|
-
|
|
12756
|
-
|
|
12757
|
-
|
|
12805
|
+
* Enable Nextjs rules.
|
|
12806
|
+
*
|
|
12807
|
+
* Requires installing:
|
|
12808
|
+
* - `@next/eslint-plugin-next`
|
|
12809
|
+
*
|
|
12810
|
+
* @default false
|
|
12811
|
+
*/
|
|
12758
12812
|
nextjs?: boolean | OptionsOverrides;
|
|
12759
12813
|
} & OptionsProjectType;
|
|
12760
12814
|
//#endregion
|
|
12761
12815
|
//#region src/factory.d.ts
|
|
12762
12816
|
/**
|
|
12763
|
-
* Construct an array of ESLint flat config items.
|
|
12764
|
-
*
|
|
12765
|
-
* @param options - The options for generating the ESLint configurations.
|
|
12766
|
-
* @param userConfigs - The user configurations to be merged with the generated configurations.
|
|
12767
|
-
* @returns The merged ESLint configurations.
|
|
12768
|
-
*/
|
|
12769
|
-
declare function defineConfig(options?: Options & Omit<Config,
|
|
12817
|
+
* Construct an array of ESLint flat config items.
|
|
12818
|
+
*
|
|
12819
|
+
* @param options - The options for generating the ESLint configurations.
|
|
12820
|
+
* @param userConfigs - The user configurations to be merged with the generated configurations.
|
|
12821
|
+
* @returns The merged ESLint configurations.
|
|
12822
|
+
*/
|
|
12823
|
+
declare function defineConfig(options?: Options & Omit<Config, 'files'>, ...userConfigs: Awaitable<Arrayable<Config> | FlatConfigComposer<any, any> | Linter.Config[]>[]): FlatConfigComposer<Config, ConfigNames>;
|
|
12770
12824
|
//#endregion
|
|
12771
12825
|
//#region src/configs/astro.d.ts
|
|
12772
12826
|
declare function astro(options?: OptionsOverrides & OptionsFiles): Promise<Config[]>;
|
|
12773
12827
|
//#endregion
|
|
12774
12828
|
//#region src/configs/comments.d.ts
|
|
12775
|
-
declare function comments():
|
|
12829
|
+
declare function comments(): Config[];
|
|
12776
12830
|
//#endregion
|
|
12777
12831
|
//#region src/configs/disables.d.ts
|
|
12778
|
-
declare function disables():
|
|
12832
|
+
declare function disables(): Config[];
|
|
12779
12833
|
//#endregion
|
|
12780
12834
|
//#region src/configs/ignores.d.ts
|
|
12781
|
-
declare function ignores(userIgnores?: string[]):
|
|
12835
|
+
declare function ignores(userIgnores?: string[]): Config[];
|
|
12782
12836
|
//#endregion
|
|
12783
12837
|
//#region src/configs/imports.d.ts
|
|
12784
|
-
declare function imports():
|
|
12838
|
+
declare function imports(): Config[];
|
|
12785
12839
|
//#endregion
|
|
12786
12840
|
//#region src/configs/javascript.d.ts
|
|
12787
12841
|
declare const restrictedSyntaxJs: AST_NODE_TYPES[];
|
|
12788
|
-
declare function javascript(options?: OptionsIsInEditor & OptionsOverrides):
|
|
12842
|
+
declare function javascript(options?: OptionsIsInEditor & OptionsOverrides): Config[];
|
|
12789
12843
|
//#endregion
|
|
12790
12844
|
//#region src/configs/jsdoc.d.ts
|
|
12791
|
-
declare function jsdoc():
|
|
12845
|
+
declare function jsdoc(): Config[];
|
|
12792
12846
|
//#endregion
|
|
12793
12847
|
//#region src/configs/jsonc.d.ts
|
|
12794
|
-
declare function jsonc():
|
|
12848
|
+
declare function jsonc(): Config[];
|
|
12795
12849
|
//#endregion
|
|
12796
12850
|
//#region src/configs/jsx.d.ts
|
|
12797
12851
|
declare function jsx(options?: OptionsJSX): Promise<Config[]>;
|
|
@@ -12800,45 +12854,46 @@ declare function jsx(options?: OptionsJSX): Promise<Config[]>;
|
|
|
12800
12854
|
declare function nextjs(options?: OptionsOverrides & OptionsFiles): Promise<Config[]>;
|
|
12801
12855
|
//#endregion
|
|
12802
12856
|
//#region src/configs/node.d.ts
|
|
12803
|
-
declare function node():
|
|
12857
|
+
declare function node(): Config[];
|
|
12804
12858
|
//#endregion
|
|
12805
12859
|
//#region src/configs/prettier.d.ts
|
|
12806
12860
|
declare function prettier(options?: OptionsPrettierOptions & OptionsOverrides & OptionsEnableAstro): Promise<Config[]>;
|
|
12807
12861
|
//#endregion
|
|
12808
12862
|
//#region src/configs/react.d.ts
|
|
12809
|
-
declare function react(options?:
|
|
12863
|
+
declare function react(options?: OptionsTypescript & OptionsFiles): Promise<Config[]>;
|
|
12810
12864
|
//#endregion
|
|
12811
12865
|
//#region src/configs/regexp.d.ts
|
|
12812
|
-
declare function regexp(options?: OptionsRegExp & OptionsOverrides):
|
|
12866
|
+
declare function regexp(options?: OptionsRegExp & OptionsOverrides): Config[];
|
|
12813
12867
|
//#endregion
|
|
12814
12868
|
//#region src/configs/sort.d.ts
|
|
12815
12869
|
/**
|
|
12816
|
-
* Sort package.json
|
|
12817
|
-
*/
|
|
12818
|
-
declare function sortPackageJson():
|
|
12870
|
+
* Sort package.json
|
|
12871
|
+
*/
|
|
12872
|
+
declare function sortPackageJson(): Config[];
|
|
12819
12873
|
/**
|
|
12820
|
-
* Sort tsconfig.json
|
|
12821
|
-
*/
|
|
12874
|
+
* Sort tsconfig.json
|
|
12875
|
+
*/
|
|
12822
12876
|
declare function sortTsconfig(): Config[];
|
|
12823
12877
|
/**
|
|
12824
|
-
* Perfectionist plugin for props and items sorting.
|
|
12825
|
-
*
|
|
12826
|
-
* @see https://github.com/azat-io/eslint-plugin-perfectionist
|
|
12827
|
-
*/
|
|
12878
|
+
* Perfectionist plugin for props and items sorting.
|
|
12879
|
+
*
|
|
12880
|
+
* @see https://github.com/azat-io/eslint-plugin-perfectionist
|
|
12881
|
+
*/
|
|
12828
12882
|
declare function sortImports(): Config[];
|
|
12829
12883
|
//#endregion
|
|
12830
12884
|
//#region src/configs/test.d.ts
|
|
12831
|
-
declare function test(options?: OptionsFiles & OptionsIsInEditor & OptionsOverrides):
|
|
12885
|
+
declare function test(options?: OptionsFiles & OptionsIsInEditor & OptionsOverrides): Config[];
|
|
12832
12886
|
//#endregion
|
|
12833
12887
|
//#region src/configs/typescript.d.ts
|
|
12834
12888
|
declare const typescriptRecommended: Config[];
|
|
12835
|
-
declare
|
|
12889
|
+
declare const typescriptTypeCheckedRecommended: Config[];
|
|
12890
|
+
declare function typescript(options?: OptionsTypescript & OptionsFiles & OptionsProjectType): Config[];
|
|
12836
12891
|
//#endregion
|
|
12837
12892
|
//#region src/configs/unicorn.d.ts
|
|
12838
|
-
declare function unicorn(options?: OptionsOverrides):
|
|
12893
|
+
declare function unicorn(options?: OptionsOverrides): Config[];
|
|
12839
12894
|
//#endregion
|
|
12840
12895
|
//#region src/configs/yaml.d.ts
|
|
12841
|
-
declare function yaml(options?: OptionsOverrides & OptionsFiles):
|
|
12896
|
+
declare function yaml(options?: OptionsOverrides & OptionsFiles): Config[];
|
|
12842
12897
|
//#endregion
|
|
12843
12898
|
//#region src/globs.d.ts
|
|
12844
12899
|
declare const GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
|
|
@@ -12850,6 +12905,7 @@ declare const GLOB_TSX = "**/*.?([cm])tsx";
|
|
|
12850
12905
|
declare const GLOB_JSON = "**/*.json";
|
|
12851
12906
|
declare const GLOB_JSON5 = "**/*.json5";
|
|
12852
12907
|
declare const GLOB_JSONC = "**/*.jsonc";
|
|
12908
|
+
declare const GLOB_MARKDOWN = "**/*.md";
|
|
12853
12909
|
declare const GLOB_YAML = "**/*.y?(a)ml";
|
|
12854
12910
|
declare const GLOB_ASTRO = "**/*.astro";
|
|
12855
12911
|
declare const GLOB_ASTRO_JS = "**/*.astro/*.js";
|
|
@@ -12863,12 +12919,12 @@ declare const GLOB_EXCLUDE: string[];
|
|
|
12863
12919
|
//#region src/utils.d.ts
|
|
12864
12920
|
declare function isPackageInScope(name: string): boolean;
|
|
12865
12921
|
declare function ensurePackages(packages: (string | undefined)[]): Promise<void>;
|
|
12866
|
-
declare function interopDefault<T>(
|
|
12922
|
+
declare function interopDefault<T>(module: Awaitable<T>): Promise<T extends {
|
|
12867
12923
|
default: infer U;
|
|
12868
12924
|
} ? U : T>;
|
|
12869
12925
|
declare function isInEditorEnv(): boolean;
|
|
12870
12926
|
declare function isInGitHooksOrLintStaged(): boolean;
|
|
12871
12927
|
declare function resolveSubOptions<K extends keyof Options>(options: Options, key: K): ResolvedOptions<Options[K]>;
|
|
12872
|
-
declare function getOverrides
|
|
12928
|
+
declare function getOverrides(options: Options, key: keyof Options): Partial<Linter.RulesRecord & RuleOptions>;
|
|
12873
12929
|
//#endregion
|
|
12874
|
-
export { Config, type ConfigNames, GLOB_ASTRO, GLOB_ASTRO_JS, GLOB_ASTRO_TS, GLOB_DIST, GLOB_EXCLUDE, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LOCKFILE, GLOB_NODE_MODULES, GLOB_SRC, GLOB_SRC_EXT, GLOB_TESTS, GLOB_TS, GLOB_TSX, GLOB_YAML, Options, OptionsEnableAstro, OptionsFiles, OptionsIsInEditor, OptionsJSX, OptionsJSXA11y, OptionsOverrides, OptionsPrettierOptions, OptionsProjectType, OptionsRegExp, ResolvedOptions, Rules, astro, comments, defineConfig as default, defineConfig, disables, ensurePackages, getOverrides, ignores, imports, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, javascript, jsdoc, jsonc, jsx, nextjs, node, prettier, react, regexp, resolveSubOptions, restrictedSyntaxJs, sortImports, sortPackageJson, sortTsconfig, test, typescript, typescriptRecommended, unicorn, yaml };
|
|
12930
|
+
export { Config, type ConfigNames, GLOB_ASTRO, GLOB_ASTRO_JS, GLOB_ASTRO_TS, GLOB_DIST, GLOB_EXCLUDE, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_LOCKFILE, GLOB_MARKDOWN, GLOB_NODE_MODULES, GLOB_SRC, GLOB_SRC_EXT, GLOB_TESTS, GLOB_TS, GLOB_TSX, GLOB_YAML, Options, OptionsEnableAstro, OptionsFiles, OptionsIsInEditor, OptionsJSX, OptionsJSXA11y, OptionsOverrides, OptionsPrettierOptions, OptionsProjectType, OptionsRegExp, OptionsTypeScriptWithTypes, OptionsTypescript, ResolvedOptions, Rules, astro, comments, defineConfig as default, defineConfig, disables, ensurePackages, getOverrides, ignores, imports, interopDefault, isInEditorEnv, isInGitHooksOrLintStaged, isPackageInScope, javascript, jsdoc, jsonc, jsx, nextjs, node, prettier, react, regexp, resolveSubOptions, restrictedSyntaxJs, sortImports, sortPackageJson, sortTsconfig, test, typescript, typescriptRecommended, typescriptTypeCheckedRecommended, unicorn, yaml };
|