@w5s/eslint-config 5.0.0 → 7.0.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 +1 -0
- package/dist/index.d.ts +1173 -363
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +40 -8
- package/dist/index.js.map +1 -1
- package/package.json +11 -10
- package/src/config/github-actions.ts +53 -0
- package/src/config/jsonc.ts +6 -4
- package/src/config.ts +1 -0
- package/src/defineConfig.ts +2 -0
- package/src/typegen/github-actions.d.ts +708 -0
- package/src/typegen/ts.d.ts +5 -0
- package/src/typegen/unicorn.d.ts +499 -356
package/dist/index.d.ts
CHANGED
|
@@ -6,10 +6,10 @@ import { ESLintRules } from "eslint/rules";
|
|
|
6
6
|
//#region src/typegen/e18e.d.ts
|
|
7
7
|
declare module 'eslint' {
|
|
8
8
|
namespace Linter {
|
|
9
|
-
interface RulesRecord extends RuleOptions$
|
|
9
|
+
interface RulesRecord extends RuleOptions$16 {}
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
interface RuleOptions$
|
|
12
|
+
interface RuleOptions$16 {
|
|
13
13
|
/**
|
|
14
14
|
* Disallow dependencies in favor of more performant or secure alternatives
|
|
15
15
|
*/
|
|
@@ -249,16 +249,16 @@ export declare namespace e18e {
|
|
|
249
249
|
*/
|
|
250
250
|
performanceImprovements?: boolean;
|
|
251
251
|
}
|
|
252
|
-
type Rules = RuleOptions$
|
|
252
|
+
type Rules = RuleOptions$16;
|
|
253
253
|
}
|
|
254
254
|
//#endregion
|
|
255
255
|
//#region src/typegen/jsonc.d.ts
|
|
256
256
|
declare module 'eslint' {
|
|
257
257
|
namespace Linter {
|
|
258
|
-
interface RulesRecord extends RuleOptions$
|
|
258
|
+
interface RulesRecord extends RuleOptions$15 {}
|
|
259
259
|
}
|
|
260
260
|
}
|
|
261
|
-
interface RuleOptions$
|
|
261
|
+
interface RuleOptions$15 {
|
|
262
262
|
/**
|
|
263
263
|
* enforce line breaks after opening and before closing array brackets
|
|
264
264
|
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/array-bracket-newline.html
|
|
@@ -1145,6 +1145,677 @@ export declare namespace es {
|
|
|
1145
1145
|
*/
|
|
1146
1146
|
restrictedSyntax?: ((currentSyntax: Readonly<RestrictedSyntax>) => RestrictedSyntax) | RestrictedSyntax | undefined;
|
|
1147
1147
|
}
|
|
1148
|
+
type Rules = RuleOptions$15;
|
|
1149
|
+
}
|
|
1150
|
+
//#endregion
|
|
1151
|
+
//#region src/typegen/github-actions.d.ts
|
|
1152
|
+
declare module 'eslint' {
|
|
1153
|
+
namespace Linter {
|
|
1154
|
+
interface RulesRecord extends RuleOptions$14 {}
|
|
1155
|
+
}
|
|
1156
|
+
}
|
|
1157
|
+
interface RuleOptions$14 {
|
|
1158
|
+
/**
|
|
1159
|
+
* enforce a consistent casing convention for workflow `name` values.
|
|
1160
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/action-name-casing
|
|
1161
|
+
*/
|
|
1162
|
+
'github-actions/action-name-casing'?: Linter.RuleEntry<GithubActionsActionNameCasing>;
|
|
1163
|
+
/**
|
|
1164
|
+
* enforce a consistent casing convention for declared action and workflow input identifiers.
|
|
1165
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/input-id-case
|
|
1166
|
+
*/
|
|
1167
|
+
'github-actions/input-id-case'?: Linter.RuleEntry<GithubActionsInputIdCase>;
|
|
1168
|
+
/**
|
|
1169
|
+
* enforce a consistent casing convention for workflow job identifiers.
|
|
1170
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/job-id-casing
|
|
1171
|
+
*/
|
|
1172
|
+
'github-actions/job-id-casing'?: Linter.RuleEntry<GithubActionsJobIdCasing>;
|
|
1173
|
+
/**
|
|
1174
|
+
* enforce a maximum number of jobs per workflow file so large pipelines stay modular and reviewable.
|
|
1175
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/max-jobs-per-action
|
|
1176
|
+
*/
|
|
1177
|
+
'github-actions/max-jobs-per-action'?: Linter.RuleEntry<GithubActionsMaxJobsPerAction>;
|
|
1178
|
+
/**
|
|
1179
|
+
* disallow case-insensitive collisions between action input ids.
|
|
1180
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/no-case-insensitive-input-id-collision
|
|
1181
|
+
*/
|
|
1182
|
+
'github-actions/no-case-insensitive-input-id-collision'?: Linter.RuleEntry<[]>;
|
|
1183
|
+
/**
|
|
1184
|
+
* disallow `github/codeql-action/autobuild` when CodeQL is only scanning JavaScript/TypeScript.
|
|
1185
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/no-codeql-autobuild-for-javascript-typescript
|
|
1186
|
+
*/
|
|
1187
|
+
'github-actions/no-codeql-autobuild-for-javascript-typescript'?: Linter.RuleEntry<[]>;
|
|
1188
|
+
/**
|
|
1189
|
+
* disallow CodeQL language matrices that split JavaScript and TypeScript instead of using `javascript-typescript`.
|
|
1190
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/no-codeql-javascript-typescript-split-language-matrix
|
|
1191
|
+
*/
|
|
1192
|
+
'github-actions/no-codeql-javascript-typescript-split-language-matrix'?: Linter.RuleEntry<[]>;
|
|
1193
|
+
/**
|
|
1194
|
+
* disallow `INPUT_*` environment-variable access in composite actions and require `inputs.*` context references.
|
|
1195
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/no-composite-input-env-access
|
|
1196
|
+
*/
|
|
1197
|
+
'github-actions/no-composite-input-env-access'?: Linter.RuleEntry<[]>;
|
|
1198
|
+
/**
|
|
1199
|
+
* disallow deprecated Node.js runtimes in action metadata `runs.using`.
|
|
1200
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/no-deprecated-node-runtime
|
|
1201
|
+
*/
|
|
1202
|
+
'github-actions/no-deprecated-node-runtime'?: Linter.RuleEntry<[]>;
|
|
1203
|
+
/**
|
|
1204
|
+
* disallow duplicate step IDs in `runs.steps` for composite actions.
|
|
1205
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/no-duplicate-composite-step-id
|
|
1206
|
+
*/
|
|
1207
|
+
'github-actions/no-duplicate-composite-step-id'?: Linter.RuleEntry<[]>;
|
|
1208
|
+
/**
|
|
1209
|
+
* disallow empty or whitespace-only entries in workflow-template `filePatterns`.
|
|
1210
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/no-empty-template-file-pattern
|
|
1211
|
+
*/
|
|
1212
|
+
'github-actions/no-empty-template-file-pattern'?: Linter.RuleEntry<[]>;
|
|
1213
|
+
/**
|
|
1214
|
+
* disallow reusable-workflow jobs declared with `jobs.<id>.uses` when you want every job defined inline in the workflow file.
|
|
1215
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/no-external-job
|
|
1216
|
+
*/
|
|
1217
|
+
'github-actions/no-external-job'?: Linter.RuleEntry<[]>;
|
|
1218
|
+
/**
|
|
1219
|
+
* disallow hardcoded `main`/`master` branch literals in workflow template YAML files.
|
|
1220
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/no-hardcoded-default-branch-in-template
|
|
1221
|
+
*/
|
|
1222
|
+
'github-actions/no-hardcoded-default-branch-in-template'?: Linter.RuleEntry<[]>;
|
|
1223
|
+
/**
|
|
1224
|
+
* disallow `.svg` extensions in workflow-template `iconName` values.
|
|
1225
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/no-icon-file-extension-in-template-icon-name
|
|
1226
|
+
*/
|
|
1227
|
+
'github-actions/no-icon-file-extension-in-template-icon-name'?: Linter.RuleEntry<[]>;
|
|
1228
|
+
/**
|
|
1229
|
+
* disallow `secrets: inherit` on reusable-workflow jobs so callers pass only the named secrets each workflow actually needs.
|
|
1230
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/no-inherit-secrets
|
|
1231
|
+
*/
|
|
1232
|
+
'github-actions/no-inherit-secrets'?: Linter.RuleEntry<[]>;
|
|
1233
|
+
/**
|
|
1234
|
+
* disallow unavailable contexts in workflow-level and job-level `concurrency` expressions.
|
|
1235
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/no-invalid-concurrency-context
|
|
1236
|
+
*/
|
|
1237
|
+
'github-actions/no-invalid-concurrency-context'?: Linter.RuleEntry<[]>;
|
|
1238
|
+
/**
|
|
1239
|
+
* disallow unsupported keys in common GitHub Actions workflow mappings.
|
|
1240
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/no-invalid-key
|
|
1241
|
+
*/
|
|
1242
|
+
'github-actions/no-invalid-key'?: Linter.RuleEntry<[]>;
|
|
1243
|
+
/**
|
|
1244
|
+
* disallow unsupported keys on jobs that call reusable workflows via `jobs.<job_id>.uses`.
|
|
1245
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/no-invalid-reusable-workflow-job-key
|
|
1246
|
+
*/
|
|
1247
|
+
'github-actions/no-invalid-reusable-workflow-job-key'?: Linter.RuleEntry<[]>;
|
|
1248
|
+
/**
|
|
1249
|
+
* disallow syntactically invalid regexes in workflow-template `filePatterns`.
|
|
1250
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/no-invalid-template-file-pattern-regex
|
|
1251
|
+
*/
|
|
1252
|
+
'github-actions/no-invalid-template-file-pattern-regex'?: Linter.RuleEntry<[]>;
|
|
1253
|
+
/**
|
|
1254
|
+
* disallow `workflow_call` output values that use unavailable contexts or fail to map from `jobs.<job_id>.outputs.<output_name>`.
|
|
1255
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/no-invalid-workflow-call-output-value
|
|
1256
|
+
*/
|
|
1257
|
+
'github-actions/no-invalid-workflow-call-output-value'?: Linter.RuleEntry<[]>;
|
|
1258
|
+
/**
|
|
1259
|
+
* disallow guaranteed overlapping Dependabot directory selectors for the same package ecosystem and target branch.
|
|
1260
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/no-overlapping-dependabot-directories
|
|
1261
|
+
*/
|
|
1262
|
+
'github-actions/no-overlapping-dependabot-directories'?: Linter.RuleEntry<[]>;
|
|
1263
|
+
/**
|
|
1264
|
+
* disallow path separators in workflow-template `iconName` values.
|
|
1265
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/no-path-separators-in-template-icon-name
|
|
1266
|
+
*/
|
|
1267
|
+
'github-actions/no-path-separators-in-template-icon-name'?: Linter.RuleEntry<[]>;
|
|
1268
|
+
/**
|
|
1269
|
+
* disallow `runs.post-if` when `runs.post` is not configured in action metadata.
|
|
1270
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/no-post-if-without-post
|
|
1271
|
+
*/
|
|
1272
|
+
'github-actions/no-post-if-without-post'?: Linter.RuleEntry<[]>;
|
|
1273
|
+
/**
|
|
1274
|
+
* disallow `actions/checkout` configurations in `pull_request_target` workflows that fetch pull request head refs, SHAs, or repositories into a privileged run.
|
|
1275
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/no-pr-head-checkout-in-pull-request-target
|
|
1276
|
+
*/
|
|
1277
|
+
'github-actions/no-pr-head-checkout-in-pull-request-target'?: Linter.RuleEntry<[]>;
|
|
1278
|
+
/**
|
|
1279
|
+
* disallow `runs.pre-if` when `runs.pre` is not configured in action metadata.
|
|
1280
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/no-pre-if-without-pre
|
|
1281
|
+
*/
|
|
1282
|
+
'github-actions/no-pre-if-without-pre'?: Linter.RuleEntry<[]>;
|
|
1283
|
+
/**
|
|
1284
|
+
* disallow action inputs that set both `required: true` and `default`.
|
|
1285
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/no-required-input-with-default
|
|
1286
|
+
*/
|
|
1287
|
+
'github-actions/no-required-input-with-default'?: Linter.RuleEntry<[]>;
|
|
1288
|
+
/**
|
|
1289
|
+
* disallow direct `secrets.*` references in job and step `if` conditionals; move secret values into `env` first and condition on that instead.
|
|
1290
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/no-secrets-in-if
|
|
1291
|
+
*/
|
|
1292
|
+
'github-actions/no-secrets-in-if'?: Linter.RuleEntry<[]>;
|
|
1293
|
+
/**
|
|
1294
|
+
* disallow self-hosted runners in workflows triggered by fork-capable pull-request events that can execute untrusted contributor activity.
|
|
1295
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/no-self-hosted-runner-on-fork-pr-events
|
|
1296
|
+
*/
|
|
1297
|
+
'github-actions/no-self-hosted-runner-on-fork-pr-events'?: Linter.RuleEntry<[]>;
|
|
1298
|
+
/**
|
|
1299
|
+
* disallow workflow-template `filePatterns` that match subdirectory paths instead of repository-root files.
|
|
1300
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/no-subdirectory-template-file-pattern
|
|
1301
|
+
*/
|
|
1302
|
+
'github-actions/no-subdirectory-template-file-pattern'?: Linter.RuleEntry<[]>;
|
|
1303
|
+
/**
|
|
1304
|
+
* disallow `$default-branch` placeholder usage outside workflow template YAML files.
|
|
1305
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/no-template-placeholder-in-non-template-workflow
|
|
1306
|
+
*/
|
|
1307
|
+
'github-actions/no-template-placeholder-in-non-template-workflow'?: Linter.RuleEntry<[]>;
|
|
1308
|
+
/**
|
|
1309
|
+
* disallow top-level workflow `env` when you want environment variables scoped closer to the jobs and steps that use them.
|
|
1310
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/no-top-level-env
|
|
1311
|
+
*/
|
|
1312
|
+
'github-actions/no-top-level-env'?: Linter.RuleEntry<[]>;
|
|
1313
|
+
/**
|
|
1314
|
+
* disallow top-level workflow `permissions` when you want every job to declare its own token scope explicitly.
|
|
1315
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/no-top-level-permissions
|
|
1316
|
+
*/
|
|
1317
|
+
'github-actions/no-top-level-permissions'?: Linter.RuleEntry<[]>;
|
|
1318
|
+
/**
|
|
1319
|
+
* disallow universal catch-all regexes in workflow-template `filePatterns`.
|
|
1320
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/no-universal-template-file-pattern
|
|
1321
|
+
*/
|
|
1322
|
+
'github-actions/no-universal-template-file-pattern'?: Linter.RuleEntry<[]>;
|
|
1323
|
+
/**
|
|
1324
|
+
* disallow Dependabot `multi-ecosystem-group` references that do not match a declared top-level group.
|
|
1325
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/no-unknown-dependabot-multi-ecosystem-group
|
|
1326
|
+
*/
|
|
1327
|
+
'github-actions/no-unknown-dependabot-multi-ecosystem-group'?: Linter.RuleEntry<[]>;
|
|
1328
|
+
/**
|
|
1329
|
+
* disallow `inputs.<id>` references in composite action metadata when the input id is not declared.
|
|
1330
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/no-unknown-input-reference-in-composite
|
|
1331
|
+
*/
|
|
1332
|
+
'github-actions/no-unknown-input-reference-in-composite'?: Linter.RuleEntry<[]>;
|
|
1333
|
+
/**
|
|
1334
|
+
* disallow `needs.*.outputs.*` and reusable-workflow `jobs.*.outputs.*` references that point at undeclared jobs or outputs.
|
|
1335
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/no-unknown-job-output-reference
|
|
1336
|
+
*/
|
|
1337
|
+
'github-actions/no-unknown-job-output-reference'?: Linter.RuleEntry<[]>;
|
|
1338
|
+
/**
|
|
1339
|
+
* disallow `steps.<id>.*` references that target a missing step id or a step that has not run yet.
|
|
1340
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/no-unknown-step-reference
|
|
1341
|
+
*/
|
|
1342
|
+
'github-actions/no-unknown-step-reference'?: Linter.RuleEntry<[]>;
|
|
1343
|
+
/**
|
|
1344
|
+
* disallow directly embedding untrusted event payload values inside `run` scripts; move them through `env` first or pass them to an action input.
|
|
1345
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/no-untrusted-input-in-run
|
|
1346
|
+
*/
|
|
1347
|
+
'github-actions/no-untrusted-input-in-run'?: Linter.RuleEntry<[]>;
|
|
1348
|
+
/**
|
|
1349
|
+
* disallow the top-level Dependabot `enable-beta-ecosystems` setting because GitHub currently documents it as unused.
|
|
1350
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/no-unused-dependabot-enable-beta-ecosystems
|
|
1351
|
+
*/
|
|
1352
|
+
'github-actions/no-unused-dependabot-enable-beta-ecosystems'?: Linter.RuleEntry<[]>;
|
|
1353
|
+
/**
|
|
1354
|
+
* disallow declared composite-action inputs that are never referenced.
|
|
1355
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/no-unused-input-in-composite
|
|
1356
|
+
*/
|
|
1357
|
+
'github-actions/no-unused-input-in-composite'?: Linter.RuleEntry<[]>;
|
|
1358
|
+
/**
|
|
1359
|
+
* disallow `permissions: write-all` so workflows and jobs keep GitHub token scopes least-privileged.
|
|
1360
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/no-write-all-permissions
|
|
1361
|
+
*/
|
|
1362
|
+
'github-actions/no-write-all-permissions'?: Linter.RuleEntry<[]>;
|
|
1363
|
+
/**
|
|
1364
|
+
* require third-party `uses` references to pin full-length commit SHAs instead of mutable tags or branches.
|
|
1365
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/pin-action-shas
|
|
1366
|
+
*/
|
|
1367
|
+
'github-actions/pin-action-shas'?: Linter.RuleEntry<[]>;
|
|
1368
|
+
/**
|
|
1369
|
+
* require action metadata files to prefer `action.yml` over `action.yaml`.
|
|
1370
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/prefer-action-yml
|
|
1371
|
+
*/
|
|
1372
|
+
'github-actions/prefer-action-yml'?: Linter.RuleEntry<[]>;
|
|
1373
|
+
/**
|
|
1374
|
+
* disallow `strategy.fail-fast: false` so failing matrix jobs can stop redundant work sooner.
|
|
1375
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/prefer-fail-fast
|
|
1376
|
+
*/
|
|
1377
|
+
'github-actions/prefer-fail-fast'?: Linter.RuleEntry<[]>;
|
|
1378
|
+
/**
|
|
1379
|
+
* enforce a consistent file extension for GitHub Actions workflow files.
|
|
1380
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/prefer-file-extension
|
|
1381
|
+
*/
|
|
1382
|
+
'github-actions/prefer-file-extension'?: Linter.RuleEntry<GithubActionsPreferFileExtension>;
|
|
1383
|
+
/**
|
|
1384
|
+
* enforce the `inputs` context instead of `github.event.inputs` in `workflow_dispatch` workflows so boolean inputs preserve their native type semantics.
|
|
1385
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/prefer-inputs-context
|
|
1386
|
+
*/
|
|
1387
|
+
'github-actions/prefer-inputs-context'?: Linter.RuleEntry<[]>;
|
|
1388
|
+
/**
|
|
1389
|
+
* enforce a consistent style for step-level `uses` references.
|
|
1390
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/prefer-step-uses-style
|
|
1391
|
+
*/
|
|
1392
|
+
'github-actions/prefer-step-uses-style'?: Linter.RuleEntry<GithubActionsPreferStepUsesStyle>;
|
|
1393
|
+
/**
|
|
1394
|
+
* require workflow template files to prefer `.yml` over `.yaml`.
|
|
1395
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/prefer-template-yml-extension
|
|
1396
|
+
*/
|
|
1397
|
+
'github-actions/prefer-template-yml-extension'?: Linter.RuleEntry<[]>;
|
|
1398
|
+
/**
|
|
1399
|
+
* require a non-empty string workflow `name` so workflow runs stay readable in the GitHub Actions UI.
|
|
1400
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-action-name
|
|
1401
|
+
*/
|
|
1402
|
+
'github-actions/require-action-name'?: Linter.RuleEntry<[]>;
|
|
1403
|
+
/**
|
|
1404
|
+
* require a non-empty string workflow `run-name` when you want queued and in-progress runs to remain self-describing.
|
|
1405
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-action-run-name
|
|
1406
|
+
*/
|
|
1407
|
+
'github-actions/require-action-run-name'?: Linter.RuleEntry<[]>;
|
|
1408
|
+
/**
|
|
1409
|
+
* require an `actions/checkout` step before using repository-local step actions so local action paths resolve reliably.
|
|
1410
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-checkout-before-local-action
|
|
1411
|
+
*/
|
|
1412
|
+
'github-actions/require-checkout-before-local-action'?: Linter.RuleEntry<[]>;
|
|
1413
|
+
/**
|
|
1414
|
+
* require jobs running CodeQL actions to grant `actions: read`.
|
|
1415
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-codeql-actions-read
|
|
1416
|
+
*/
|
|
1417
|
+
'github-actions/require-codeql-actions-read'?: Linter.RuleEntry<[]>;
|
|
1418
|
+
/**
|
|
1419
|
+
* require CodeQL `push` and `pull_request` triggers to scope branches explicitly.
|
|
1420
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-codeql-branch-filters
|
|
1421
|
+
*/
|
|
1422
|
+
'github-actions/require-codeql-branch-filters'?: Linter.RuleEntry<[]>;
|
|
1423
|
+
/**
|
|
1424
|
+
* require CodeQL analyze steps to set `with.category` using `matrix.language` when the job uses a language matrix.
|
|
1425
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-codeql-category-when-language-matrix
|
|
1426
|
+
*/
|
|
1427
|
+
'github-actions/require-codeql-category-when-language-matrix'?: Linter.RuleEntry<[]>;
|
|
1428
|
+
/**
|
|
1429
|
+
* require CodeQL workflows to listen for `pull_request`.
|
|
1430
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-codeql-pull-request-trigger
|
|
1431
|
+
*/
|
|
1432
|
+
'github-actions/require-codeql-pull-request-trigger'?: Linter.RuleEntry<[]>;
|
|
1433
|
+
/**
|
|
1434
|
+
* require CodeQL workflows to include a scheduled trigger for periodic re-analysis.
|
|
1435
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-codeql-schedule
|
|
1436
|
+
*/
|
|
1437
|
+
'github-actions/require-codeql-schedule'?: Linter.RuleEntry<[]>;
|
|
1438
|
+
/**
|
|
1439
|
+
* require jobs running CodeQL analysis to grant `security-events: write`.
|
|
1440
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-codeql-security-events-write
|
|
1441
|
+
*/
|
|
1442
|
+
'github-actions/require-codeql-security-events-write'?: Linter.RuleEntry<[]>;
|
|
1443
|
+
/**
|
|
1444
|
+
* require each composite action step to declare a descriptive `name`.
|
|
1445
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-composite-step-name
|
|
1446
|
+
*/
|
|
1447
|
+
'github-actions/require-composite-step-name'?: Linter.RuleEntry<[]>;
|
|
1448
|
+
/**
|
|
1449
|
+
* require Dependabot update entries to define effective `assignees` directly or via a multi-ecosystem group.
|
|
1450
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-dependabot-assignees
|
|
1451
|
+
*/
|
|
1452
|
+
'github-actions/require-dependabot-assignees'?: Linter.RuleEntry<[]>;
|
|
1453
|
+
/**
|
|
1454
|
+
* require minimum GitHub token permissions for Dependabot pull request automation steps.
|
|
1455
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-dependabot-automation-permissions
|
|
1456
|
+
*/
|
|
1457
|
+
'github-actions/require-dependabot-automation-permissions'?: Linter.RuleEntry<[]>;
|
|
1458
|
+
/**
|
|
1459
|
+
* require Dependabot pull request automation workflows to listen for `pull_request`.
|
|
1460
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-dependabot-automation-pull-request-trigger
|
|
1461
|
+
*/
|
|
1462
|
+
'github-actions/require-dependabot-automation-pull-request-trigger'?: Linter.RuleEntry<[]>;
|
|
1463
|
+
/**
|
|
1464
|
+
* require Dependabot automation jobs to guard execution on `dependabot[bot]`.
|
|
1465
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-dependabot-bot-actor-guard
|
|
1466
|
+
*/
|
|
1467
|
+
'github-actions/require-dependabot-bot-actor-guard'?: Linter.RuleEntry<[]>;
|
|
1468
|
+
/**
|
|
1469
|
+
* require Dependabot commit messages to set `commit-message.include: "scope"`.
|
|
1470
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-dependabot-commit-message-include-scope
|
|
1471
|
+
*/
|
|
1472
|
+
'github-actions/require-dependabot-commit-message-include-scope'?: Linter.RuleEntry<[]>;
|
|
1473
|
+
/**
|
|
1474
|
+
* require Dependabot update entries to define an effective `commit-message.prefix` directly or via a multi-ecosystem group.
|
|
1475
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-dependabot-commit-message-prefix
|
|
1476
|
+
*/
|
|
1477
|
+
'github-actions/require-dependabot-commit-message-prefix'?: Linter.RuleEntry<[]>;
|
|
1478
|
+
/**
|
|
1479
|
+
* require npm-like Dependabot update entries to define `commit-message.prefix-development`.
|
|
1480
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-dependabot-commit-message-prefix-development
|
|
1481
|
+
*/
|
|
1482
|
+
'github-actions/require-dependabot-commit-message-prefix-development'?: Linter.RuleEntry<[]>;
|
|
1483
|
+
/**
|
|
1484
|
+
* require Dependabot update entries to declare a `cooldown` policy.
|
|
1485
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-dependabot-cooldown
|
|
1486
|
+
*/
|
|
1487
|
+
'github-actions/require-dependabot-cooldown'?: Linter.RuleEntry<[]>;
|
|
1488
|
+
/**
|
|
1489
|
+
* require every Dependabot `updates` entry to define exactly one of `directory` or `directories`.
|
|
1490
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-dependabot-directory
|
|
1491
|
+
*/
|
|
1492
|
+
'github-actions/require-dependabot-directory'?: Linter.RuleEntry<[]>;
|
|
1493
|
+
/**
|
|
1494
|
+
* require Dependabot `github-actions` update entries to use `directory: "/"`.
|
|
1495
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-dependabot-github-actions-directory-root
|
|
1496
|
+
*/
|
|
1497
|
+
'github-actions/require-dependabot-github-actions-directory-root'?: Linter.RuleEntry<[]>;
|
|
1498
|
+
/**
|
|
1499
|
+
* require Dependabot update entries to define effective `labels` directly or via a multi-ecosystem group.
|
|
1500
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-dependabot-labels
|
|
1501
|
+
*/
|
|
1502
|
+
'github-actions/require-dependabot-labels'?: Linter.RuleEntry<[]>;
|
|
1503
|
+
/**
|
|
1504
|
+
* require standalone Dependabot update entries to define `open-pull-requests-limit`.
|
|
1505
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-dependabot-open-pull-requests-limit
|
|
1506
|
+
*/
|
|
1507
|
+
'github-actions/require-dependabot-open-pull-requests-limit'?: Linter.RuleEntry<[]>;
|
|
1508
|
+
/**
|
|
1509
|
+
* require every Dependabot `updates` entry to define a non-empty `package-ecosystem`.
|
|
1510
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-dependabot-package-ecosystem
|
|
1511
|
+
*/
|
|
1512
|
+
'github-actions/require-dependabot-package-ecosystem'?: Linter.RuleEntry<[]>;
|
|
1513
|
+
/**
|
|
1514
|
+
* require Dependabot update entries that use `multi-ecosystem-group` to define non-empty `patterns`.
|
|
1515
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-dependabot-patterns-for-multi-ecosystem-group
|
|
1516
|
+
*/
|
|
1517
|
+
'github-actions/require-dependabot-patterns-for-multi-ecosystem-group'?: Linter.RuleEntry<[]>;
|
|
1518
|
+
/**
|
|
1519
|
+
* require Dependabot `schedule.cronjob` for `interval: cron` and disallow it for non-cron intervals.
|
|
1520
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-dependabot-schedule-cronjob
|
|
1521
|
+
*/
|
|
1522
|
+
'github-actions/require-dependabot-schedule-cronjob'?: Linter.RuleEntry<[]>;
|
|
1523
|
+
/**
|
|
1524
|
+
* require every Dependabot update entry to define a valid effective `schedule.interval`.
|
|
1525
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-dependabot-schedule-interval
|
|
1526
|
+
*/
|
|
1527
|
+
'github-actions/require-dependabot-schedule-interval'?: Linter.RuleEntry<[]>;
|
|
1528
|
+
/**
|
|
1529
|
+
* require non-cron Dependabot schedules to declare an explicit `schedule.time`.
|
|
1530
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-dependabot-schedule-time
|
|
1531
|
+
*/
|
|
1532
|
+
'github-actions/require-dependabot-schedule-time'?: Linter.RuleEntry<[]>;
|
|
1533
|
+
/**
|
|
1534
|
+
* require explicit `schedule.timezone` when Dependabot schedules use `time` or `cron` semantics.
|
|
1535
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-dependabot-schedule-timezone
|
|
1536
|
+
*/
|
|
1537
|
+
'github-actions/require-dependabot-schedule-timezone'?: Linter.RuleEntry<[]>;
|
|
1538
|
+
/**
|
|
1539
|
+
* require Dependabot update entries to define an effective `target-branch` directly or via a multi-ecosystem group.
|
|
1540
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-dependabot-target-branch
|
|
1541
|
+
*/
|
|
1542
|
+
'github-actions/require-dependabot-target-branch'?: Linter.RuleEntry<[]>;
|
|
1543
|
+
/**
|
|
1544
|
+
* require Dependabot configuration files to define a non-empty top-level `updates` sequence.
|
|
1545
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-dependabot-updates
|
|
1546
|
+
*/
|
|
1547
|
+
'github-actions/require-dependabot-updates'?: Linter.RuleEntry<[]>;
|
|
1548
|
+
/**
|
|
1549
|
+
* require Dependabot configuration files to declare `version: 2`.
|
|
1550
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-dependabot-version
|
|
1551
|
+
*/
|
|
1552
|
+
'github-actions/require-dependabot-version'?: Linter.RuleEntry<[]>;
|
|
1553
|
+
/**
|
|
1554
|
+
* require npm Dependabot update entries to define `versioning-strategy`.
|
|
1555
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-dependabot-versioning-strategy-for-npm
|
|
1556
|
+
*/
|
|
1557
|
+
'github-actions/require-dependabot-versioning-strategy-for-npm'?: Linter.RuleEntry<[]>;
|
|
1558
|
+
/**
|
|
1559
|
+
* require dependency-review workflow files to invoke `actions/dependency-review-action`.
|
|
1560
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-dependency-review-action
|
|
1561
|
+
*/
|
|
1562
|
+
'github-actions/require-dependency-review-action'?: Linter.RuleEntry<[]>;
|
|
1563
|
+
/**
|
|
1564
|
+
* require `actions/dependency-review-action` steps to set `with.fail-on-severity`.
|
|
1565
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-dependency-review-fail-on-severity
|
|
1566
|
+
*/
|
|
1567
|
+
'github-actions/require-dependency-review-fail-on-severity'?: Linter.RuleEntry<[]>;
|
|
1568
|
+
/**
|
|
1569
|
+
* require jobs using `actions/dependency-review-action` to grant effective `contents: read`.
|
|
1570
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-dependency-review-permissions-contents-read
|
|
1571
|
+
*/
|
|
1572
|
+
'github-actions/require-dependency-review-permissions-contents-read'?: Linter.RuleEntry<[]>;
|
|
1573
|
+
/**
|
|
1574
|
+
* require workflows using `actions/dependency-review-action` to listen for `pull_request`.
|
|
1575
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-dependency-review-pull-request-trigger
|
|
1576
|
+
*/
|
|
1577
|
+
'github-actions/require-dependency-review-pull-request-trigger'?: Linter.RuleEntry<[]>;
|
|
1578
|
+
/**
|
|
1579
|
+
* require `dependabot/fetch-metadata` steps to configure `with.github-token`.
|
|
1580
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-fetch-metadata-github-token
|
|
1581
|
+
*/
|
|
1582
|
+
'github-actions/require-fetch-metadata-github-token'?: Linter.RuleEntry<[]>;
|
|
1583
|
+
/**
|
|
1584
|
+
* require every workflow job to declare a non-empty string `name` for readable run summaries.
|
|
1585
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-job-name
|
|
1586
|
+
*/
|
|
1587
|
+
'github-actions/require-job-name'?: Linter.RuleEntry<[]>;
|
|
1588
|
+
/**
|
|
1589
|
+
* require every workflow step to declare a non-empty string `name` so job logs remain readable.
|
|
1590
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-job-step-name
|
|
1591
|
+
*/
|
|
1592
|
+
'github-actions/require-job-step-name'?: Linter.RuleEntry<[]>;
|
|
1593
|
+
/**
|
|
1594
|
+
* require every non-reusable workflow job to define a bounded `timeout-minutes` value.
|
|
1595
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-job-timeout-minutes
|
|
1596
|
+
*/
|
|
1597
|
+
'github-actions/require-job-timeout-minutes'?: Linter.RuleEntry<GithubActionsRequireJobTimeoutMinutes>;
|
|
1598
|
+
/**
|
|
1599
|
+
* require pull-request validation workflows to include the `merge_group` trigger so required checks also run for merge queues.
|
|
1600
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-merge-group-trigger
|
|
1601
|
+
*/
|
|
1602
|
+
'github-actions/require-merge-group-trigger'?: Linter.RuleEntry<[]>;
|
|
1603
|
+
/**
|
|
1604
|
+
* require `on.pull_request_target` triggers to scope target base branches with `branches` or `branches-ignore` so privileged workflows do not react to every branch by default.
|
|
1605
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-pull-request-target-branches
|
|
1606
|
+
*/
|
|
1607
|
+
'github-actions/require-pull-request-target-branches'?: Linter.RuleEntry<[]>;
|
|
1608
|
+
/**
|
|
1609
|
+
* require `run` steps to use an explicit shell directly or through `defaults.run.shell` so execution behavior stays predictable across runners.
|
|
1610
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-run-step-shell
|
|
1611
|
+
*/
|
|
1612
|
+
'github-actions/require-run-step-shell'?: Linter.RuleEntry<[]>;
|
|
1613
|
+
/**
|
|
1614
|
+
* require workflow jobs containing run steps to declare a `timeout-minutes` value.
|
|
1615
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-run-step-timeout
|
|
1616
|
+
*/
|
|
1617
|
+
'github-actions/require-run-step-timeout'?: Linter.RuleEntry<[]>;
|
|
1618
|
+
/**
|
|
1619
|
+
* require jobs uploading SARIF to GitHub code scanning to grant `security-events: write`.
|
|
1620
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-sarif-upload-security-events-write
|
|
1621
|
+
*/
|
|
1622
|
+
'github-actions/require-sarif-upload-security-events-write'?: Linter.RuleEntry<[]>;
|
|
1623
|
+
/**
|
|
1624
|
+
* require `ossf/scorecard-action` steps to set `results_format: sarif`.
|
|
1625
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-scorecard-results-format-sarif
|
|
1626
|
+
*/
|
|
1627
|
+
'github-actions/require-scorecard-results-format-sarif'?: Linter.RuleEntry<[]>;
|
|
1628
|
+
/**
|
|
1629
|
+
* require workflows using `ossf/scorecard-action` to upload SARIF results to GitHub code scanning.
|
|
1630
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-scorecard-upload-sarif-step
|
|
1631
|
+
*/
|
|
1632
|
+
'github-actions/require-scorecard-upload-sarif-step'?: Linter.RuleEntry<[]>;
|
|
1633
|
+
/**
|
|
1634
|
+
* require secret scanning workflows to grant `contents: read`.
|
|
1635
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-secret-scan-contents-read
|
|
1636
|
+
*/
|
|
1637
|
+
'github-actions/require-secret-scan-contents-read'?: Linter.RuleEntry<[]>;
|
|
1638
|
+
/**
|
|
1639
|
+
* require secret scanning workflows to checkout full history with `fetch-depth: 0`.
|
|
1640
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-secret-scan-fetch-depth-zero
|
|
1641
|
+
*/
|
|
1642
|
+
'github-actions/require-secret-scan-fetch-depth-zero'?: Linter.RuleEntry<[]>;
|
|
1643
|
+
/**
|
|
1644
|
+
* require secret scanning workflows to include a scheduled trigger.
|
|
1645
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-secret-scan-schedule
|
|
1646
|
+
*/
|
|
1647
|
+
'github-actions/require-secret-scan-schedule'?: Linter.RuleEntry<[]>;
|
|
1648
|
+
/**
|
|
1649
|
+
* require non-empty `categories` in workflow-template metadata.
|
|
1650
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-template-categories
|
|
1651
|
+
*/
|
|
1652
|
+
'github-actions/require-template-categories'?: Linter.RuleEntry<[]>;
|
|
1653
|
+
/**
|
|
1654
|
+
* require non-empty `filePatterns` in workflow-template metadata.
|
|
1655
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-template-file-patterns
|
|
1656
|
+
*/
|
|
1657
|
+
'github-actions/require-template-file-patterns'?: Linter.RuleEntry<[]>;
|
|
1658
|
+
/**
|
|
1659
|
+
* require local `iconName` references in workflow-template metadata to point to existing SVG files.
|
|
1660
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-template-icon-file-exists
|
|
1661
|
+
*/
|
|
1662
|
+
'github-actions/require-template-icon-file-exists'?: Linter.RuleEntry<[]>;
|
|
1663
|
+
/**
|
|
1664
|
+
* require `iconName` in workflow-template `.properties.json` metadata.
|
|
1665
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-template-icon-name
|
|
1666
|
+
*/
|
|
1667
|
+
'github-actions/require-template-icon-name'?: Linter.RuleEntry<[]>;
|
|
1668
|
+
/**
|
|
1669
|
+
* require workflow template YAML files to declare a non-empty top-level `name`.
|
|
1670
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-template-workflow-name
|
|
1671
|
+
*/
|
|
1672
|
+
'github-actions/require-template-workflow-name'?: Linter.RuleEntry<[]>;
|
|
1673
|
+
/**
|
|
1674
|
+
* require explicit `types` filters for selected multi-activity workflow events so workflows do not subscribe to every supported activity implicitly.
|
|
1675
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-trigger-types
|
|
1676
|
+
*/
|
|
1677
|
+
'github-actions/require-trigger-types'?: Linter.RuleEntry<[]>;
|
|
1678
|
+
/**
|
|
1679
|
+
* require TruffleHog workflows to enable verified-results mode explicitly.
|
|
1680
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-trufflehog-verified-results-mode
|
|
1681
|
+
*/
|
|
1682
|
+
'github-actions/require-trufflehog-verified-results-mode'?: Linter.RuleEntry<[]>;
|
|
1683
|
+
/**
|
|
1684
|
+
* require every `workflow_call` input to declare one of the documented reusable-workflow input types so callers and validators agree on interface semantics.
|
|
1685
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-workflow-call-input-type
|
|
1686
|
+
*/
|
|
1687
|
+
'github-actions/require-workflow-call-input-type'?: Linter.RuleEntry<[]>;
|
|
1688
|
+
/**
|
|
1689
|
+
* require every `workflow_call` output to declare a non-empty `value` so reusable workflows expose concrete runtime output mappings.
|
|
1690
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-workflow-call-output-value
|
|
1691
|
+
*/
|
|
1692
|
+
'github-actions/require-workflow-call-output-value'?: Linter.RuleEntry<[]>;
|
|
1693
|
+
/**
|
|
1694
|
+
* require workflow-level `concurrency` so redundant runs can be deduplicated predictably.
|
|
1695
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-workflow-concurrency
|
|
1696
|
+
*/
|
|
1697
|
+
'github-actions/require-workflow-concurrency'?: Linter.RuleEntry<GithubActionsRequireWorkflowConcurrency>;
|
|
1698
|
+
/**
|
|
1699
|
+
* require every `workflow_dispatch` input to declare an explicit `type` so manual runs expose clearer controls and preserve intended value semantics.
|
|
1700
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-workflow-dispatch-input-type
|
|
1701
|
+
*/
|
|
1702
|
+
'github-actions/require-workflow-dispatch-input-type'?: Linter.RuleEntry<[]>;
|
|
1703
|
+
/**
|
|
1704
|
+
* require descriptions for `workflow_dispatch` inputs and reusable workflow interfaces so manual forms and callable workflows stay self-documenting.
|
|
1705
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-workflow-interface-description
|
|
1706
|
+
*/
|
|
1707
|
+
'github-actions/require-workflow-interface-description'?: Linter.RuleEntry<[]>;
|
|
1708
|
+
/**
|
|
1709
|
+
* require explicit `permissions` to avoid relying on GitHub Actions' default token scope.
|
|
1710
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-workflow-permissions
|
|
1711
|
+
*/
|
|
1712
|
+
'github-actions/require-workflow-permissions'?: Linter.RuleEntry<GithubActionsRequireWorkflowPermissions>;
|
|
1713
|
+
/**
|
|
1714
|
+
* require `on.workflow_run` triggers to scope upstream branches with `branches` or `branches-ignore` so follow-up workflows do not react to every branch indiscriminately.
|
|
1715
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-workflow-run-branches
|
|
1716
|
+
*/
|
|
1717
|
+
'github-actions/require-workflow-run-branches'?: Linter.RuleEntry<[]>;
|
|
1718
|
+
/**
|
|
1719
|
+
* require each workflow template YAML file to have a matching `.properties.json` metadata file.
|
|
1720
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-workflow-template-pair
|
|
1721
|
+
*/
|
|
1722
|
+
'github-actions/require-workflow-template-pair'?: Linter.RuleEntry<[]>;
|
|
1723
|
+
/**
|
|
1724
|
+
* require each workflow-template `.properties.json` file to have a matching template YAML file.
|
|
1725
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/require-workflow-template-properties-pair
|
|
1726
|
+
*/
|
|
1727
|
+
'github-actions/require-workflow-template-properties-pair'?: Linter.RuleEntry<[]>;
|
|
1728
|
+
/**
|
|
1729
|
+
* disallow invalid literal `timeout-minutes` values for jobs and steps.
|
|
1730
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/valid-timeout-minutes
|
|
1731
|
+
*/
|
|
1732
|
+
'github-actions/valid-timeout-minutes'?: Linter.RuleEntry<GithubActionsValidTimeoutMinutes>;
|
|
1733
|
+
/**
|
|
1734
|
+
* disallow invalid GitHub Actions trigger events under the workflow `on` key.
|
|
1735
|
+
* @see https://nick2bad4u.github.io/eslint-plugin-github-actions-2/docs/rules/valid-trigger-events
|
|
1736
|
+
*/
|
|
1737
|
+
'github-actions/valid-trigger-events'?: Linter.RuleEntry<[]>;
|
|
1738
|
+
}
|
|
1739
|
+
/* ======= Declarations ======= */
|
|
1740
|
+
// ----- github-actions/action-name-casing -----
|
|
1741
|
+
type GithubActionsActionNameCasing = [] | [(("camelCase" | "kebab-case" | "PascalCase" | "SCREAMING_SNAKE_CASE" | "snake_case" | "Title Case" | "Train-Case") | {
|
|
1742
|
+
ignores?: string[];
|
|
1743
|
+
camelCase?: boolean;
|
|
1744
|
+
"kebab-case"?: boolean;
|
|
1745
|
+
PascalCase?: boolean;
|
|
1746
|
+
SCREAMING_SNAKE_CASE?: boolean;
|
|
1747
|
+
snake_case?: boolean;
|
|
1748
|
+
"Title Case"?: boolean;
|
|
1749
|
+
"Train-Case"?: boolean;
|
|
1750
|
+
})];
|
|
1751
|
+
// ----- github-actions/input-id-case -----
|
|
1752
|
+
type GithubActionsInputIdCase = [] | [(("camelCase" | "kebab-case" | "PascalCase" | "SCREAMING_SNAKE_CASE" | "snake_case" | "Train-Case") | {
|
|
1753
|
+
ignores?: string[];
|
|
1754
|
+
camelCase?: boolean;
|
|
1755
|
+
"kebab-case"?: boolean;
|
|
1756
|
+
PascalCase?: boolean;
|
|
1757
|
+
SCREAMING_SNAKE_CASE?: boolean;
|
|
1758
|
+
snake_case?: boolean;
|
|
1759
|
+
"Train-Case"?: boolean;
|
|
1760
|
+
})];
|
|
1761
|
+
// ----- github-actions/job-id-casing -----
|
|
1762
|
+
type GithubActionsJobIdCasing = [] | [(("camelCase" | "kebab-case" | "PascalCase" | "SCREAMING_SNAKE_CASE" | "snake_case" | "Train-Case") | {
|
|
1763
|
+
ignores?: string[];
|
|
1764
|
+
camelCase?: boolean;
|
|
1765
|
+
"kebab-case"?: boolean;
|
|
1766
|
+
PascalCase?: boolean;
|
|
1767
|
+
SCREAMING_SNAKE_CASE?: boolean;
|
|
1768
|
+
snake_case?: boolean;
|
|
1769
|
+
"Train-Case"?: boolean;
|
|
1770
|
+
})];
|
|
1771
|
+
// ----- github-actions/max-jobs-per-action -----
|
|
1772
|
+
type GithubActionsMaxJobsPerAction = [] | [number];
|
|
1773
|
+
// ----- github-actions/prefer-file-extension -----
|
|
1774
|
+
type GithubActionsPreferFileExtension = [] | [(("yaml" | "yml") | {
|
|
1775
|
+
caseSensitive?: boolean;
|
|
1776
|
+
extension?: ("yaml" | "yml");
|
|
1777
|
+
})];
|
|
1778
|
+
// ----- github-actions/prefer-step-uses-style -----
|
|
1779
|
+
type GithubActionsPreferStepUsesStyle = [] | [(("branch" | "commit" | "release") | {
|
|
1780
|
+
allowDocker?: boolean;
|
|
1781
|
+
allowRepository?: boolean;
|
|
1782
|
+
branch?: boolean;
|
|
1783
|
+
commit?: boolean;
|
|
1784
|
+
ignores?: string[];
|
|
1785
|
+
release?: boolean;
|
|
1786
|
+
})];
|
|
1787
|
+
// ----- github-actions/require-job-timeout-minutes -----
|
|
1788
|
+
type GithubActionsRequireJobTimeoutMinutes = [] | [{
|
|
1789
|
+
maxMinutes?: number;
|
|
1790
|
+
}];
|
|
1791
|
+
// ----- github-actions/require-workflow-concurrency -----
|
|
1792
|
+
type GithubActionsRequireWorkflowConcurrency = [] | [{
|
|
1793
|
+
onlyForEvents?: string[];
|
|
1794
|
+
requireCancelInProgress?: boolean;
|
|
1795
|
+
}];
|
|
1796
|
+
// ----- github-actions/require-workflow-permissions -----
|
|
1797
|
+
type GithubActionsRequireWorkflowPermissions = [] | [{
|
|
1798
|
+
allowJobLevelPermissions?: boolean;
|
|
1799
|
+
}];
|
|
1800
|
+
// ----- github-actions/valid-timeout-minutes -----
|
|
1801
|
+
type GithubActionsValidTimeoutMinutes = [] | [(number | {
|
|
1802
|
+
max?: number;
|
|
1803
|
+
min?: number;
|
|
1804
|
+
} | {
|
|
1805
|
+
job?: (number | {
|
|
1806
|
+
max?: number;
|
|
1807
|
+
min?: number;
|
|
1808
|
+
});
|
|
1809
|
+
step?: (number | {
|
|
1810
|
+
max?: number;
|
|
1811
|
+
min?: number;
|
|
1812
|
+
});
|
|
1813
|
+
})];
|
|
1814
|
+
//#endregion
|
|
1815
|
+
//#region src/config/github-actions.d.ts
|
|
1816
|
+
export declare function githubActions(options?: githubActions.Options): Promise<[Config, Config]>;
|
|
1817
|
+
export declare namespace githubActions {
|
|
1818
|
+
interface Options extends PluginOptionsBase<Rules> {}
|
|
1148
1819
|
type Rules = RuleOptions$14;
|
|
1149
1820
|
}
|
|
1150
1821
|
//#endregion
|
|
@@ -2646,7 +3317,7 @@ export declare namespace jsdoc {
|
|
|
2646
3317
|
export declare function jsonc(options?: jsonc.Options): Promise<ReadonlyArray<Config>>;
|
|
2647
3318
|
export declare namespace jsonc {
|
|
2648
3319
|
interface Options extends PluginOptionsBase<Rules> {}
|
|
2649
|
-
type Rules = RuleOptions$
|
|
3320
|
+
type Rules = RuleOptions$15;
|
|
2650
3321
|
}
|
|
2651
3322
|
//#endregion
|
|
2652
3323
|
//#region src/typegen/jsx-a11y.d.ts
|
|
@@ -10302,6 +10973,11 @@ interface RuleOptions$3 {
|
|
|
10302
10973
|
* @see https://typescript-eslint.io/rules/no-unsafe-declaration-merging
|
|
10303
10974
|
*/
|
|
10304
10975
|
'ts/no-unsafe-declaration-merging'?: Linter.RuleEntry<[]>;
|
|
10976
|
+
/**
|
|
10977
|
+
* Disallow assigning non-enum values to enum typed locations
|
|
10978
|
+
* @see https://typescript-eslint.io/rules/no-unsafe-enum-assignment
|
|
10979
|
+
*/
|
|
10980
|
+
'ts/no-unsafe-enum-assignment'?: Linter.RuleEntry<[]>;
|
|
10305
10981
|
/**
|
|
10306
10982
|
* Disallow comparing an enum value with a non-enum value
|
|
10307
10983
|
* @see https://typescript-eslint.io/rules/no-unsafe-enum-comparison
|
|
@@ -11580,1740 +12256,1841 @@ declare module 'eslint' {
|
|
|
11580
12256
|
interface RuleOptions$2 {
|
|
11581
12257
|
/**
|
|
11582
12258
|
* Prefer better DOM traversal APIs.
|
|
11583
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12259
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/better-dom-traversing.md
|
|
11584
12260
|
*/
|
|
11585
12261
|
'unicorn/better-dom-traversing'?: Linter.RuleEntry<[]>;
|
|
11586
12262
|
/**
|
|
11587
12263
|
* Removed. Prefer `eslint-plugin-regexp`
|
|
11588
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12264
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/deleted-and-deprecated-rules.md#better-regex
|
|
11589
12265
|
* @deprecated
|
|
11590
12266
|
*/
|
|
11591
12267
|
'unicorn/better-regex'?: Linter.RuleEntry<[]>;
|
|
11592
12268
|
/**
|
|
11593
12269
|
* Enforce a specific parameter name in catch clauses.
|
|
11594
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12270
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/catch-error-name.md
|
|
11595
12271
|
*/
|
|
11596
12272
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
11597
12273
|
/**
|
|
11598
12274
|
* Enforce consistent class references in static methods.
|
|
11599
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12275
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/class-reference-in-static-methods.md
|
|
11600
12276
|
*/
|
|
11601
12277
|
'unicorn/class-reference-in-static-methods'?: Linter.RuleEntry<UnicornClassReferenceInStaticMethods>;
|
|
11602
12278
|
/**
|
|
11603
12279
|
* Enforce better comment content.
|
|
11604
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12280
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/comment-content.md
|
|
11605
12281
|
*/
|
|
11606
12282
|
'unicorn/comment-content'?: Linter.RuleEntry<UnicornCommentContent>;
|
|
11607
12283
|
/**
|
|
11608
12284
|
* Enforce a consistent return style for multiline arrow function bodies.
|
|
11609
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12285
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-arrow-return-style.md
|
|
11610
12286
|
*/
|
|
11611
12287
|
'unicorn/consistent-arrow-return-style'?: Linter.RuleEntry<[]>;
|
|
11612
12288
|
/**
|
|
11613
12289
|
* Enforce consistent assertion style with `node:assert`.
|
|
11614
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12290
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-assert.md
|
|
11615
12291
|
*/
|
|
11616
12292
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
11617
12293
|
/**
|
|
11618
12294
|
* Enforce consistent naming for boolean names.
|
|
11619
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12295
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-boolean-name.md
|
|
11620
12296
|
*/
|
|
11621
12297
|
'unicorn/consistent-boolean-name'?: Linter.RuleEntry<UnicornConsistentBooleanName>;
|
|
11622
12298
|
/**
|
|
11623
12299
|
* Enforce consistent class member order.
|
|
11624
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12300
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-class-member-order.md
|
|
11625
12301
|
*/
|
|
11626
12302
|
'unicorn/consistent-class-member-order'?: Linter.RuleEntry<UnicornConsistentClassMemberOrder>;
|
|
11627
12303
|
/**
|
|
11628
12304
|
* Enforce consistent spelling of compound words in identifiers.
|
|
11629
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12305
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-compound-words.md
|
|
11630
12306
|
*/
|
|
11631
12307
|
'unicorn/consistent-compound-words'?: Linter.RuleEntry<UnicornConsistentCompoundWords>;
|
|
11632
12308
|
/**
|
|
11633
12309
|
* Enforce consistent conditional object spread style.
|
|
11634
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12310
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-conditional-object-spread.md
|
|
11635
12311
|
*/
|
|
11636
12312
|
'unicorn/consistent-conditional-object-spread'?: Linter.RuleEntry<UnicornConsistentConditionalObjectSpread>;
|
|
11637
12313
|
/**
|
|
11638
12314
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
11639
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12315
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-date-clone.md
|
|
11640
12316
|
*/
|
|
11641
12317
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
11642
12318
|
/**
|
|
11643
12319
|
* Use destructured variables over properties.
|
|
11644
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12320
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-destructuring.md
|
|
11645
12321
|
*/
|
|
11646
12322
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
11647
12323
|
/**
|
|
11648
12324
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
11649
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12325
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-empty-array-spread.md
|
|
11650
12326
|
*/
|
|
11651
12327
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
11652
12328
|
/**
|
|
11653
12329
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
11654
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12330
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-existence-index-check.md
|
|
11655
12331
|
*/
|
|
11656
12332
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
11657
12333
|
/**
|
|
11658
12334
|
* Enforce consistent decorator position on exported classes.
|
|
11659
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12335
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-export-decorator-position.md
|
|
11660
12336
|
*/
|
|
11661
12337
|
'unicorn/consistent-export-decorator-position'?: Linter.RuleEntry<UnicornConsistentExportDecoratorPosition>;
|
|
11662
12338
|
/**
|
|
11663
12339
|
* Move function definitions to the highest possible scope.
|
|
11664
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12340
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-function-scoping.md
|
|
11665
12341
|
*/
|
|
11666
12342
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
11667
12343
|
/**
|
|
11668
12344
|
* Enforce function syntax by role.
|
|
11669
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12345
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-function-style.md
|
|
11670
12346
|
*/
|
|
11671
12347
|
'unicorn/consistent-function-style'?: Linter.RuleEntry<UnicornConsistentFunctionStyle>;
|
|
11672
12348
|
/**
|
|
11673
12349
|
* Enforce consistent JSON file reads before `JSON.parse()`.
|
|
11674
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12350
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-json-file-read.md
|
|
11675
12351
|
*/
|
|
11676
12352
|
'unicorn/consistent-json-file-read'?: Linter.RuleEntry<UnicornConsistentJsonFileRead>;
|
|
11677
12353
|
/**
|
|
11678
12354
|
* Enforce consistent optional chaining for same-base member access.
|
|
11679
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12355
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-optional-chaining.md
|
|
11680
12356
|
*/
|
|
11681
12357
|
'unicorn/consistent-optional-chaining'?: Linter.RuleEntry<[]>;
|
|
11682
12358
|
/**
|
|
11683
12359
|
* Enforce consistent style for escaping `${` in template literals.
|
|
11684
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12360
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-template-literal-escape.md
|
|
11685
12361
|
*/
|
|
11686
12362
|
'unicorn/consistent-template-literal-escape'?: Linter.RuleEntry<[]>;
|
|
11687
12363
|
/**
|
|
11688
12364
|
* Enforce consistent labels on tuple type elements.
|
|
11689
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12365
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/consistent-tuple-labels.md
|
|
11690
12366
|
*/
|
|
11691
12367
|
'unicorn/consistent-tuple-labels'?: Linter.RuleEntry<[]>;
|
|
11692
12368
|
/**
|
|
11693
12369
|
* Enforce correct `Error` subclassing.
|
|
11694
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12370
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/custom-error-definition.md
|
|
11695
12371
|
*/
|
|
11696
12372
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
11697
12373
|
/**
|
|
11698
12374
|
* Enforce consistent default export declarations.
|
|
11699
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12375
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/default-export-style.md
|
|
11700
12376
|
*/
|
|
11701
12377
|
'unicorn/default-export-style'?: Linter.RuleEntry<UnicornDefaultExportStyle>;
|
|
11702
12378
|
/**
|
|
11703
12379
|
* Enforce consistent style for DOM element dataset access.
|
|
11704
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12380
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/dom-node-dataset.md
|
|
11705
12381
|
*/
|
|
11706
12382
|
'unicorn/dom-node-dataset'?: Linter.RuleEntry<UnicornDomNodeDataset>;
|
|
11707
12383
|
/**
|
|
11708
12384
|
* Enforce no spaces between braces.
|
|
11709
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12385
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/empty-brace-spaces.md
|
|
11710
12386
|
*/
|
|
11711
12387
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
11712
12388
|
/**
|
|
11713
12389
|
* Enforce passing a `message` value when creating a built-in error.
|
|
11714
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12390
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/error-message.md
|
|
11715
12391
|
*/
|
|
11716
12392
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
11717
12393
|
/**
|
|
11718
12394
|
* Require escape sequences to use uppercase or lowercase values.
|
|
11719
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12395
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/escape-case.md
|
|
11720
12396
|
*/
|
|
11721
12397
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
11722
12398
|
/**
|
|
11723
12399
|
* Add expiration conditions to TODO comments.
|
|
11724
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12400
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/expiring-todo-comments.md
|
|
11725
12401
|
*/
|
|
11726
12402
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
11727
12403
|
/**
|
|
11728
12404
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
11729
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12405
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/explicit-length-check.md
|
|
11730
12406
|
*/
|
|
11731
12407
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
11732
12408
|
/**
|
|
11733
12409
|
* Enforce or disallow explicit `delay` argument for `setTimeout()` and `setInterval()`.
|
|
11734
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12410
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/explicit-timer-delay.md
|
|
11735
12411
|
*/
|
|
11736
12412
|
'unicorn/explicit-timer-delay'?: Linter.RuleEntry<UnicornExplicitTimerDelay>;
|
|
11737
12413
|
/**
|
|
11738
12414
|
* Enforce a case style for filenames and directory names.
|
|
11739
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12415
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/filename-case.md
|
|
11740
12416
|
*/
|
|
11741
12417
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
11742
12418
|
/**
|
|
11743
12419
|
* Require identifiers to match a specified regular expression.
|
|
11744
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12420
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/id-match.md
|
|
11745
12421
|
*/
|
|
11746
12422
|
'unicorn/id-match'?: Linter.RuleEntry<UnicornIdMatch>;
|
|
11747
12423
|
/**
|
|
11748
12424
|
* Enforce specific import styles per module.
|
|
11749
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12425
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/import-style.md
|
|
11750
12426
|
*/
|
|
11751
12427
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
11752
12428
|
/**
|
|
11753
12429
|
* Prevent usage of variables from outside the scope of isolated functions.
|
|
11754
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12430
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/isolated-functions.md
|
|
11755
12431
|
*/
|
|
11756
12432
|
'unicorn/isolated-functions'?: Linter.RuleEntry<UnicornIsolatedFunctions>;
|
|
11757
12433
|
/**
|
|
11758
12434
|
* Enforce a consistent style for optional loop sources.
|
|
11759
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12435
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/iteration-fallback-style.md
|
|
11760
12436
|
*/
|
|
11761
12437
|
'unicorn/iteration-fallback-style'?: Linter.RuleEntry<UnicornIterationFallbackStyle>;
|
|
11762
12438
|
/**
|
|
11763
12439
|
* Require or disallow logical assignment operator shorthand
|
|
11764
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12440
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/logical-assignment-operators.md
|
|
11765
12441
|
*/
|
|
11766
12442
|
'unicorn/logical-assignment-operators'?: Linter.RuleEntry<UnicornLogicalAssignmentOperators>;
|
|
11767
12443
|
/**
|
|
11768
12444
|
* Limit the depth of nested calls.
|
|
11769
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12445
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/max-nested-calls.md
|
|
11770
12446
|
*/
|
|
11771
12447
|
'unicorn/max-nested-calls'?: Linter.RuleEntry<UnicornMaxNestedCalls>;
|
|
11772
12448
|
/**
|
|
11773
12449
|
* Enforce replacements for variable, property, and filenames.
|
|
11774
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12450
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/name-replacements.md
|
|
11775
12451
|
*/
|
|
11776
12452
|
'unicorn/name-replacements'?: Linter.RuleEntry<UnicornNameReplacements>;
|
|
11777
12453
|
/**
|
|
11778
12454
|
* Enforce correct use of `new` for builtin constructors.
|
|
11779
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12455
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/new-for-builtins.md
|
|
11780
12456
|
*/
|
|
11781
12457
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
11782
12458
|
/**
|
|
11783
12459
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
11784
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12460
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
11785
12461
|
*/
|
|
11786
12462
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
11787
12463
|
/**
|
|
11788
12464
|
* Disallow recursive access to `this` within getters and setters.
|
|
11789
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12465
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-accessor-recursion.md
|
|
11790
12466
|
*/
|
|
11791
12467
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
11792
12468
|
/**
|
|
11793
12469
|
* Disallow bitwise operators where a logical operator was likely intended.
|
|
11794
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12470
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-accidental-bitwise-operator.md
|
|
11795
12471
|
*/
|
|
11796
12472
|
'unicorn/no-accidental-bitwise-operator'?: Linter.RuleEntry<[]>;
|
|
11797
12473
|
/**
|
|
11798
12474
|
* Disallow anonymous functions and classes as the default export.
|
|
11799
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12475
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-anonymous-default-export.md
|
|
11800
12476
|
*/
|
|
11801
12477
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
11802
12478
|
/**
|
|
11803
12479
|
* Prevent passing a function reference directly to iterator methods.
|
|
11804
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12480
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-array-callback-reference.md
|
|
11805
12481
|
*/
|
|
11806
12482
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<UnicornNoArrayCallbackReference>;
|
|
11807
12483
|
/**
|
|
11808
12484
|
* Disallow array accumulation with `Array#concat()` in loops.
|
|
11809
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12485
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-array-concat-in-loop.md
|
|
11810
12486
|
*/
|
|
11811
12487
|
'unicorn/no-array-concat-in-loop'?: Linter.RuleEntry<[]>;
|
|
11812
12488
|
/**
|
|
11813
12489
|
* Disallow using reference values as `Array#fill()` values.
|
|
11814
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12490
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-array-fill-with-reference-type.md
|
|
11815
12491
|
*/
|
|
11816
12492
|
'unicorn/no-array-fill-with-reference-type'?: Linter.RuleEntry<[]>;
|
|
11817
12493
|
/**
|
|
11818
12494
|
* Disallow `.fill()` after `Array.from({length: …})`.
|
|
11819
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12495
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-array-from-fill.md
|
|
11820
12496
|
*/
|
|
11821
12497
|
'unicorn/no-array-from-fill'?: Linter.RuleEntry<[]>;
|
|
11822
12498
|
/**
|
|
11823
12499
|
* Disallow front-of-array mutation.
|
|
11824
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12500
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-array-front-mutation.md
|
|
11825
12501
|
*/
|
|
11826
12502
|
'unicorn/no-array-front-mutation'?: Linter.RuleEntry<[]>;
|
|
11827
12503
|
/**
|
|
11828
12504
|
* Disallow using the `this` argument in array methods.
|
|
11829
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12505
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-array-method-this-argument.md
|
|
11830
12506
|
*/
|
|
11831
12507
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
11832
12508
|
/**
|
|
11833
12509
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
11834
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12510
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/deleted-and-deprecated-rules.md#no-array-push-push
|
|
11835
12511
|
* @deprecated
|
|
11836
12512
|
*/
|
|
11837
12513
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
11838
12514
|
/**
|
|
11839
12515
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
11840
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12516
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-array-reduce.md
|
|
11841
12517
|
*/
|
|
11842
12518
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
11843
12519
|
/**
|
|
11844
12520
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
11845
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12521
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-array-reverse.md
|
|
11846
12522
|
*/
|
|
11847
12523
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
11848
12524
|
/**
|
|
11849
12525
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
11850
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12526
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-array-sort.md
|
|
11851
12527
|
*/
|
|
11852
12528
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
11853
12529
|
/**
|
|
11854
12530
|
* Disallow sorting arrays to get the minimum or maximum value.
|
|
11855
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12531
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-array-sort-for-min-max.md
|
|
11856
12532
|
*/
|
|
11857
12533
|
'unicorn/no-array-sort-for-min-max'?: Linter.RuleEntry<[]>;
|
|
11858
12534
|
/**
|
|
11859
12535
|
* Prefer `Array#toSpliced()` over `Array#splice()`.
|
|
11860
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12536
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-array-splice.md
|
|
11861
12537
|
*/
|
|
11862
12538
|
'unicorn/no-array-splice'?: Linter.RuleEntry<[]>;
|
|
11863
12539
|
/**
|
|
11864
12540
|
* Disallow asterisk prefixes in documentation comments.
|
|
11865
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12541
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-asterisk-prefix-in-documentation-comments.md
|
|
11866
12542
|
*/
|
|
11867
12543
|
'unicorn/no-asterisk-prefix-in-documentation-comments'?: Linter.RuleEntry<[]>;
|
|
12544
|
+
/**
|
|
12545
|
+
* Disallow asynchronous callbacks in synchronous iterator helpers.
|
|
12546
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-async-iterator-callback.md
|
|
12547
|
+
*/
|
|
12548
|
+
'unicorn/no-async-iterator-callback'?: Linter.RuleEntry<[]>;
|
|
11868
12549
|
/**
|
|
11869
12550
|
* Disallow async functions as `Promise#finally()` callbacks.
|
|
11870
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12551
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-async-promise-finally.md
|
|
11871
12552
|
*/
|
|
11872
12553
|
'unicorn/no-async-promise-finally'?: Linter.RuleEntry<[]>;
|
|
11873
12554
|
/**
|
|
11874
12555
|
* Disallow member access from await expression.
|
|
11875
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12556
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-await-expression-member.md
|
|
11876
12557
|
*/
|
|
11877
12558
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
11878
12559
|
/**
|
|
11879
12560
|
* Disallow using `await` in `Promise` method parameters.
|
|
11880
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12561
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-await-in-promise-methods.md
|
|
11881
12562
|
*/
|
|
11882
12563
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
11883
12564
|
/**
|
|
11884
12565
|
* Disallow barrel files.
|
|
11885
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12566
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-barrel-files.md
|
|
11886
12567
|
*/
|
|
11887
12568
|
'unicorn/no-barrel-files'?: Linter.RuleEntry<[]>;
|
|
11888
12569
|
/**
|
|
11889
12570
|
* Disallow unnecessary `Blob` to `File` conversion.
|
|
11890
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12571
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-blob-to-file.md
|
|
11891
12572
|
*/
|
|
11892
12573
|
'unicorn/no-blob-to-file'?: Linter.RuleEntry<[]>;
|
|
11893
12574
|
/**
|
|
11894
12575
|
* Disallow boolean-returning sort comparators.
|
|
11895
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12576
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-boolean-sort-comparator.md
|
|
11896
12577
|
*/
|
|
11897
12578
|
'unicorn/no-boolean-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
11898
12579
|
/**
|
|
11899
|
-
* Disallow `break` and `continue` in nested loops and switches inside loops.
|
|
11900
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12580
|
+
* Disallow `break` and optionally `continue` in nested loops and switches inside loops.
|
|
12581
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-break-in-nested-loop.md
|
|
11901
12582
|
*/
|
|
11902
|
-
'unicorn/no-break-in-nested-loop'?: Linter.RuleEntry<
|
|
12583
|
+
'unicorn/no-break-in-nested-loop'?: Linter.RuleEntry<UnicornNoBreakInNestedLoop>;
|
|
11903
12584
|
/**
|
|
11904
12585
|
* Prefer drawing canvases directly instead of converting them to images.
|
|
11905
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12586
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-canvas-to-image.md
|
|
11906
12587
|
*/
|
|
11907
12588
|
'unicorn/no-canvas-to-image'?: Linter.RuleEntry<[]>;
|
|
11908
12589
|
/**
|
|
11909
12590
|
* Disallow chained comparisons such as `a < b < c`.
|
|
11910
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12591
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-chained-comparison.md
|
|
11911
12592
|
*/
|
|
11912
12593
|
'unicorn/no-chained-comparison'?: Linter.RuleEntry<[]>;
|
|
11913
12594
|
/**
|
|
11914
12595
|
* Disallow accessing `Map`, `Set`, `WeakMap`, and `WeakSet` entries with bracket notation.
|
|
11915
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12596
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-collection-bracket-access.md
|
|
11916
12597
|
*/
|
|
11917
12598
|
'unicorn/no-collection-bracket-access'?: Linter.RuleEntry<[]>;
|
|
11918
12599
|
/**
|
|
11919
12600
|
* Disallow dynamic object property existence checks.
|
|
11920
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12601
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-computed-property-existence-check.md
|
|
11921
12602
|
*/
|
|
11922
12603
|
'unicorn/no-computed-property-existence-check'?: Linter.RuleEntry<[]>;
|
|
11923
12604
|
/**
|
|
11924
12605
|
* Disallow confusing uses of `Array#{splice,toSpliced}()`.
|
|
11925
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12606
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-confusing-array-splice.md
|
|
11926
12607
|
*/
|
|
11927
12608
|
'unicorn/no-confusing-array-splice'?: Linter.RuleEntry<[]>;
|
|
11928
12609
|
/**
|
|
11929
12610
|
* Disallow confusing uses of `Array#with()`.
|
|
11930
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12611
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-confusing-array-with.md
|
|
11931
12612
|
*/
|
|
11932
12613
|
'unicorn/no-confusing-array-with'?: Linter.RuleEntry<[]>;
|
|
11933
12614
|
/**
|
|
11934
12615
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
11935
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12616
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-console-spaces.md
|
|
11936
12617
|
*/
|
|
11937
12618
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
11938
12619
|
/**
|
|
11939
12620
|
* Disallow arithmetic and bitwise operations that always evaluate to `0`.
|
|
11940
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12621
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-constant-zero-expression.md
|
|
11941
12622
|
*/
|
|
11942
12623
|
'unicorn/no-constant-zero-expression'?: Linter.RuleEntry<[]>;
|
|
11943
12624
|
/**
|
|
11944
12625
|
* Disallow declarations before conditional early exits when they are only used after the exit.
|
|
11945
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12626
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-declarations-before-early-exit.md
|
|
11946
12627
|
*/
|
|
11947
12628
|
'unicorn/no-declarations-before-early-exit'?: Linter.RuleEntry<[]>;
|
|
12629
|
+
/**
|
|
12630
|
+
* Disallow deprecated CSS features.
|
|
12631
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-deprecated-css-features.md
|
|
12632
|
+
*/
|
|
12633
|
+
'unicorn/no-deprecated-css-features'?: Linter.RuleEntry<UnicornNoDeprecatedCssFeatures>;
|
|
11948
12634
|
/**
|
|
11949
12635
|
* Do not use `document.cookie` directly.
|
|
11950
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12636
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-document-cookie.md
|
|
11951
12637
|
*/
|
|
11952
12638
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
11953
12639
|
/**
|
|
11954
12640
|
* Disallow two comparisons of the same operands that can be combined into one.
|
|
11955
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12641
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-double-comparison.md
|
|
11956
12642
|
*/
|
|
11957
12643
|
'unicorn/no-double-comparison'?: Linter.RuleEntry<[]>;
|
|
12644
|
+
/**
|
|
12645
|
+
* Disallow duplicate CSS selectors.
|
|
12646
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-duplicate-css-selectors.md
|
|
12647
|
+
*/
|
|
12648
|
+
'unicorn/no-duplicate-css-selectors'?: Linter.RuleEntry<[]>;
|
|
12649
|
+
/**
|
|
12650
|
+
* Disallow duplicate font family names.
|
|
12651
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-duplicate-font-family-names.md
|
|
12652
|
+
*/
|
|
12653
|
+
'unicorn/no-duplicate-font-family-names'?: Linter.RuleEntry<[]>;
|
|
11958
12654
|
/**
|
|
11959
12655
|
* Disallow duplicate adjacent branches in if chains.
|
|
11960
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12656
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-duplicate-if-branches.md
|
|
11961
12657
|
*/
|
|
11962
12658
|
'unicorn/no-duplicate-if-branches'?: Linter.RuleEntry<[]>;
|
|
11963
12659
|
/**
|
|
11964
12660
|
* Disallow adjacent duplicate operands in logical expressions.
|
|
11965
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12661
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-duplicate-logical-operands.md
|
|
11966
12662
|
*/
|
|
11967
12663
|
'unicorn/no-duplicate-logical-operands'?: Linter.RuleEntry<[]>;
|
|
11968
12664
|
/**
|
|
11969
12665
|
* Disallow `.map()` and `.filter()` in `for…of` and `for await…of` loop headers.
|
|
11970
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12666
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-duplicate-loops.md
|
|
11971
12667
|
*/
|
|
11972
12668
|
'unicorn/no-duplicate-loops'?: Linter.RuleEntry<[]>;
|
|
11973
12669
|
/**
|
|
11974
12670
|
* Disallow duplicate values in `Set` constructor array literals.
|
|
11975
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12671
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-duplicate-set-values.md
|
|
11976
12672
|
*/
|
|
11977
12673
|
'unicorn/no-duplicate-set-values'?: Linter.RuleEntry<[]>;
|
|
11978
12674
|
/**
|
|
11979
12675
|
* Disallow empty files.
|
|
11980
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12676
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-empty-file.md
|
|
11981
12677
|
*/
|
|
11982
12678
|
'unicorn/no-empty-file'?: Linter.RuleEntry<UnicornNoEmptyFile>;
|
|
11983
12679
|
/**
|
|
11984
12680
|
* Disallow assigning to built-in error properties.
|
|
11985
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12681
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-error-property-assignment.md
|
|
11986
12682
|
*/
|
|
11987
12683
|
'unicorn/no-error-property-assignment'?: Linter.RuleEntry<[]>;
|
|
11988
12684
|
/**
|
|
11989
12685
|
* Disallow exports in scripts.
|
|
11990
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12686
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-exports-in-scripts.md
|
|
11991
12687
|
*/
|
|
11992
12688
|
'unicorn/no-exports-in-scripts'?: Linter.RuleEntry<[]>;
|
|
11993
12689
|
/**
|
|
11994
12690
|
* Prefer `for…of` over the `forEach` method.
|
|
11995
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12691
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-for-each.md
|
|
11996
12692
|
*/
|
|
11997
12693
|
'unicorn/no-for-each'?: Linter.RuleEntry<[]>;
|
|
11998
12694
|
/**
|
|
11999
12695
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
12000
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12696
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-for-loop.md
|
|
12001
12697
|
*/
|
|
12002
12698
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
12003
12699
|
/**
|
|
12004
12700
|
* Disallow assigning properties on the global object.
|
|
12005
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12701
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-global-object-property-assignment.md
|
|
12006
12702
|
*/
|
|
12007
12703
|
'unicorn/no-global-object-property-assignment'?: Linter.RuleEntry<[]>;
|
|
12008
12704
|
/**
|
|
12009
12705
|
* Replaced by `unicorn/prefer-unicode-code-point-escapes` which covers more cases.
|
|
12010
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12706
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/deleted-and-deprecated-rules.md#no-hex-escape
|
|
12011
12707
|
* @deprecated
|
|
12012
12708
|
*/
|
|
12013
12709
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
12014
12710
|
/**
|
|
12015
12711
|
* Disallow immediate mutation after variable assignment.
|
|
12016
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12712
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-immediate-mutation.md
|
|
12017
12713
|
*/
|
|
12018
|
-
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<
|
|
12714
|
+
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<UnicornNoImmediateMutation>;
|
|
12019
12715
|
/**
|
|
12020
12716
|
* Disallow impossible comparisons against `.length` or `.size`.
|
|
12021
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12717
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-impossible-length-comparison.md
|
|
12022
12718
|
*/
|
|
12023
12719
|
'unicorn/no-impossible-length-comparison'?: Linter.RuleEntry<[]>;
|
|
12024
12720
|
/**
|
|
12025
12721
|
* Disallow incorrect `querySelector()` and `querySelectorAll()` usage.
|
|
12026
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12722
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-incorrect-query-selector.md
|
|
12027
12723
|
*/
|
|
12028
12724
|
'unicorn/no-incorrect-query-selector'?: Linter.RuleEntry<[]>;
|
|
12029
12725
|
/**
|
|
12030
12726
|
* Disallow incorrect template literal interpolation syntax.
|
|
12031
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12727
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-incorrect-template-string-interpolation.md
|
|
12032
12728
|
*/
|
|
12033
12729
|
'unicorn/no-incorrect-template-string-interpolation'?: Linter.RuleEntry<[]>;
|
|
12034
12730
|
/**
|
|
12035
12731
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
12036
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12732
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array
|
|
12037
12733
|
* @deprecated
|
|
12038
12734
|
*/
|
|
12039
12735
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
12040
12736
|
/**
|
|
12041
12737
|
* Disallow `instanceof` with built-in objects
|
|
12042
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12738
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-instanceof-builtins.md
|
|
12043
12739
|
*/
|
|
12044
12740
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
12045
12741
|
/**
|
|
12046
12742
|
* Disallow calling functions and constructors with an invalid number of arguments.
|
|
12047
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12743
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-invalid-argument-count.md
|
|
12048
12744
|
*/
|
|
12049
12745
|
'unicorn/no-invalid-argument-count'?: Linter.RuleEntry<UnicornNoInvalidArgumentCount>;
|
|
12050
12746
|
/**
|
|
12051
12747
|
* Disallow comparing a single character from a string to a multi-character string.
|
|
12052
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12748
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-invalid-character-comparison.md
|
|
12053
12749
|
*/
|
|
12054
12750
|
'unicorn/no-invalid-character-comparison'?: Linter.RuleEntry<[]>;
|
|
12055
12751
|
/**
|
|
12056
12752
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
12057
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12753
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-invalid-fetch-options.md
|
|
12058
12754
|
*/
|
|
12059
12755
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
12060
12756
|
/**
|
|
12061
12757
|
* Disallow invalid `accept` values on file inputs.
|
|
12062
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12758
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-invalid-file-input-accept.md
|
|
12063
12759
|
*/
|
|
12064
12760
|
'unicorn/no-invalid-file-input-accept'?: Linter.RuleEntry<[]>;
|
|
12761
|
+
/**
|
|
12762
|
+
* Disallow unknown media features and invalid values for known media features.
|
|
12763
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-invalid-media-features.md
|
|
12764
|
+
*/
|
|
12765
|
+
'unicorn/no-invalid-media-features'?: Linter.RuleEntry<[]>;
|
|
12065
12766
|
/**
|
|
12066
12767
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
12067
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12768
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
12068
12769
|
*/
|
|
12069
12770
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
12070
12771
|
/**
|
|
12071
12772
|
* Disallow invalid implementations of well-known symbol methods.
|
|
12072
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12773
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-invalid-well-known-symbol-methods.md
|
|
12073
12774
|
*/
|
|
12074
12775
|
'unicorn/no-invalid-well-known-symbol-methods'?: Linter.RuleEntry<[]>;
|
|
12075
12776
|
/**
|
|
12076
12777
|
* Disallow identifiers starting with `new` or `class`.
|
|
12077
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12778
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-keyword-prefix.md
|
|
12078
12779
|
*/
|
|
12079
12780
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
12080
12781
|
/**
|
|
12081
12782
|
* Disallow accessing `event.currentTarget` after the synchronous event dispatch has finished.
|
|
12082
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12783
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-late-current-target-access.md
|
|
12083
12784
|
*/
|
|
12084
12785
|
'unicorn/no-late-current-target-access'?: Linter.RuleEntry<[]>;
|
|
12085
12786
|
/**
|
|
12086
12787
|
* Disallow event-control method calls after the synchronous event dispatch has finished.
|
|
12087
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12788
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-late-event-control.md
|
|
12088
12789
|
*/
|
|
12089
12790
|
'unicorn/no-late-event-control'?: Linter.RuleEntry<[]>;
|
|
12090
12791
|
/**
|
|
12091
12792
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
12092
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12793
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
|
|
12093
12794
|
* @deprecated
|
|
12094
12795
|
*/
|
|
12095
12796
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
12096
12797
|
/**
|
|
12097
12798
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
12098
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12799
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-lonely-if.md
|
|
12099
12800
|
*/
|
|
12100
12801
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
12101
12802
|
/**
|
|
12102
12803
|
* Disallow mutating a loop iterable during iteration.
|
|
12103
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12804
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-loop-iterable-mutation.md
|
|
12104
12805
|
*/
|
|
12105
12806
|
'unicorn/no-loop-iterable-mutation'?: Linter.RuleEntry<[]>;
|
|
12106
12807
|
/**
|
|
12107
12808
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
12108
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12809
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
12109
12810
|
*/
|
|
12110
12811
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
12111
12812
|
/**
|
|
12112
12813
|
* Disallow manually wrapped comments.
|
|
12113
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12814
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-manually-wrapped-comments.md
|
|
12114
12815
|
*/
|
|
12115
12816
|
'unicorn/no-manually-wrapped-comments'?: Linter.RuleEntry<[]>;
|
|
12116
12817
|
/**
|
|
12117
12818
|
* Disallow checking a Map key before accessing a different key.
|
|
12118
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12819
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-mismatched-map-key.md
|
|
12119
12820
|
*/
|
|
12120
12821
|
'unicorn/no-mismatched-map-key'?: Linter.RuleEntry<[]>;
|
|
12121
12822
|
/**
|
|
12122
12823
|
* Disallow misrefactored compound assignments where the target is duplicated in the right-hand side.
|
|
12123
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12824
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-misrefactored-assignment.md
|
|
12124
12825
|
*/
|
|
12125
12826
|
'unicorn/no-misrefactored-assignment'?: Linter.RuleEntry<[]>;
|
|
12126
12827
|
/**
|
|
12127
12828
|
* Disallow references to missing local resources.
|
|
12128
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12829
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-missing-local-resource.md
|
|
12129
12830
|
*/
|
|
12130
12831
|
'unicorn/no-missing-local-resource'?: Linter.RuleEntry<[]>;
|
|
12131
12832
|
/**
|
|
12132
12833
|
* Disallow calling Promise executor resolver functions more than once on the same execution path.
|
|
12133
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12834
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-multiple-promise-resolver-calls.md
|
|
12134
12835
|
*/
|
|
12135
12836
|
'unicorn/no-multiple-promise-resolver-calls'?: Linter.RuleEntry<[]>;
|
|
12136
12837
|
/**
|
|
12137
12838
|
* Disallow named usage of default import and export.
|
|
12138
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12839
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-named-default.md
|
|
12139
12840
|
*/
|
|
12140
12841
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
12141
12842
|
/**
|
|
12142
12843
|
* Disallow negated array predicate calls.
|
|
12143
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12844
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-negated-array-predicate.md
|
|
12144
12845
|
*/
|
|
12145
12846
|
'unicorn/no-negated-array-predicate'?: Linter.RuleEntry<[]>;
|
|
12146
12847
|
/**
|
|
12147
12848
|
* Disallow negated comparisons.
|
|
12148
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12849
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-negated-comparison.md
|
|
12149
12850
|
*/
|
|
12150
12851
|
'unicorn/no-negated-comparison'?: Linter.RuleEntry<UnicornNoNegatedComparison>;
|
|
12151
12852
|
/**
|
|
12152
12853
|
* Disallow negated conditions.
|
|
12153
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12854
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-negated-condition.md
|
|
12154
12855
|
*/
|
|
12155
12856
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
12156
12857
|
/**
|
|
12157
12858
|
* Disallow negated expression in equality check.
|
|
12158
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12859
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-negation-in-equality-check.md
|
|
12159
12860
|
*/
|
|
12160
12861
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
12161
12862
|
/**
|
|
12162
12863
|
* Disallow nested ternary expressions.
|
|
12163
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12864
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-nested-ternary.md
|
|
12164
12865
|
*/
|
|
12165
12866
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
12867
|
+
/**
|
|
12868
|
+
* Disallow nesting under selector lists with mixed specificity.
|
|
12869
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-nesting-with-mixed-specificity.md
|
|
12870
|
+
*/
|
|
12871
|
+
'unicorn/no-nesting-with-mixed-specificity'?: Linter.RuleEntry<[]>;
|
|
12166
12872
|
/**
|
|
12167
12873
|
* Disallow `new Array()`.
|
|
12168
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12874
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-new-array.md
|
|
12169
12875
|
*/
|
|
12170
12876
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
12171
12877
|
/**
|
|
12172
12878
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
12173
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12879
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-new-buffer.md
|
|
12174
12880
|
*/
|
|
12175
12881
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
12176
12882
|
/**
|
|
12177
12883
|
* Disallow non-function values with function-style verb prefixes.
|
|
12178
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12884
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-non-function-verb-prefix.md
|
|
12179
12885
|
*/
|
|
12180
12886
|
'unicorn/no-non-function-verb-prefix'?: Linter.RuleEntry<UnicornNoNonFunctionVerbPrefix>;
|
|
12181
12887
|
/**
|
|
12182
12888
|
* Disallow non-standard properties on built-in objects.
|
|
12183
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12889
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-nonstandard-builtin-properties.md
|
|
12184
12890
|
*/
|
|
12185
12891
|
'unicorn/no-nonstandard-builtin-properties'?: Linter.RuleEntry<[]>;
|
|
12186
12892
|
/**
|
|
12187
12893
|
* Disallow the use of the `null` literal.
|
|
12188
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12894
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-null.md
|
|
12189
12895
|
*/
|
|
12190
12896
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
12191
12897
|
/**
|
|
12192
12898
|
* Disallow the use of objects as default parameters.
|
|
12193
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12899
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-object-as-default-parameter.md
|
|
12194
12900
|
*/
|
|
12195
12901
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
12196
12902
|
/**
|
|
12197
12903
|
* Disallow `Object` methods with `Map` or `Set`.
|
|
12198
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12904
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-object-methods-with-collections.md
|
|
12199
12905
|
*/
|
|
12200
12906
|
'unicorn/no-object-methods-with-collections'?: Linter.RuleEntry<[]>;
|
|
12201
12907
|
/**
|
|
12202
12908
|
* Disallow optional chaining on undeclared variables.
|
|
12203
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12909
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-optional-chaining-on-undeclared-variable.md
|
|
12204
12910
|
*/
|
|
12205
12911
|
'unicorn/no-optional-chaining-on-undeclared-variable'?: Linter.RuleEntry<[]>;
|
|
12206
12912
|
/**
|
|
12207
12913
|
* Disallow `process.exit()`.
|
|
12208
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12914
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-process-exit.md
|
|
12209
12915
|
*/
|
|
12210
12916
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
12211
12917
|
/**
|
|
12212
12918
|
* Disallow comparisons made redundant by an equality check in the same logical AND.
|
|
12213
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12919
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-redundant-comparison.md
|
|
12214
12920
|
*/
|
|
12215
12921
|
'unicorn/no-redundant-comparison'?: Linter.RuleEntry<[]>;
|
|
12922
|
+
/**
|
|
12923
|
+
* Disallow nested style rules that do not modify the parent selector.
|
|
12924
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-redundant-nested-style-rules.md
|
|
12925
|
+
*/
|
|
12926
|
+
'unicorn/no-redundant-nested-style-rules'?: Linter.RuleEntry<[]>;
|
|
12216
12927
|
/**
|
|
12217
12928
|
* Disallow using the return value of `Array#push()` and `Array#unshift()`.
|
|
12218
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12929
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-return-array-push.md
|
|
12219
12930
|
*/
|
|
12220
12931
|
'unicorn/no-return-array-push'?: Linter.RuleEntry<[]>;
|
|
12221
12932
|
/**
|
|
12222
12933
|
* Disallow selector syntax in DOM names.
|
|
12223
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12934
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-selector-as-dom-name.md
|
|
12224
12935
|
*/
|
|
12225
12936
|
'unicorn/no-selector-as-dom-name'?: Linter.RuleEntry<[]>;
|
|
12226
12937
|
/**
|
|
12227
12938
|
* Disallow shorthand properties that override related longhand properties.
|
|
12228
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12939
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-shorthand-property-overrides.md
|
|
12229
12940
|
*/
|
|
12230
12941
|
'unicorn/no-shorthand-property-overrides'?: Linter.RuleEntry<[]>;
|
|
12231
12942
|
/**
|
|
12232
12943
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
12233
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12944
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
12234
12945
|
*/
|
|
12235
12946
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
12236
12947
|
/**
|
|
12237
12948
|
* Disallow classes that only have static members.
|
|
12238
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12949
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-static-only-class.md
|
|
12239
12950
|
*/
|
|
12240
12951
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
12241
12952
|
/**
|
|
12242
12953
|
* Prefer comparing values directly over subtracting and comparing to `0`.
|
|
12243
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12954
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-subtraction-comparison.md
|
|
12244
12955
|
*/
|
|
12245
12956
|
'unicorn/no-subtraction-comparison'?: Linter.RuleEntry<[]>;
|
|
12246
12957
|
/**
|
|
12247
12958
|
* Disallow `then` property.
|
|
12248
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12959
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-thenable.md
|
|
12249
12960
|
*/
|
|
12250
12961
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
12251
12962
|
/**
|
|
12252
12963
|
* Disallow assigning `this` to a variable.
|
|
12253
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12964
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-this-assignment.md
|
|
12254
12965
|
*/
|
|
12255
12966
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
12256
12967
|
/**
|
|
12257
12968
|
* Disallow `this` outside of classes.
|
|
12258
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12969
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-this-outside-of-class.md
|
|
12259
12970
|
*/
|
|
12260
12971
|
'unicorn/no-this-outside-of-class'?: Linter.RuleEntry<[]>;
|
|
12261
12972
|
/**
|
|
12262
12973
|
* Disallow assigning to top-level variables from inside functions.
|
|
12263
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12974
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-top-level-assignment-in-function.md
|
|
12264
12975
|
*/
|
|
12265
12976
|
'unicorn/no-top-level-assignment-in-function'?: Linter.RuleEntry<[]>;
|
|
12266
12977
|
/**
|
|
12267
12978
|
* Disallow top-level side effects in exported modules.
|
|
12268
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12979
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-top-level-side-effects.md
|
|
12269
12980
|
*/
|
|
12270
12981
|
'unicorn/no-top-level-side-effects'?: Linter.RuleEntry<[]>;
|
|
12271
12982
|
/**
|
|
12272
12983
|
* Disallow `all` as a transition property.
|
|
12273
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12984
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-transition-all.md
|
|
12274
12985
|
*/
|
|
12275
12986
|
'unicorn/no-transition-all'?: Linter.RuleEntry<[]>;
|
|
12276
12987
|
/**
|
|
12277
12988
|
* Disallow comparing `undefined` using `typeof`.
|
|
12278
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12989
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-typeof-undefined.md
|
|
12279
12990
|
*/
|
|
12280
12991
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
12281
12992
|
/**
|
|
12282
12993
|
* Disallow referencing methods without calling them.
|
|
12283
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12994
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-uncalled-method.md
|
|
12284
12995
|
*/
|
|
12285
12996
|
'unicorn/no-uncalled-method'?: Linter.RuleEntry<[]>;
|
|
12286
12997
|
/**
|
|
12287
12998
|
* Require class members to be declared.
|
|
12288
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
12999
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-undeclared-class-members.md
|
|
12289
13000
|
*/
|
|
12290
13001
|
'unicorn/no-undeclared-class-members'?: Linter.RuleEntry<[]>;
|
|
13002
|
+
/**
|
|
13003
|
+
* Disallow unknown and noncanonical CSS annotations.
|
|
13004
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unknown-css-annotations.md
|
|
13005
|
+
*/
|
|
13006
|
+
'unicorn/no-unknown-css-annotations'?: Linter.RuleEntry<[]>;
|
|
13007
|
+
/**
|
|
13008
|
+
* Disallow unknown pseudo-class and pseudo-element selectors.
|
|
13009
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unknown-pseudo-selectors.md
|
|
13010
|
+
*/
|
|
13011
|
+
'unicorn/no-unknown-pseudo-selectors'?: Linter.RuleEntry<UnicornNoUnknownPseudoSelectors>;
|
|
12291
13012
|
/**
|
|
12292
13013
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
12293
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13014
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
12294
13015
|
*/
|
|
12295
13016
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
12296
13017
|
/**
|
|
12297
13018
|
* Disallow `Array#flatMap()` callbacks that only wrap a single item.
|
|
12298
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13019
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unnecessary-array-flat-map.md
|
|
12299
13020
|
*/
|
|
12300
13021
|
'unicorn/no-unnecessary-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
12301
13022
|
/**
|
|
12302
13023
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
12303
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13024
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
12304
13025
|
*/
|
|
12305
13026
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
12306
13027
|
/**
|
|
12307
13028
|
* Disallow awaiting non-promise values.
|
|
12308
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13029
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unnecessary-await.md
|
|
12309
13030
|
*/
|
|
12310
13031
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
12311
13032
|
/**
|
|
12312
13033
|
* Disallow unnecessary comparisons against boolean literals.
|
|
12313
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13034
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unnecessary-boolean-comparison.md
|
|
12314
13035
|
*/
|
|
12315
13036
|
'unicorn/no-unnecessary-boolean-comparison'?: Linter.RuleEntry<[]>;
|
|
12316
13037
|
/**
|
|
12317
13038
|
* Disallow unnecessary options in `fetch()` and `new Request()`.
|
|
12318
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13039
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unnecessary-fetch-options.md
|
|
12319
13040
|
*/
|
|
12320
13041
|
'unicorn/no-unnecessary-fetch-options'?: Linter.RuleEntry<[]>;
|
|
12321
13042
|
/**
|
|
12322
13043
|
* Disallow unnecessary `globalThis` references.
|
|
12323
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13044
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unnecessary-global-this.md
|
|
12324
13045
|
*/
|
|
12325
13046
|
'unicorn/no-unnecessary-global-this'?: Linter.RuleEntry<[]>;
|
|
12326
13047
|
/**
|
|
12327
13048
|
* Disallow unnecessary nested ternary expressions.
|
|
12328
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13049
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unnecessary-nested-ternary.md
|
|
12329
13050
|
*/
|
|
12330
13051
|
'unicorn/no-unnecessary-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
12331
13052
|
/**
|
|
12332
13053
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
12333
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13054
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
12334
13055
|
*/
|
|
12335
13056
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
12336
13057
|
/**
|
|
12337
13058
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
12338
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13059
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
12339
13060
|
*/
|
|
12340
13061
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
12341
13062
|
/**
|
|
12342
13063
|
* Disallow `Array#splice()` when simpler alternatives exist.
|
|
12343
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13064
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unnecessary-splice.md
|
|
12344
13065
|
*/
|
|
12345
13066
|
'unicorn/no-unnecessary-splice'?: Linter.RuleEntry<[]>;
|
|
12346
13067
|
/**
|
|
12347
13068
|
* Disallow `String#trim()` before `String#startsWith()` or `String#endsWith()`.
|
|
12348
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13069
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unnecessary-string-trim.md
|
|
12349
13070
|
*/
|
|
12350
13071
|
'unicorn/no-unnecessary-string-trim'?: Linter.RuleEntry<[]>;
|
|
12351
13072
|
/**
|
|
12352
13073
|
* Disallow unreadable array destructuring.
|
|
12353
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13074
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
12354
13075
|
*/
|
|
12355
13076
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<UnicornNoUnreadableArrayDestructuring>;
|
|
12356
13077
|
/**
|
|
12357
13078
|
* Disallow unreadable iterable expressions in `for…of` and `for await…of` loop headers.
|
|
12358
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13079
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unreadable-for-of-expression.md
|
|
12359
13080
|
*/
|
|
12360
13081
|
'unicorn/no-unreadable-for-of-expression'?: Linter.RuleEntry<[]>;
|
|
12361
13082
|
/**
|
|
12362
13083
|
* Disallow unreadable IIFEs.
|
|
12363
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13084
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unreadable-iife.md
|
|
12364
13085
|
*/
|
|
12365
13086
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
12366
13087
|
/**
|
|
12367
13088
|
* Disallow unreadable `new` expressions.
|
|
12368
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13089
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unreadable-new-expression.md
|
|
12369
13090
|
*/
|
|
12370
13091
|
'unicorn/no-unreadable-new-expression'?: Linter.RuleEntry<[]>;
|
|
12371
13092
|
/**
|
|
12372
13093
|
* Disallow unreadable object destructuring.
|
|
12373
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13094
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unreadable-object-destructuring.md
|
|
12374
13095
|
*/
|
|
12375
13096
|
'unicorn/no-unreadable-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
12376
13097
|
/**
|
|
12377
13098
|
* Prevent unsafe use of ArrayBuffer view `.buffer`.
|
|
12378
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13099
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unsafe-buffer-conversion.md
|
|
12379
13100
|
*/
|
|
12380
13101
|
'unicorn/no-unsafe-buffer-conversion'?: Linter.RuleEntry<[]>;
|
|
12381
13102
|
/**
|
|
12382
13103
|
* Disallow unsafe DOM HTML APIs.
|
|
12383
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13104
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unsafe-dom-html.md
|
|
12384
13105
|
*/
|
|
12385
13106
|
'unicorn/no-unsafe-dom-html'?: Linter.RuleEntry<[]>;
|
|
12386
13107
|
/**
|
|
12387
13108
|
* Disallow reading `.value` from `Promise.allSettled()` results without a fulfilled status guard.
|
|
12388
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13109
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unsafe-promise-all-settled-values.md
|
|
12389
13110
|
*/
|
|
12390
13111
|
'unicorn/no-unsafe-promise-all-settled-values'?: Linter.RuleEntry<[]>;
|
|
12391
13112
|
/**
|
|
12392
13113
|
* Disallow unsafe values as property keys.
|
|
12393
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13114
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unsafe-property-key.md
|
|
12394
13115
|
*/
|
|
12395
13116
|
'unicorn/no-unsafe-property-key'?: Linter.RuleEntry<[]>;
|
|
12396
13117
|
/**
|
|
12397
13118
|
* Disallow interpolation into SQL strings passed to Node’s `node:sqlite` APIs.
|
|
12398
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13119
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unsafe-sqlite-interpolation.md
|
|
12399
13120
|
*/
|
|
12400
13121
|
'unicorn/no-unsafe-sqlite-interpolation'?: Linter.RuleEntry<[]>;
|
|
12401
13122
|
/**
|
|
12402
13123
|
* Disallow non-literal replacement values in `String#replace()` and `String#replaceAll()`.
|
|
12403
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13124
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unsafe-string-replacement.md
|
|
12404
13125
|
*/
|
|
12405
13126
|
'unicorn/no-unsafe-string-replacement'?: Linter.RuleEntry<[]>;
|
|
12406
13127
|
/**
|
|
12407
|
-
* Disallow
|
|
12408
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13128
|
+
* Disallow unscoped CSS nesting selectors.
|
|
13129
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unscoped-css-nesting-selector.md
|
|
13130
|
+
*/
|
|
13131
|
+
'unicorn/no-unscoped-css-nesting-selector'?: Linter.RuleEntry<UnicornNoUnscopedCssNestingSelector>;
|
|
13132
|
+
/**
|
|
13133
|
+
* Replaced by `unicorn/no-unused-builtin-method-return` which covers more cases.
|
|
13134
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/deleted-and-deprecated-rules.md#no-unused-array-method-return
|
|
13135
|
+
* @deprecated
|
|
12409
13136
|
*/
|
|
12410
13137
|
'unicorn/no-unused-array-method-return'?: Linter.RuleEntry<[]>;
|
|
13138
|
+
/**
|
|
13139
|
+
* Disallow ignoring the return value of selected built-in methods.
|
|
13140
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unused-builtin-method-return.md
|
|
13141
|
+
*/
|
|
13142
|
+
'unicorn/no-unused-builtin-method-return'?: Linter.RuleEntry<[]>;
|
|
13143
|
+
/**
|
|
13144
|
+
* Disallow discarding lazy iterator helpers.
|
|
13145
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unused-iterator-helper.md
|
|
13146
|
+
*/
|
|
13147
|
+
'unicorn/no-unused-iterator-helper'?: Linter.RuleEntry<[]>;
|
|
12411
13148
|
/**
|
|
12412
13149
|
* Disallow unused object properties.
|
|
12413
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13150
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-unused-properties.md
|
|
12414
13151
|
*/
|
|
12415
13152
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
12416
13153
|
/**
|
|
12417
13154
|
* Disallow unnecessary `Boolean()` casts in array predicate callbacks.
|
|
12418
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13155
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-boolean-cast.md
|
|
12419
13156
|
*/
|
|
12420
13157
|
'unicorn/no-useless-boolean-cast'?: Linter.RuleEntry<[]>;
|
|
12421
13158
|
/**
|
|
12422
13159
|
* Disallow useless type coercions of values that are already of the target type.
|
|
12423
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13160
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-coercion.md
|
|
12424
13161
|
*/
|
|
12425
13162
|
'unicorn/no-useless-coercion'?: Linter.RuleEntry<[]>;
|
|
12426
13163
|
/**
|
|
12427
13164
|
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
12428
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13165
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-collection-argument.md
|
|
12429
13166
|
*/
|
|
12430
13167
|
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
|
|
12431
13168
|
/**
|
|
12432
13169
|
* Disallow useless compound assignments such as `x += 0`.
|
|
12433
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13170
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-compound-assignment.md
|
|
12434
13171
|
*/
|
|
12435
13172
|
'unicorn/no-useless-compound-assignment'?: Linter.RuleEntry<[]>;
|
|
12436
13173
|
/**
|
|
12437
13174
|
* Disallow useless concatenation of literals.
|
|
12438
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13175
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-concat.md
|
|
12439
13176
|
*/
|
|
12440
13177
|
'unicorn/no-useless-concat'?: Linter.RuleEntry<[]>;
|
|
12441
13178
|
/**
|
|
12442
13179
|
* Disallow useless `continue` statements.
|
|
12443
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13180
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-continue.md
|
|
12444
13181
|
*/
|
|
12445
13182
|
'unicorn/no-useless-continue'?: Linter.RuleEntry<[]>;
|
|
12446
13183
|
/**
|
|
12447
13184
|
* Disallow unnecessary existence checks before deletion.
|
|
12448
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13185
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-delete-check.md
|
|
12449
13186
|
*/
|
|
12450
13187
|
'unicorn/no-useless-delete-check'?: Linter.RuleEntry<[]>;
|
|
12451
13188
|
/**
|
|
12452
13189
|
* Disallow `else` after a statement that exits.
|
|
12453
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13190
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-else.md
|
|
12454
13191
|
*/
|
|
12455
13192
|
'unicorn/no-useless-else'?: Linter.RuleEntry<[]>;
|
|
12456
13193
|
/**
|
|
12457
13194
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
12458
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13195
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
12459
13196
|
*/
|
|
12460
13197
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
12461
13198
|
/**
|
|
12462
13199
|
* Disallow useless fallback when spreading in object literals.
|
|
12463
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13200
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
12464
13201
|
*/
|
|
12465
13202
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
12466
13203
|
/**
|
|
12467
13204
|
* Disallow unnecessary `.toArray()` on iterators.
|
|
12468
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13205
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-iterator-to-array.md
|
|
12469
13206
|
*/
|
|
12470
13207
|
'unicorn/no-useless-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
12471
13208
|
/**
|
|
12472
13209
|
* Disallow useless array length check.
|
|
12473
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13210
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-length-check.md
|
|
12474
13211
|
*/
|
|
12475
13212
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
12476
13213
|
/**
|
|
12477
13214
|
* Disallow unnecessary operands in logical expressions involving boolean literals.
|
|
12478
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13215
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-logical-operand.md
|
|
12479
13216
|
*/
|
|
12480
13217
|
'unicorn/no-useless-logical-operand'?: Linter.RuleEntry<[]>;
|
|
12481
13218
|
/**
|
|
12482
13219
|
* Disallow useless overrides of class methods.
|
|
12483
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13220
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-override.md
|
|
12484
13221
|
*/
|
|
12485
13222
|
'unicorn/no-useless-override'?: Linter.RuleEntry<[]>;
|
|
12486
13223
|
/**
|
|
12487
13224
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
12488
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13225
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
12489
13226
|
*/
|
|
12490
13227
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
12491
13228
|
/**
|
|
12492
13229
|
* Disallow redundant re-exports.
|
|
12493
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13230
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-re-export.md
|
|
12494
13231
|
*/
|
|
12495
13232
|
'unicorn/no-useless-re-export'?: Linter.RuleEntry<[]>;
|
|
12496
13233
|
/**
|
|
12497
13234
|
* Disallow simple recursive function calls that can be replaced with a loop.
|
|
12498
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13235
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-recursion.md
|
|
12499
13236
|
*/
|
|
12500
13237
|
'unicorn/no-useless-recursion'?: Linter.RuleEntry<[]>;
|
|
13238
|
+
/**
|
|
13239
|
+
* Disallow unnecessary `Set` construction around `Set` methods.
|
|
13240
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-set-construction.md
|
|
13241
|
+
*/
|
|
13242
|
+
'unicorn/no-useless-set-construction'?: Linter.RuleEntry<[]>;
|
|
12501
13243
|
/**
|
|
12502
13244
|
* Disallow unnecessary spread.
|
|
12503
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13245
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-spread.md
|
|
12504
13246
|
*/
|
|
12505
13247
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
12506
13248
|
/**
|
|
12507
13249
|
* Disallow useless case in switch statements.
|
|
12508
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13250
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-switch-case.md
|
|
12509
13251
|
*/
|
|
12510
13252
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
12511
13253
|
/**
|
|
12512
13254
|
* Disallow useless template literal expressions.
|
|
12513
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13255
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-template-literals.md
|
|
12514
13256
|
*/
|
|
12515
13257
|
'unicorn/no-useless-template-literals'?: Linter.RuleEntry<[]>;
|
|
12516
13258
|
/**
|
|
12517
13259
|
* Disallow useless `undefined`.
|
|
12518
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13260
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-useless-undefined.md
|
|
12519
13261
|
*/
|
|
12520
13262
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
13263
|
+
/**
|
|
13264
|
+
* Disallow returning or exporting resources declared with `using`, including through capturing functions.
|
|
13265
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-using-resource-escape.md
|
|
13266
|
+
*/
|
|
13267
|
+
'unicorn/no-using-resource-escape'?: Linter.RuleEntry<[]>;
|
|
12521
13268
|
/**
|
|
12522
13269
|
* Disallow the bitwise XOR operator where exponentiation was likely intended.
|
|
12523
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13270
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-xor-as-exponentiation.md
|
|
12524
13271
|
*/
|
|
12525
13272
|
'unicorn/no-xor-as-exponentiation'?: Linter.RuleEntry<[]>;
|
|
12526
13273
|
/**
|
|
12527
13274
|
* Disallow number literals with zero fractions or dangling dots.
|
|
12528
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13275
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/no-zero-fractions.md
|
|
12529
13276
|
*/
|
|
12530
13277
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
12531
13278
|
/**
|
|
12532
13279
|
* Enforce proper case for numeric literals.
|
|
12533
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13280
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/number-literal-case.md
|
|
12534
13281
|
*/
|
|
12535
13282
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
12536
13283
|
/**
|
|
12537
13284
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
12538
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13285
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/numeric-separators-style.md
|
|
12539
13286
|
*/
|
|
12540
13287
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
12541
13288
|
/**
|
|
12542
13289
|
* Require assignment operator shorthand where possible.
|
|
12543
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13290
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/operator-assignment.md
|
|
12544
13291
|
*/
|
|
12545
13292
|
'unicorn/operator-assignment'?: Linter.RuleEntry<UnicornOperatorAssignment>;
|
|
12546
13293
|
/**
|
|
12547
13294
|
* Prefer `AbortSignal.any()` over manually forwarding abort events between signals.
|
|
12548
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13295
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-abort-signal-any.md
|
|
12549
13296
|
*/
|
|
12550
13297
|
'unicorn/prefer-abort-signal-any'?: Linter.RuleEntry<[]>;
|
|
12551
13298
|
/**
|
|
12552
13299
|
* Prefer `AbortSignal.timeout()` over manually aborting an `AbortController` with `setTimeout()`.
|
|
12553
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13300
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-abort-signal-timeout.md
|
|
12554
13301
|
*/
|
|
12555
13302
|
'unicorn/prefer-abort-signal-timeout'?: Linter.RuleEntry<[]>;
|
|
12556
13303
|
/**
|
|
12557
13304
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
12558
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13305
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-add-event-listener.md
|
|
12559
13306
|
*/
|
|
12560
13307
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
12561
13308
|
/**
|
|
12562
13309
|
* Prefer an options object over a boolean in `.addEventListener()`.
|
|
12563
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13310
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-add-event-listener-options.md
|
|
12564
13311
|
*/
|
|
12565
13312
|
'unicorn/prefer-add-event-listener-options'?: Linter.RuleEntry<[]>;
|
|
12566
13313
|
/**
|
|
12567
13314
|
* Prefer `AggregateError` when throwing collected errors.
|
|
12568
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13315
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-aggregate-error.md
|
|
12569
13316
|
*/
|
|
12570
13317
|
'unicorn/prefer-aggregate-error'?: Linter.RuleEntry<[]>;
|
|
12571
13318
|
/**
|
|
12572
13319
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
12573
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13320
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-array-find.md
|
|
12574
13321
|
*/
|
|
12575
13322
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
12576
13323
|
/**
|
|
12577
13324
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
12578
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13325
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-array-flat.md
|
|
12579
13326
|
*/
|
|
12580
13327
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
12581
13328
|
/**
|
|
12582
13329
|
* Prefer `.flatMap(…)` over `.map(…).flat()` and `.filter(…).flatMap(…)`.
|
|
12583
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13330
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-array-flat-map.md
|
|
12584
13331
|
*/
|
|
12585
13332
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
12586
13333
|
/**
|
|
12587
|
-
* Prefer `Array.fromAsync()` over
|
|
12588
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13334
|
+
* Prefer `Array.fromAsync()` over array accumulation loops.
|
|
13335
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-array-from-async.md
|
|
12589
13336
|
*/
|
|
12590
13337
|
'unicorn/prefer-array-from-async'?: Linter.RuleEntry<[]>;
|
|
12591
13338
|
/**
|
|
12592
13339
|
* Prefer using the `Array.from()` mapping function argument.
|
|
12593
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13340
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-array-from-map.md
|
|
12594
13341
|
*/
|
|
12595
13342
|
'unicorn/prefer-array-from-map'?: Linter.RuleEntry<[]>;
|
|
12596
13343
|
/**
|
|
12597
13344
|
* Prefer `Array.from({length}, …)` when creating range arrays.
|
|
12598
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13345
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-array-from-range.md
|
|
12599
13346
|
*/
|
|
12600
13347
|
'unicorn/prefer-array-from-range'?: Linter.RuleEntry<[]>;
|
|
12601
13348
|
/**
|
|
12602
13349
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
12603
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13350
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-array-index-of.md
|
|
12604
13351
|
*/
|
|
12605
13352
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
12606
13353
|
/**
|
|
12607
13354
|
* Prefer iterating an array directly or with `Array#keys()` over `Array#entries()` when the index or value is unused.
|
|
12608
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13355
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-array-iterable-methods.md
|
|
12609
13356
|
*/
|
|
12610
13357
|
'unicorn/prefer-array-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
12611
13358
|
/**
|
|
12612
13359
|
* Prefer last-oriented array methods over `Array#reverse()` or `Array#toReversed()` followed by a method.
|
|
12613
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13360
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-array-last-methods.md
|
|
12614
13361
|
*/
|
|
12615
13362
|
'unicorn/prefer-array-last-methods'?: Linter.RuleEntry<[]>;
|
|
12616
13363
|
/**
|
|
12617
13364
|
* Prefer `Array#slice()` over `Array#splice()` when reading from the returned array.
|
|
12618
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13365
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-array-slice.md
|
|
12619
13366
|
*/
|
|
12620
13367
|
'unicorn/prefer-array-slice'?: Linter.RuleEntry<[]>;
|
|
12621
13368
|
/**
|
|
12622
13369
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
12623
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13370
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-array-some.md
|
|
12624
13371
|
*/
|
|
12625
13372
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
12626
13373
|
/**
|
|
12627
13374
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
12628
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13375
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-at.md
|
|
12629
13376
|
*/
|
|
12630
13377
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
12631
13378
|
/**
|
|
12632
13379
|
* Prefer `await` over promise chaining.
|
|
12633
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13380
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-await.md
|
|
12634
13381
|
*/
|
|
12635
13382
|
'unicorn/prefer-await'?: Linter.RuleEntry<[]>;
|
|
12636
13383
|
/**
|
|
12637
13384
|
* Prefer `BigInt` literals over the constructor.
|
|
12638
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13385
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-bigint-literals.md
|
|
12639
13386
|
*/
|
|
12640
13387
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
12641
13388
|
/**
|
|
12642
13389
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
12643
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13390
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
12644
13391
|
*/
|
|
12645
13392
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
12646
13393
|
/**
|
|
12647
13394
|
* Prefer block statements over IIFEs used only for scoping.
|
|
12648
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13395
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-block-statement-over-iife.md
|
|
12649
13396
|
*/
|
|
12650
13397
|
'unicorn/prefer-block-statement-over-iife'?: Linter.RuleEntry<[]>;
|
|
12651
13398
|
/**
|
|
12652
13399
|
* Prefer directly returning boolean expressions over `if` statements.
|
|
12653
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13400
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-boolean-return.md
|
|
12654
13401
|
*/
|
|
12655
13402
|
'unicorn/prefer-boolean-return'?: Linter.RuleEntry<[]>;
|
|
12656
13403
|
/**
|
|
12657
13404
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
12658
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13405
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-class-fields.md
|
|
12659
13406
|
*/
|
|
12660
13407
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
12661
13408
|
/**
|
|
12662
13409
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
12663
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13410
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-classlist-toggle.md
|
|
12664
13411
|
*/
|
|
12665
13412
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
12666
13413
|
/**
|
|
12667
13414
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
12668
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13415
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-code-point.md
|
|
12669
13416
|
*/
|
|
12670
13417
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
12671
13418
|
/**
|
|
12672
|
-
* Prefer
|
|
12673
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13419
|
+
* Prefer combining consecutive guards with identical exit statements.
|
|
13420
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-combined-guards.md
|
|
13421
|
+
*/
|
|
13422
|
+
'unicorn/prefer-combined-guards'?: Linter.RuleEntry<UnicornPreferCombinedGuards>;
|
|
13423
|
+
/**
|
|
13424
|
+
* Prefer early continues over conditionals wrapping the remainder of the loop body.
|
|
13425
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-continue.md
|
|
12674
13426
|
*/
|
|
12675
13427
|
'unicorn/prefer-continue'?: Linter.RuleEntry<UnicornPreferContinue>;
|
|
12676
13428
|
/**
|
|
12677
13429
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
12678
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13430
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-date-now.md
|
|
12679
13431
|
*/
|
|
12680
13432
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
12681
13433
|
/**
|
|
12682
13434
|
* Prefer default parameters over reassignment.
|
|
12683
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13435
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-default-parameters.md
|
|
12684
13436
|
*/
|
|
12685
13437
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
12686
13438
|
/**
|
|
12687
13439
|
* Prefer direct iteration over default iterator method calls.
|
|
12688
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13440
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-direct-iteration.md
|
|
12689
13441
|
*/
|
|
12690
13442
|
'unicorn/prefer-direct-iteration'?: Linter.RuleEntry<[]>;
|
|
12691
13443
|
/**
|
|
12692
13444
|
* Prefer using `using`/`await using` over manual `try`/`finally` resource disposal.
|
|
12693
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13445
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-dispose.md
|
|
12694
13446
|
*/
|
|
12695
13447
|
'unicorn/prefer-dispose'?: Linter.RuleEntry<[]>;
|
|
12696
13448
|
/**
|
|
12697
13449
|
* Prefer `Element#append()` over `Node#appendChild()`.
|
|
12698
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13450
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-dom-node-append.md
|
|
12699
13451
|
*/
|
|
12700
13452
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
12701
13453
|
/**
|
|
12702
13454
|
* Renamed to `unicorn/dom-node-dataset`.
|
|
12703
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13455
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/deleted-and-deprecated-rules.md#prefer-dom-node-dataset
|
|
12704
13456
|
* @deprecated
|
|
12705
13457
|
*/
|
|
12706
13458
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
12707
13459
|
/**
|
|
12708
13460
|
* Prefer `.getHTML()` and `.setHTML()` over `.innerHTML`.
|
|
12709
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13461
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-dom-node-html-methods.md
|
|
12710
13462
|
*/
|
|
12711
13463
|
'unicorn/prefer-dom-node-html-methods'?: Linter.RuleEntry<UnicornPreferDomNodeHtmlMethods>;
|
|
12712
13464
|
/**
|
|
12713
13465
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
12714
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13466
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-dom-node-remove.md
|
|
12715
13467
|
*/
|
|
12716
13468
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
12717
13469
|
/**
|
|
12718
|
-
* Prefer `.replaceChildren()` when
|
|
12719
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13470
|
+
* Prefer `.replaceChildren()` when replacing DOM children.
|
|
13471
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-dom-node-replace-children.md
|
|
12720
13472
|
*/
|
|
12721
13473
|
'unicorn/prefer-dom-node-replace-children'?: Linter.RuleEntry<[]>;
|
|
12722
13474
|
/**
|
|
12723
13475
|
* Prefer `.textContent` over `.innerText`.
|
|
12724
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13476
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
12725
13477
|
*/
|
|
12726
13478
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
12727
13479
|
/**
|
|
12728
|
-
* Prefer early returns over
|
|
12729
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13480
|
+
* Prefer early returns over conditionals wrapping the remainder of the function body.
|
|
13481
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-early-return.md
|
|
12730
13482
|
*/
|
|
12731
13483
|
'unicorn/prefer-early-return'?: Linter.RuleEntry<UnicornPreferEarlyReturn>;
|
|
12732
13484
|
/**
|
|
12733
13485
|
* Prefer `else if` over adjacent `if` statements with related conditions.
|
|
12734
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13486
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-else-if.md
|
|
12735
13487
|
*/
|
|
12736
13488
|
'unicorn/prefer-else-if'?: Linter.RuleEntry<[]>;
|
|
12737
13489
|
/**
|
|
12738
13490
|
* Prefer `Error.isError()` when checking for errors.
|
|
12739
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13491
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-error-is-error.md
|
|
12740
13492
|
*/
|
|
12741
13493
|
'unicorn/prefer-error-is-error'?: Linter.RuleEntry<[]>;
|
|
12742
13494
|
/**
|
|
12743
13495
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
12744
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13496
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-event-target.md
|
|
12745
13497
|
*/
|
|
12746
13498
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
12747
13499
|
/**
|
|
12748
13500
|
* Prefer explicit viewport units.
|
|
12749
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13501
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-explicit-viewport-units.md
|
|
12750
13502
|
*/
|
|
12751
13503
|
'unicorn/prefer-explicit-viewport-units'?: Linter.RuleEntry<UnicornPreferExplicitViewportUnits>;
|
|
12752
13504
|
/**
|
|
12753
13505
|
* Prefer `export…from` when re-exporting.
|
|
12754
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13506
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-export-from.md
|
|
12755
13507
|
*/
|
|
12756
13508
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
12757
13509
|
/**
|
|
12758
13510
|
* Prefer flat `Math.min()` and `Math.max()` calls over nested calls.
|
|
12759
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13511
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-flat-math-min-max.md
|
|
12760
13512
|
*/
|
|
12761
13513
|
'unicorn/prefer-flat-math-min-max'?: Linter.RuleEntry<[]>;
|
|
12762
13514
|
/**
|
|
12763
13515
|
* Prefer `.getOrInsertComputed()` when the default value has side effects.
|
|
12764
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13516
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-get-or-insert-computed.md
|
|
12765
13517
|
*/
|
|
12766
13518
|
'unicorn/prefer-get-or-insert-computed'?: Linter.RuleEntry<[]>;
|
|
12767
13519
|
/**
|
|
12768
13520
|
* Prefer global numeric constants over `Number` static properties.
|
|
12769
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13521
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-global-number-constants.md
|
|
12770
13522
|
*/
|
|
12771
13523
|
'unicorn/prefer-global-number-constants'?: Linter.RuleEntry<[]>;
|
|
12772
13524
|
/**
|
|
12773
13525
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
12774
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13526
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-global-this.md
|
|
12775
13527
|
*/
|
|
12776
13528
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
12777
13529
|
/**
|
|
12778
|
-
* Prefer `Object.groupBy()` or `Map.groupBy()` over
|
|
12779
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13530
|
+
* Prefer `Object.groupBy()` or `Map.groupBy()` over manual grouping.
|
|
13531
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-group-by.md
|
|
12780
13532
|
*/
|
|
12781
13533
|
'unicorn/prefer-group-by'?: Linter.RuleEntry<[]>;
|
|
12782
13534
|
/**
|
|
12783
13535
|
* Prefer `.has()` when checking existence.
|
|
12784
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13536
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-has-check.md
|
|
12785
13537
|
*/
|
|
12786
13538
|
'unicorn/prefer-has-check'?: Linter.RuleEntry<[]>;
|
|
12787
13539
|
/**
|
|
12788
13540
|
* Prefer moving code shared by all branches of an `if` statement out of the branches.
|
|
12789
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13541
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-hoisting-branch-code.md
|
|
12790
13542
|
*/
|
|
12791
13543
|
'unicorn/prefer-hoisting-branch-code'?: Linter.RuleEntry<[]>;
|
|
12792
13544
|
/**
|
|
12793
13545
|
* Prefer HTTPS over HTTP.
|
|
12794
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13546
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-https.md
|
|
12795
13547
|
*/
|
|
12796
13548
|
'unicorn/prefer-https'?: Linter.RuleEntry<UnicornPreferHttps>;
|
|
12797
13549
|
/**
|
|
12798
13550
|
* Prefer identifiers over string literals in import and export specifiers.
|
|
12799
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13551
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-identifier-import-export-specifiers.md
|
|
12800
13552
|
*/
|
|
12801
13553
|
'unicorn/prefer-identifier-import-export-specifiers'?: Linter.RuleEntry<[]>;
|
|
12802
13554
|
/**
|
|
12803
13555
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
12804
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13556
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-import-meta-properties.md
|
|
12805
13557
|
*/
|
|
12806
13558
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
12807
13559
|
/**
|
|
12808
13560
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
12809
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13561
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-includes.md
|
|
12810
13562
|
*/
|
|
12811
13563
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
12812
13564
|
/**
|
|
12813
13565
|
* Prefer `.includes()` over repeated equality comparisons.
|
|
12814
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13566
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-includes-over-repeated-comparisons.md
|
|
12815
13567
|
*/
|
|
12816
13568
|
'unicorn/prefer-includes-over-repeated-comparisons'?: Linter.RuleEntry<UnicornPreferIncludesOverRepeatedComparisons>;
|
|
12817
13569
|
/**
|
|
12818
13570
|
* Prefer passing iterables directly to constructors instead of filling empty collections.
|
|
12819
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13571
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-iterable-in-constructor.md
|
|
12820
13572
|
*/
|
|
12821
13573
|
'unicorn/prefer-iterable-in-constructor'?: Linter.RuleEntry<[]>;
|
|
12822
13574
|
/**
|
|
12823
13575
|
* Prefer `Iterator.concat(…)` over temporary spread arrays.
|
|
12824
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13576
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-iterator-concat.md
|
|
12825
13577
|
*/
|
|
12826
13578
|
'unicorn/prefer-iterator-concat'?: Linter.RuleEntry<[]>;
|
|
12827
13579
|
/**
|
|
12828
13580
|
* Prefer iterator helpers over temporary arrays from iterators.
|
|
12829
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13581
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-iterator-helpers.md
|
|
12830
13582
|
*/
|
|
12831
13583
|
'unicorn/prefer-iterator-helpers'?: Linter.RuleEntry<[]>;
|
|
12832
13584
|
/**
|
|
12833
13585
|
* Prefer `Iterator#toArray()` over temporary arrays from iterator spreads.
|
|
12834
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13586
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-iterator-to-array.md
|
|
12835
13587
|
*/
|
|
12836
13588
|
'unicorn/prefer-iterator-to-array'?: Linter.RuleEntry<[]>;
|
|
12837
13589
|
/**
|
|
12838
13590
|
* Prefer moving `.toArray()` to the end of iterator helper chains.
|
|
12839
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13591
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-iterator-to-array-at-end.md
|
|
12840
13592
|
*/
|
|
12841
13593
|
'unicorn/prefer-iterator-to-array-at-end'?: Linter.RuleEntry<[]>;
|
|
13594
|
+
/**
|
|
13595
|
+
* Prefer `Iterator.zip()` over parallel-array indexing.
|
|
13596
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-iterator-zip.md
|
|
13597
|
+
*/
|
|
13598
|
+
'unicorn/prefer-iterator-zip'?: Linter.RuleEntry<[]>;
|
|
13599
|
+
/**
|
|
13600
|
+
* Prefer JSON imports over reading and parsing JSON files.
|
|
13601
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-json-import.md
|
|
13602
|
+
*/
|
|
13603
|
+
'unicorn/prefer-json-import'?: Linter.RuleEntry<[]>;
|
|
12842
13604
|
/**
|
|
12843
13605
|
* Renamed to `unicorn/consistent-json-file-read`.
|
|
12844
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13606
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/deleted-and-deprecated-rules.md#prefer-json-parse-buffer
|
|
12845
13607
|
* @deprecated
|
|
12846
13608
|
*/
|
|
12847
13609
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
12848
13610
|
/**
|
|
12849
13611
|
* Prefer `KeyboardEvent#key` over deprecated keyboard event properties.
|
|
12850
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13612
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
12851
13613
|
*/
|
|
12852
13614
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
12853
13615
|
/**
|
|
12854
13616
|
* Prefer `location.assign()` over assigning to `location.href`.
|
|
12855
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13617
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-location-assign.md
|
|
12856
13618
|
*/
|
|
12857
13619
|
'unicorn/prefer-location-assign'?: Linter.RuleEntry<[]>;
|
|
12858
13620
|
/**
|
|
12859
13621
|
* Prefer using a logical operator over a ternary.
|
|
12860
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13622
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
12861
13623
|
*/
|
|
12862
13624
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
12863
13625
|
/**
|
|
12864
13626
|
* Prefer `new Map()` over `Object.fromEntries()` when using the result as a map.
|
|
12865
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13627
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-map-from-entries.md
|
|
12866
13628
|
*/
|
|
12867
13629
|
'unicorn/prefer-map-from-entries'?: Linter.RuleEntry<[]>;
|
|
12868
13630
|
/**
|
|
12869
13631
|
* Prefer `Math.abs()` over manual absolute value expressions and symmetric range checks.
|
|
12870
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13632
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-math-abs.md
|
|
12871
13633
|
*/
|
|
12872
13634
|
'unicorn/prefer-math-abs'?: Linter.RuleEntry<[]>;
|
|
12873
13635
|
/**
|
|
12874
13636
|
* Prefer `Math` constants over their approximate numeric values.
|
|
12875
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13637
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-math-constants.md
|
|
12876
13638
|
*/
|
|
12877
13639
|
'unicorn/prefer-math-constants'?: Linter.RuleEntry<[]>;
|
|
12878
13640
|
/**
|
|
12879
13641
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
12880
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13642
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-math-min-max.md
|
|
12881
13643
|
*/
|
|
12882
13644
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
12883
13645
|
/**
|
|
12884
13646
|
* Prefer `Math.trunc()` for truncating numbers.
|
|
12885
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13647
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-math-trunc.md
|
|
12886
13648
|
*/
|
|
12887
13649
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
13650
|
+
/**
|
|
13651
|
+
* Prefer modern media feature range syntax.
|
|
13652
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-media-feature-range-syntax.md
|
|
13653
|
+
*/
|
|
13654
|
+
'unicorn/prefer-media-feature-range-syntax'?: Linter.RuleEntry<[]>;
|
|
12888
13655
|
/**
|
|
12889
13656
|
* Prefer moving ternaries into the minimal varying part of an expression.
|
|
12890
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13657
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-minimal-ternary.md
|
|
12891
13658
|
*/
|
|
12892
13659
|
'unicorn/prefer-minimal-ternary'?: Linter.RuleEntry<UnicornPreferMinimalTernary>;
|
|
12893
13660
|
/**
|
|
12894
13661
|
* Prefer modern DOM APIs.
|
|
12895
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13662
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
12896
13663
|
*/
|
|
12897
13664
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
12898
13665
|
/**
|
|
12899
13666
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
12900
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13667
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-modern-math-apis.md
|
|
12901
13668
|
*/
|
|
12902
13669
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
12903
13670
|
/**
|
|
12904
13671
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
12905
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13672
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-module.md
|
|
12906
13673
|
*/
|
|
12907
13674
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
12908
13675
|
/**
|
|
12909
13676
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
12910
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13677
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
12911
13678
|
*/
|
|
12912
13679
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
12913
13680
|
/**
|
|
12914
13681
|
* Prefer negative index over `.length - index` when possible.
|
|
12915
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13682
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-negative-index.md
|
|
12916
13683
|
*/
|
|
12917
13684
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
12918
13685
|
/**
|
|
12919
13686
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
12920
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13687
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-node-protocol.md
|
|
12921
13688
|
*/
|
|
12922
13689
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
12923
13690
|
/**
|
|
12924
13691
|
* Prefer `Number()` over `parseFloat()` and base-10 `parseInt()`.
|
|
12925
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13692
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-number-coercion.md
|
|
12926
13693
|
*/
|
|
12927
13694
|
'unicorn/prefer-number-coercion'?: Linter.RuleEntry<[]>;
|
|
12928
13695
|
/**
|
|
12929
13696
|
* Prefer `Number.isSafeInteger()` over integer checks.
|
|
12930
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13697
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-number-is-safe-integer.md
|
|
12931
13698
|
*/
|
|
12932
13699
|
'unicorn/prefer-number-is-safe-integer'?: Linter.RuleEntry<[]>;
|
|
12933
13700
|
/**
|
|
12934
13701
|
* Prefer `Number` static methods over global functions and optionally static properties over global constants.
|
|
12935
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13702
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-number-properties.md
|
|
12936
13703
|
*/
|
|
12937
13704
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
12938
13705
|
/**
|
|
12939
13706
|
* Prefer `Object.defineProperties()` over multiple `Object.defineProperty()` calls.
|
|
12940
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13707
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-object-define-properties.md
|
|
12941
13708
|
*/
|
|
12942
13709
|
'unicorn/prefer-object-define-properties'?: Linter.RuleEntry<[]>;
|
|
12943
13710
|
/**
|
|
12944
13711
|
* Prefer object destructuring defaults over default object literals with spread.
|
|
12945
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13712
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-object-destructuring-defaults.md
|
|
12946
13713
|
*/
|
|
12947
13714
|
'unicorn/prefer-object-destructuring-defaults'?: Linter.RuleEntry<[]>;
|
|
12948
13715
|
/**
|
|
12949
13716
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
12950
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13717
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-object-from-entries.md
|
|
12951
13718
|
*/
|
|
12952
13719
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
12953
13720
|
/**
|
|
12954
13721
|
* Prefer the most specific `Object` iterable method.
|
|
12955
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13722
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-object-iterable-methods.md
|
|
12956
13723
|
*/
|
|
12957
13724
|
'unicorn/prefer-object-iterable-methods'?: Linter.RuleEntry<[]>;
|
|
12958
13725
|
/**
|
|
12959
13726
|
* Prefer observer APIs over resize and scroll listeners with layout reads.
|
|
12960
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13727
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-observer-apis.md
|
|
12961
13728
|
*/
|
|
12962
13729
|
'unicorn/prefer-observer-apis'?: Linter.RuleEntry<[]>;
|
|
12963
13730
|
/**
|
|
12964
13731
|
* Prefer omitting the `catch` binding parameter.
|
|
12965
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13732
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
12966
13733
|
*/
|
|
12967
13734
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
12968
13735
|
/**
|
|
12969
13736
|
* Prefer `Path2D` for repeatedly drawn canvas paths.
|
|
12970
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13737
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-path2d.md
|
|
12971
13738
|
*/
|
|
12972
13739
|
'unicorn/prefer-path2d'?: Linter.RuleEntry<[]>;
|
|
12973
13740
|
/**
|
|
12974
13741
|
* Prefer private class fields over the underscore-prefix convention.
|
|
12975
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13742
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-private-class-fields.md
|
|
12976
13743
|
*/
|
|
12977
13744
|
'unicorn/prefer-private-class-fields'?: Linter.RuleEntry<[]>;
|
|
12978
13745
|
/**
|
|
12979
13746
|
* Prefer `Promise.try()` over promise-wrapping boilerplate.
|
|
12980
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13747
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-promise-try.md
|
|
12981
13748
|
*/
|
|
12982
13749
|
'unicorn/prefer-promise-try'?: Linter.RuleEntry<[]>;
|
|
12983
13750
|
/**
|
|
12984
13751
|
* Prefer `Promise.withResolvers()` when extracting resolver functions from `new Promise()`.
|
|
12985
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13752
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-promise-with-resolvers.md
|
|
12986
13753
|
*/
|
|
12987
13754
|
'unicorn/prefer-promise-with-resolvers'?: Linter.RuleEntry<[]>;
|
|
12988
13755
|
/**
|
|
12989
13756
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
12990
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13757
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-prototype-methods.md
|
|
12991
13758
|
*/
|
|
12992
13759
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
12993
13760
|
/**
|
|
12994
13761
|
* Prefer `.querySelector()` and `.querySelectorAll()` over older DOM query methods.
|
|
12995
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13762
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-query-selector.md
|
|
12996
13763
|
*/
|
|
12997
13764
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<UnicornPreferQuerySelector>;
|
|
12998
13765
|
/**
|
|
12999
13766
|
* Prefer `queueMicrotask()` over `process.nextTick()`, `setImmediate()`, and `setTimeout(…, 0)`.
|
|
13000
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13767
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-queue-microtask.md
|
|
13001
13768
|
*/
|
|
13002
13769
|
'unicorn/prefer-queue-microtask'?: Linter.RuleEntry<UnicornPreferQueueMicrotask>;
|
|
13003
13770
|
/**
|
|
13004
13771
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
13005
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13772
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-reflect-apply.md
|
|
13006
13773
|
*/
|
|
13007
13774
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
13008
13775
|
/**
|
|
13009
13776
|
* Prefer `RegExp.escape()` for escaping strings to use in regular expressions.
|
|
13010
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13777
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-regexp-escape.md
|
|
13011
13778
|
*/
|
|
13012
13779
|
'unicorn/prefer-regexp-escape'?: Linter.RuleEntry<[]>;
|
|
13013
13780
|
/**
|
|
13014
13781
|
* Prefer `RegExp#test()` over `String#match()`, `String#search()`, and `RegExp#exec()`.
|
|
13015
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13782
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-regexp-test.md
|
|
13016
13783
|
*/
|
|
13017
13784
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
13018
13785
|
/**
|
|
13019
13786
|
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
13020
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13787
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-response-static-json.md
|
|
13021
13788
|
*/
|
|
13022
13789
|
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
|
|
13023
13790
|
/**
|
|
13024
13791
|
* Prefer `:scope` when using element query selector methods.
|
|
13025
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13792
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-scoped-selector.md
|
|
13026
13793
|
*/
|
|
13027
13794
|
'unicorn/prefer-scoped-selector'?: Linter.RuleEntry<[]>;
|
|
13028
13795
|
/**
|
|
13029
13796
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
13030
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13797
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-set-has.md
|
|
13031
13798
|
*/
|
|
13032
13799
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<UnicornPreferSetHas>;
|
|
13033
13800
|
/**
|
|
13034
13801
|
* Prefer `Set` methods for Set operations.
|
|
13035
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13802
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-set-methods.md
|
|
13036
13803
|
*/
|
|
13037
13804
|
'unicorn/prefer-set-methods'?: Linter.RuleEntry<[]>;
|
|
13038
13805
|
/**
|
|
13039
13806
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
13040
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13807
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-set-size.md
|
|
13041
13808
|
*/
|
|
13042
13809
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
13043
13810
|
/**
|
|
13044
13811
|
* Prefer arrow function properties over methods with a single return.
|
|
13045
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13812
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-short-arrow-method.md
|
|
13046
13813
|
*/
|
|
13047
13814
|
'unicorn/prefer-short-arrow-method'?: Linter.RuleEntry<UnicornPreferShortArrowMethod>;
|
|
13048
13815
|
/**
|
|
13049
13816
|
* Prefer simple conditions first in logical expressions.
|
|
13050
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13817
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-simple-condition-first.md
|
|
13051
13818
|
*/
|
|
13052
13819
|
'unicorn/prefer-simple-condition-first'?: Linter.RuleEntry<[]>;
|
|
13053
13820
|
/**
|
|
13054
13821
|
* Prefer a simple comparison function for `Array#sort()`.
|
|
13055
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13822
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-simple-sort-comparator.md
|
|
13056
13823
|
*/
|
|
13057
13824
|
'unicorn/prefer-simple-sort-comparator'?: Linter.RuleEntry<[]>;
|
|
13058
13825
|
/**
|
|
13059
13826
|
* Prefer simplified conditions.
|
|
13060
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13827
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-simplified-conditions.md
|
|
13061
13828
|
*/
|
|
13062
13829
|
'unicorn/prefer-simplified-conditions'?: Linter.RuleEntry<[]>;
|
|
13063
13830
|
/**
|
|
13064
13831
|
* Prefer a single `Array#some()` or `Array#every()` with a combined predicate.
|
|
13065
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13832
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-single-array-predicate.md
|
|
13066
13833
|
*/
|
|
13067
13834
|
'unicorn/prefer-single-array-predicate'?: Linter.RuleEntry<[]>;
|
|
13068
13835
|
/**
|
|
13069
13836
|
* Enforce combining multiple `Array#{push,unshift}()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
13070
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13837
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-single-call.md
|
|
13071
13838
|
*/
|
|
13072
13839
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
13073
13840
|
/**
|
|
13074
13841
|
* Prefer a single object destructuring declaration per local const source.
|
|
13075
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13842
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-single-object-destructuring.md
|
|
13076
13843
|
*/
|
|
13077
13844
|
'unicorn/prefer-single-object-destructuring'?: Linter.RuleEntry<[]>;
|
|
13078
13845
|
/**
|
|
13079
13846
|
* Enforce combining multiple single-character replacements into a single `String#replaceAll()` with a regular expression.
|
|
13080
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13847
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-single-replace.md
|
|
13081
13848
|
*/
|
|
13082
13849
|
'unicorn/prefer-single-replace'?: Linter.RuleEntry<[]>;
|
|
13083
13850
|
/**
|
|
13084
13851
|
* Prefer declaring variables in the smallest possible scope.
|
|
13085
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13852
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-smaller-scope.md
|
|
13086
13853
|
*/
|
|
13087
13854
|
'unicorn/prefer-smaller-scope'?: Linter.RuleEntry<[]>;
|
|
13088
13855
|
/**
|
|
13089
13856
|
* Prefer `String#split()` with a limit.
|
|
13090
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13857
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-split-limit.md
|
|
13091
13858
|
*/
|
|
13092
13859
|
'unicorn/prefer-split-limit'?: Linter.RuleEntry<[]>;
|
|
13093
13860
|
/**
|
|
13094
13861
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()`, and trivial `for…of` copies.
|
|
13095
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13862
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-spread.md
|
|
13096
13863
|
*/
|
|
13097
13864
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
13098
13865
|
/**
|
|
13099
13866
|
* Prefer `String#matchAll()` over `RegExp#exec()` loops.
|
|
13100
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13867
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-string-match-all.md
|
|
13101
13868
|
*/
|
|
13102
13869
|
'unicorn/prefer-string-match-all'?: Linter.RuleEntry<[]>;
|
|
13103
13870
|
/**
|
|
13104
13871
|
* Prefer `String#padStart()` and `String#padEnd()` over manual string padding.
|
|
13105
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13872
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-string-pad-start-end.md
|
|
13106
13873
|
*/
|
|
13107
13874
|
'unicorn/prefer-string-pad-start-end'?: Linter.RuleEntry<[]>;
|
|
13108
13875
|
/**
|
|
13109
13876
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
13110
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13877
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-string-raw.md
|
|
13111
13878
|
*/
|
|
13112
13879
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
13113
13880
|
/**
|
|
13114
13881
|
* Prefer `String#repeat()` for repeated whitespace.
|
|
13115
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13882
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-string-repeat.md
|
|
13116
13883
|
*/
|
|
13117
13884
|
'unicorn/prefer-string-repeat'?: Linter.RuleEntry<UnicornPreferStringRepeat>;
|
|
13118
13885
|
/**
|
|
13119
13886
|
* Prefer `String#replaceAll()` over regex searches with the global flag and `String#split().join()`.
|
|
13120
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13887
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-string-replace-all.md
|
|
13121
13888
|
*/
|
|
13122
13889
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
13123
13890
|
/**
|
|
13124
13891
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
13125
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13892
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-string-slice.md
|
|
13126
13893
|
*/
|
|
13127
13894
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
13128
13895
|
/**
|
|
13129
13896
|
* Prefer `String#startsWith()` & `String#endsWith()` over regexes, `String#indexOf() === 0`, and slice checks.
|
|
13130
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13897
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
13131
13898
|
*/
|
|
13132
13899
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
13133
13900
|
/**
|
|
13134
13901
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
13135
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13902
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
13136
13903
|
*/
|
|
13137
13904
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
13138
13905
|
/**
|
|
13139
13906
|
* Prefer using `structuredClone` to create a deep clone.
|
|
13140
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13907
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-structured-clone.md
|
|
13141
13908
|
*/
|
|
13142
13909
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
13143
13910
|
/**
|
|
13144
13911
|
* Prefer `switch` over multiple `else-if`.
|
|
13145
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13912
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-switch.md
|
|
13146
13913
|
*/
|
|
13147
13914
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
13148
13915
|
/**
|
|
13149
13916
|
* Prefer `Temporal` over `Date`.
|
|
13150
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13917
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-temporal.md
|
|
13151
13918
|
*/
|
|
13152
13919
|
'unicorn/prefer-temporal'?: Linter.RuleEntry<UnicornPreferTemporal>;
|
|
13920
|
+
/**
|
|
13921
|
+
* Prefer direct Temporal conversion methods.
|
|
13922
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-temporal-conversion.md
|
|
13923
|
+
*/
|
|
13924
|
+
'unicorn/prefer-temporal-conversion'?: Linter.RuleEntry<[]>;
|
|
13153
13925
|
/**
|
|
13154
13926
|
* Prefer ternary expressions over simple `if` statements that return or assign values.
|
|
13155
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13927
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-ternary.md
|
|
13156
13928
|
*/
|
|
13157
13929
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
13158
13930
|
/**
|
|
13159
13931
|
* Prefer `.then().catch()` over `.then(…, …)` for error handling.
|
|
13160
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13932
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-then-catch.md
|
|
13161
13933
|
*/
|
|
13162
13934
|
'unicorn/prefer-then-catch'?: Linter.RuleEntry<[]>;
|
|
13163
13935
|
/**
|
|
13164
13936
|
* Prefer using `Element#toggleAttribute()` to toggle attributes.
|
|
13165
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13937
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-toggle-attribute.md
|
|
13166
13938
|
*/
|
|
13167
13939
|
'unicorn/prefer-toggle-attribute'?: Linter.RuleEntry<[]>;
|
|
13168
13940
|
/**
|
|
13169
13941
|
* Prefer top-level await over top-level promises and async function calls.
|
|
13170
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13942
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-top-level-await.md
|
|
13171
13943
|
*/
|
|
13172
13944
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
13173
13945
|
/**
|
|
13174
13946
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
13175
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13947
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-type-error.md
|
|
13176
13948
|
*/
|
|
13177
13949
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
13178
13950
|
/**
|
|
13179
13951
|
* Require type literals to be last in union types.
|
|
13180
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13952
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-type-literal-last.md
|
|
13181
13953
|
*/
|
|
13182
13954
|
'unicorn/prefer-type-literal-last'?: Linter.RuleEntry<[]>;
|
|
13183
13955
|
/**
|
|
13184
|
-
* Prefer `Uint8Array#toBase64()` and `Uint8Array.fromBase64()` over
|
|
13185
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13956
|
+
* Prefer `Uint8Array#toBase64()` and `Uint8Array.fromBase64()` over legacy base64 conversions and manual postprocessing.
|
|
13957
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-uint8array-base64.md
|
|
13186
13958
|
*/
|
|
13187
13959
|
'unicorn/prefer-uint8array-base64'?: Linter.RuleEntry<[]>;
|
|
13960
|
+
/**
|
|
13961
|
+
* Prefer `Uint8Array#toHex()` and `Uint8Array.fromHex()` over manual and Buffer hex conversions.
|
|
13962
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-uint8array-hex.md
|
|
13963
|
+
*/
|
|
13964
|
+
'unicorn/prefer-uint8array-hex'?: Linter.RuleEntry<[]>;
|
|
13188
13965
|
/**
|
|
13189
13966
|
* Prefer the unary minus operator over multiplying or dividing by `-1`.
|
|
13190
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13967
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-unary-minus.md
|
|
13191
13968
|
*/
|
|
13192
13969
|
'unicorn/prefer-unary-minus'?: Linter.RuleEntry<[]>;
|
|
13193
13970
|
/**
|
|
13194
13971
|
* Prefer Unicode code point escapes over legacy escape sequences.
|
|
13195
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13972
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-unicode-code-point-escapes.md
|
|
13196
13973
|
*/
|
|
13197
13974
|
'unicorn/prefer-unicode-code-point-escapes'?: Linter.RuleEntry<[]>;
|
|
13198
13975
|
/**
|
|
13199
13976
|
* Prefer `URL.canParse()` over constructing a `URL` in a try/catch for validation.
|
|
13200
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13977
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-url-can-parse.md
|
|
13201
13978
|
*/
|
|
13202
13979
|
'unicorn/prefer-url-can-parse'?: Linter.RuleEntry<[]>;
|
|
13203
13980
|
/**
|
|
13204
13981
|
* Prefer `URL#href` over stringifying a `URL`.
|
|
13205
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13982
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-url-href.md
|
|
13206
13983
|
*/
|
|
13207
13984
|
'unicorn/prefer-url-href'?: Linter.RuleEntry<[]>;
|
|
13208
13985
|
/**
|
|
13209
13986
|
* Prefer `URLSearchParams` over manually splitting query strings.
|
|
13210
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13987
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-url-search-parameters.md
|
|
13211
13988
|
*/
|
|
13212
13989
|
'unicorn/prefer-url-search-parameters'?: Linter.RuleEntry<[]>;
|
|
13213
13990
|
/**
|
|
13214
13991
|
* Prefer putting the condition in the while statement.
|
|
13215
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13992
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/prefer-while-loop-condition.md
|
|
13216
13993
|
*/
|
|
13217
13994
|
'unicorn/prefer-while-loop-condition'?: Linter.RuleEntry<[]>;
|
|
13218
13995
|
/**
|
|
13219
13996
|
* Renamed to `unicorn/name-replacements`.
|
|
13220
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
13997
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/deleted-and-deprecated-rules.md#prevent-abbreviations
|
|
13221
13998
|
* @deprecated
|
|
13222
13999
|
*/
|
|
13223
14000
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<[]>;
|
|
13224
14001
|
/**
|
|
13225
14002
|
* Enforce consistent relative URL style.
|
|
13226
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14003
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/relative-url-style.md
|
|
13227
14004
|
*/
|
|
13228
14005
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
13229
14006
|
/**
|
|
13230
14007
|
* Enforce using the separator argument with `Array#join()`.
|
|
13231
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14008
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/require-array-join-separator.md
|
|
13232
14009
|
*/
|
|
13233
14010
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
13234
14011
|
/**
|
|
13235
14012
|
* Require a compare function when calling `Array#sort()` or `Array#toSorted()`.
|
|
13236
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14013
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/require-array-sort-compare.md
|
|
13237
14014
|
*/
|
|
13238
14015
|
'unicorn/require-array-sort-compare'?: Linter.RuleEntry<[]>;
|
|
13239
14016
|
/**
|
|
13240
14017
|
* Require `CSS.escape()` for interpolated values in CSS selectors.
|
|
13241
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14018
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/require-css-escape.md
|
|
13242
14019
|
*/
|
|
13243
14020
|
'unicorn/require-css-escape'?: Linter.RuleEntry<UnicornRequireCssEscape>;
|
|
13244
14021
|
/**
|
|
13245
14022
|
* Require configured YAML frontmatter fields.
|
|
13246
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14023
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/require-frontmatter-fields.md
|
|
13247
14024
|
*/
|
|
13248
14025
|
'unicorn/require-frontmatter-fields'?: Linter.RuleEntry<UnicornRequireFrontmatterFields>;
|
|
13249
14026
|
/**
|
|
13250
14027
|
* Require non-empty module attributes for imports and exports
|
|
13251
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14028
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/require-module-attributes.md
|
|
13252
14029
|
*/
|
|
13253
14030
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
13254
14031
|
/**
|
|
13255
14032
|
* Require non-empty specifier list in import and export statements.
|
|
13256
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14033
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/require-module-specifiers.md
|
|
13257
14034
|
*/
|
|
13258
14035
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
13259
14036
|
/**
|
|
13260
14037
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
13261
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14038
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
13262
14039
|
*/
|
|
13263
14040
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
13264
14041
|
/**
|
|
13265
14042
|
* Require passive event listeners for high-frequency events.
|
|
13266
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14043
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/require-passive-events.md
|
|
13267
14044
|
*/
|
|
13268
14045
|
'unicorn/require-passive-events'?: Linter.RuleEntry<[]>;
|
|
13269
14046
|
/**
|
|
13270
14047
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
13271
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14048
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/require-post-message-target-origin.md
|
|
13272
14049
|
*/
|
|
13273
14050
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
13274
14051
|
/**
|
|
13275
14052
|
* Require boolean-returning Proxy traps to return booleans.
|
|
13276
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14053
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/require-proxy-trap-boolean-return.md
|
|
13277
14054
|
*/
|
|
13278
14055
|
'unicorn/require-proxy-trap-boolean-return'?: Linter.RuleEntry<[]>;
|
|
13279
14056
|
/**
|
|
13280
14057
|
* Enforce a consistent style for single-line block comments.
|
|
13281
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14058
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/single-line-block-comment-style.md
|
|
13282
14059
|
*/
|
|
13283
14060
|
'unicorn/single-line-block-comment-style'?: Linter.RuleEntry<UnicornSingleLineBlockCommentStyle>;
|
|
13284
14061
|
/**
|
|
13285
14062
|
* Enforce better string content.
|
|
13286
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14063
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/string-content.md
|
|
13287
14064
|
*/
|
|
13288
14065
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
13289
14066
|
/**
|
|
13290
14067
|
* Enforce consistent brace style for `case` clauses.
|
|
13291
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14068
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/switch-case-braces.md
|
|
13292
14069
|
*/
|
|
13293
14070
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
13294
14071
|
/**
|
|
13295
14072
|
* Enforce consistent `break`/`return`/`continue`/`throw` position in `case` clauses.
|
|
13296
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14073
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/switch-case-break-position.md
|
|
13297
14074
|
*/
|
|
13298
14075
|
'unicorn/switch-case-break-position'?: Linter.RuleEntry<[]>;
|
|
13299
14076
|
/**
|
|
13300
14077
|
* Fix whitespace-insensitive template indentation.
|
|
13301
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14078
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/template-indent.md
|
|
13302
14079
|
*/
|
|
13303
14080
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
13304
14081
|
/**
|
|
13305
14082
|
* Enforce consistent case for text encoding identifiers.
|
|
13306
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14083
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/text-encoding-identifier-case.md
|
|
13307
14084
|
*/
|
|
13308
14085
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
13309
14086
|
/**
|
|
13310
14087
|
* Require `new` when creating an error.
|
|
13311
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14088
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/throw-new-error.md
|
|
13312
14089
|
*/
|
|
13313
14090
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
13314
14091
|
/**
|
|
13315
14092
|
* Limit the complexity of `try` blocks.
|
|
13316
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
14093
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v76.0.0/docs/rules/try-complexity.md
|
|
13317
14094
|
*/
|
|
13318
14095
|
'unicorn/try-complexity'?: Linter.RuleEntry<UnicornTryComplexity>;
|
|
13319
14096
|
}
|
|
@@ -13435,6 +14212,9 @@ type UnicornFilenameCase = [] | [({
|
|
|
13435
14212
|
})[];
|
|
13436
14213
|
multipleFileExtensions?: boolean;
|
|
13437
14214
|
checkDirectories?: boolean;
|
|
14215
|
+
directoryRoots?: (string | {
|
|
14216
|
+
[k: string]: unknown | undefined;
|
|
14217
|
+
})[];
|
|
13438
14218
|
} | {
|
|
13439
14219
|
cases?: {
|
|
13440
14220
|
camelCase?: boolean;
|
|
@@ -13448,6 +14228,9 @@ type UnicornFilenameCase = [] | [({
|
|
|
13448
14228
|
})[];
|
|
13449
14229
|
multipleFileExtensions?: boolean;
|
|
13450
14230
|
checkDirectories?: boolean;
|
|
14231
|
+
directoryRoots?: (string | {
|
|
14232
|
+
[k: string]: unknown | undefined;
|
|
14233
|
+
})[];
|
|
13451
14234
|
})];
|
|
13452
14235
|
// ----- unicorn/id-match -----
|
|
13453
14236
|
type UnicornIdMatch = [] | [string] | [string, {
|
|
@@ -13534,10 +14317,22 @@ type UnicornNoArrayReverse = [] | [{
|
|
|
13534
14317
|
type UnicornNoArraySort = [] | [{
|
|
13535
14318
|
allowExpressionStatement?: boolean;
|
|
13536
14319
|
}];
|
|
14320
|
+
// ----- unicorn/no-break-in-nested-loop -----
|
|
14321
|
+
type UnicornNoBreakInNestedLoop = [] | [{
|
|
14322
|
+
checkContinue?: boolean;
|
|
14323
|
+
}];
|
|
14324
|
+
// ----- unicorn/no-deprecated-css-features -----
|
|
14325
|
+
type UnicornNoDeprecatedCssFeatures = [] | [{
|
|
14326
|
+
allow?: string[];
|
|
14327
|
+
}];
|
|
13537
14328
|
// ----- unicorn/no-empty-file -----
|
|
13538
14329
|
type UnicornNoEmptyFile = [] | [{
|
|
13539
14330
|
allowComments?: boolean;
|
|
13540
14331
|
}];
|
|
14332
|
+
// ----- unicorn/no-immediate-mutation -----
|
|
14333
|
+
type UnicornNoImmediateMutation = [] | [{
|
|
14334
|
+
checkConditionals?: boolean;
|
|
14335
|
+
}];
|
|
13541
14336
|
// ----- unicorn/no-instanceof-builtins -----
|
|
13542
14337
|
type UnicornNoInstanceofBuiltins = [] | [{
|
|
13543
14338
|
useErrorIsError?: boolean;
|
|
@@ -13578,6 +14373,10 @@ type UnicornNoNull = [] | [{
|
|
|
13578
14373
|
type UnicornNoTypeofUndefined = [] | [{
|
|
13579
14374
|
checkGlobalVariables?: boolean;
|
|
13580
14375
|
}];
|
|
14376
|
+
// ----- unicorn/no-unknown-pseudo-selectors -----
|
|
14377
|
+
type UnicornNoUnknownPseudoSelectors = [] | [{
|
|
14378
|
+
allow?: string[];
|
|
14379
|
+
}];
|
|
13581
14380
|
// ----- unicorn/no-unnecessary-polyfills -----
|
|
13582
14381
|
type UnicornNoUnnecessaryPolyfills = [] | [{
|
|
13583
14382
|
targets?: (string | string[] | {
|
|
@@ -13588,6 +14387,10 @@ type UnicornNoUnnecessaryPolyfills = [] | [{
|
|
|
13588
14387
|
type UnicornNoUnreadableArrayDestructuring = [] | [{
|
|
13589
14388
|
maximumIgnoredElements?: number;
|
|
13590
14389
|
}];
|
|
14390
|
+
// ----- unicorn/no-unscoped-css-nesting-selector -----
|
|
14391
|
+
type UnicornNoUnscopedCssNestingSelector = [] | [{
|
|
14392
|
+
scopingRootAtRules?: string[];
|
|
14393
|
+
}];
|
|
13591
14394
|
// ----- unicorn/no-useless-undefined -----
|
|
13592
14395
|
type UnicornNoUselessUndefined = [] | [{
|
|
13593
14396
|
checkArguments?: boolean;
|
|
@@ -13641,9 +14444,14 @@ type UnicornPreferAt = [] | [{
|
|
|
13641
14444
|
getLastElementFunctions?: string[];
|
|
13642
14445
|
checkAllIndexAccess?: boolean;
|
|
13643
14446
|
}];
|
|
14447
|
+
// ----- unicorn/prefer-combined-guards -----
|
|
14448
|
+
type UnicornPreferCombinedGuards = [] | [{
|
|
14449
|
+
checkCompoundConditions?: boolean;
|
|
14450
|
+
}];
|
|
13644
14451
|
// ----- unicorn/prefer-continue -----
|
|
13645
14452
|
type UnicornPreferContinue = [] | [{
|
|
13646
14453
|
maximumStatements?: number;
|
|
14454
|
+
checkShortBodies?: boolean;
|
|
13647
14455
|
}];
|
|
13648
14456
|
// ----- unicorn/prefer-dom-node-html-methods -----
|
|
13649
14457
|
type UnicornPreferDomNodeHtmlMethods = [] | [{
|
|
@@ -13653,6 +14461,7 @@ type UnicornPreferDomNodeHtmlMethods = [] | [{
|
|
|
13653
14461
|
// ----- unicorn/prefer-early-return -----
|
|
13654
14462
|
type UnicornPreferEarlyReturn = [] | [{
|
|
13655
14463
|
maximumStatements?: number;
|
|
14464
|
+
checkShortBodies?: boolean;
|
|
13656
14465
|
}];
|
|
13657
14466
|
// ----- unicorn/prefer-explicit-viewport-units -----
|
|
13658
14467
|
type UnicornPreferExplicitViewportUnits = [] | [{
|
|
@@ -14234,7 +15043,7 @@ export declare namespace yml {
|
|
|
14234
15043
|
type Rules = RuleOptions;
|
|
14235
15044
|
}
|
|
14236
15045
|
declare namespace config_d_exports {
|
|
14237
|
-
export { e18e, es, ignores, imports, jsdoc, jsonc, jsx, markdown, next, node, perfectionist, react, stylistic, test, ts, unicorn, unusedImports, yml };
|
|
15046
|
+
export { e18e, es, githubActions, ignores, imports, jsdoc, jsonc, jsx, markdown, next, node, perfectionist, react, stylistic, test, ts, unicorn, unusedImports, yml };
|
|
14238
15047
|
}
|
|
14239
15048
|
//#endregion
|
|
14240
15049
|
//#region src/defineConfig.d.ts
|
|
@@ -14252,6 +15061,7 @@ export interface DefineConfigOptions extends ignores.Options {
|
|
|
14252
15061
|
plugins?: undefined | {
|
|
14253
15062
|
'e18e'?: boolean | e18e.Options | undefined;
|
|
14254
15063
|
'es'?: boolean | es.Options | undefined;
|
|
15064
|
+
'github-actions'?: boolean | githubActions.Options | undefined;
|
|
14255
15065
|
'import'?: boolean | imports.Options | undefined;
|
|
14256
15066
|
'jsdoc'?: boolean | jsdoc.Options | undefined;
|
|
14257
15067
|
'jsonc'?: boolean | jsonc.Options | undefined;
|