@jimmy.codes/eslint-config 7.0.0 → 7.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{astro-BI8oXYAa.mjs → astro-qFFNUM9D.mjs} +2 -2
- package/dist/globs.mjs +78 -1
- package/dist/index.d.mts +281 -242
- package/dist/index.mjs +12 -12
- package/dist/{jest-CmNjZKiP.mjs → jest-BYBtWryE.mjs} +2 -2
- package/dist/{nextjs-fAJgoLmK.mjs → nextjs-Q8LOBFAI.mjs} +3 -3
- package/dist/{playwright-BIcLWIGu.mjs → playwright-C7C5OcaE.mjs} +2 -2
- package/dist/{react-BB8TmvhT.mjs → react-BkGA0owG.mjs} +12 -8
- package/dist/{storybook-DgiiyOo_.mjs → storybook-vSHixqw5.mjs} +2 -2
- package/dist/{tanstack-query-B7uegJUc.mjs → tanstack-query-CJMINud2.mjs} +2 -2
- package/dist/{testing-library-DkaPPtoj.mjs → testing-library-DAOq7Q2E.mjs} +2 -2
- package/dist/{typescript-C3EaMK44.mjs → typescript-Cae66DX9.mjs} +2 -2
- package/dist/{vitest-CVJ533UC.mjs → vitest-CHcEa7vN.mjs} +2 -2
- package/package.json +21 -20
- package/dist/globs-Clb0IBKv.mjs +0 -80
- /package/dist/{has-dependency-qBWsE3wC.mjs → has-dependency-B4KAkcAy.mjs} +0 -0
- /package/dist/{interop-default-Bax7ywKG.mjs → interop-default-DtvCAAmD.mjs} +0 -0
package/dist/index.d.mts
CHANGED
|
@@ -221,6 +221,11 @@ interface RuleOptions {
|
|
|
221
221
|
* @see https://eslint.style/rules/eol-last
|
|
222
222
|
*/
|
|
223
223
|
'@stylistic/eol-last'?: Linter.RuleEntry<StylisticEolLast>;
|
|
224
|
+
/**
|
|
225
|
+
* Enforce consistent line break styles for JSX props
|
|
226
|
+
* @see https://eslint.style/rules/jsx-props-style
|
|
227
|
+
*/
|
|
228
|
+
'@stylistic/exp-jsx-props-style'?: Linter.RuleEntry<StylisticExpJsxPropsStyle>;
|
|
224
229
|
/**
|
|
225
230
|
* Enforce consistent spacing and line break styles inside brackets.
|
|
226
231
|
* @see https://eslint.style/rules/list-style
|
|
@@ -1136,7 +1141,7 @@ interface RuleOptions {
|
|
|
1136
1141
|
* Disallow default values that will never be used
|
|
1137
1142
|
* @see https://typescript-eslint.io/rules/no-useless-default-assignment
|
|
1138
1143
|
*/
|
|
1139
|
-
'@typescript-eslint/no-useless-default-assignment'?: Linter.RuleEntry<
|
|
1144
|
+
'@typescript-eslint/no-useless-default-assignment'?: Linter.RuleEntry<TypescriptEslintNoUselessDefaultAssignment>;
|
|
1140
1145
|
/**
|
|
1141
1146
|
* Disallow empty exports that don't change anything in a module file
|
|
1142
1147
|
* @see https://typescript-eslint.io/rules/no-useless-empty-export
|
|
@@ -2233,357 +2238,357 @@ interface RuleOptions {
|
|
|
2233
2238
|
'jest-dom/prefer-to-have-value'?: Linter.RuleEntry<[]>;
|
|
2234
2239
|
/**
|
|
2235
2240
|
* Enforce `test` and `it` usage conventions
|
|
2236
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2241
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/consistent-test-it.md
|
|
2237
2242
|
*/
|
|
2238
2243
|
'jest/consistent-test-it'?: Linter.RuleEntry<JestConsistentTestIt>;
|
|
2239
2244
|
/**
|
|
2240
2245
|
* Enforce assertion to be made in a test body
|
|
2241
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2246
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/expect-expect.md
|
|
2242
2247
|
*/
|
|
2243
2248
|
'jest/expect-expect'?: Linter.RuleEntry<JestExpectExpect>;
|
|
2244
2249
|
/**
|
|
2245
2250
|
* Enforces a maximum number assertion calls in a test body
|
|
2246
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2251
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/max-expects.md
|
|
2247
2252
|
*/
|
|
2248
2253
|
'jest/max-expects'?: Linter.RuleEntry<JestMaxExpects>;
|
|
2249
2254
|
/**
|
|
2250
2255
|
* Enforces a maximum depth to nested describe calls
|
|
2251
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2256
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/max-nested-describe.md
|
|
2252
2257
|
*/
|
|
2253
2258
|
'jest/max-nested-describe'?: Linter.RuleEntry<JestMaxNestedDescribe>;
|
|
2254
2259
|
/**
|
|
2255
2260
|
* Disallow alias methods
|
|
2256
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2261
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/no-alias-methods.md
|
|
2257
2262
|
*/
|
|
2258
2263
|
'jest/no-alias-methods'?: Linter.RuleEntry<[]>;
|
|
2259
2264
|
/**
|
|
2260
2265
|
* Disallow commented out tests
|
|
2261
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2266
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/no-commented-out-tests.md
|
|
2262
2267
|
*/
|
|
2263
2268
|
'jest/no-commented-out-tests'?: Linter.RuleEntry<[]>;
|
|
2264
2269
|
/**
|
|
2265
2270
|
* Disallow calling `expect` conditionally
|
|
2266
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2271
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/no-conditional-expect.md
|
|
2267
2272
|
*/
|
|
2268
2273
|
'jest/no-conditional-expect'?: Linter.RuleEntry<[]>;
|
|
2269
2274
|
/**
|
|
2270
2275
|
* Disallow conditional logic in tests
|
|
2271
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2276
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/no-conditional-in-test.md
|
|
2272
2277
|
*/
|
|
2273
2278
|
'jest/no-conditional-in-test'?: Linter.RuleEntry<[]>;
|
|
2274
2279
|
/**
|
|
2275
2280
|
* Disallow confusing usages of jest.setTimeout
|
|
2276
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2281
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/no-confusing-set-timeout.md
|
|
2277
2282
|
*/
|
|
2278
2283
|
'jest/no-confusing-set-timeout'?: Linter.RuleEntry<[]>;
|
|
2279
2284
|
/**
|
|
2280
2285
|
* Disallow use of deprecated functions
|
|
2281
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2286
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/no-deprecated-functions.md
|
|
2282
2287
|
*/
|
|
2283
2288
|
'jest/no-deprecated-functions'?: Linter.RuleEntry<[]>;
|
|
2284
2289
|
/**
|
|
2285
2290
|
* Disallow disabled tests
|
|
2286
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2291
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/no-disabled-tests.md
|
|
2287
2292
|
*/
|
|
2288
2293
|
'jest/no-disabled-tests'?: Linter.RuleEntry<[]>;
|
|
2289
2294
|
/**
|
|
2290
2295
|
* Disallow using a callback in asynchronous tests and hooks
|
|
2291
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2296
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/no-done-callback.md
|
|
2292
2297
|
*/
|
|
2293
2298
|
'jest/no-done-callback'?: Linter.RuleEntry<[]>;
|
|
2294
2299
|
/**
|
|
2295
2300
|
* Disallow duplicate setup and teardown hooks
|
|
2296
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2301
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/no-duplicate-hooks.md
|
|
2297
2302
|
*/
|
|
2298
2303
|
'jest/no-duplicate-hooks'?: Linter.RuleEntry<[]>;
|
|
2299
2304
|
/**
|
|
2300
2305
|
* Disallow using equality matchers on error types
|
|
2301
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2306
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/no-error-equal.md
|
|
2302
2307
|
*/
|
|
2303
2308
|
'jest/no-error-equal'?: Linter.RuleEntry<[]>;
|
|
2304
2309
|
/**
|
|
2305
2310
|
* Disallow using `exports` in files containing tests
|
|
2306
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2311
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/no-export.md
|
|
2307
2312
|
*/
|
|
2308
2313
|
'jest/no-export'?: Linter.RuleEntry<[]>;
|
|
2309
2314
|
/**
|
|
2310
2315
|
* Disallow focused tests
|
|
2311
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2316
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/no-focused-tests.md
|
|
2312
2317
|
*/
|
|
2313
2318
|
'jest/no-focused-tests'?: Linter.RuleEntry<[]>;
|
|
2314
2319
|
/**
|
|
2315
2320
|
* Disallow setup and teardown hooks
|
|
2316
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2321
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/no-hooks.md
|
|
2317
2322
|
*/
|
|
2318
2323
|
'jest/no-hooks'?: Linter.RuleEntry<JestNoHooks>;
|
|
2319
2324
|
/**
|
|
2320
2325
|
* Disallow identical titles
|
|
2321
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2326
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/no-identical-title.md
|
|
2322
2327
|
*/
|
|
2323
2328
|
'jest/no-identical-title'?: Linter.RuleEntry<[]>;
|
|
2324
2329
|
/**
|
|
2325
2330
|
* Disallow string interpolation inside snapshots
|
|
2326
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2331
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/no-interpolation-in-snapshots.md
|
|
2327
2332
|
*/
|
|
2328
2333
|
'jest/no-interpolation-in-snapshots'?: Linter.RuleEntry<[]>;
|
|
2329
2334
|
/**
|
|
2330
2335
|
* Disallow Jasmine globals
|
|
2331
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2336
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/no-jasmine-globals.md
|
|
2332
2337
|
*/
|
|
2333
2338
|
'jest/no-jasmine-globals'?: Linter.RuleEntry<[]>;
|
|
2334
2339
|
/**
|
|
2335
2340
|
* Disallow large snapshots
|
|
2336
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2341
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/no-large-snapshots.md
|
|
2337
2342
|
*/
|
|
2338
2343
|
'jest/no-large-snapshots'?: Linter.RuleEntry<JestNoLargeSnapshots>;
|
|
2339
2344
|
/**
|
|
2340
2345
|
* Disallow manually importing from `__mocks__`
|
|
2341
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2346
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/no-mocks-import.md
|
|
2342
2347
|
*/
|
|
2343
2348
|
'jest/no-mocks-import'?: Linter.RuleEntry<[]>;
|
|
2344
2349
|
/**
|
|
2345
2350
|
* Disallow specific `jest.` methods
|
|
2346
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2351
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/no-restricted-jest-methods.md
|
|
2347
2352
|
*/
|
|
2348
2353
|
'jest/no-restricted-jest-methods'?: Linter.RuleEntry<JestNoRestrictedJestMethods>;
|
|
2349
2354
|
/**
|
|
2350
2355
|
* Disallow specific matchers & modifiers
|
|
2351
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2356
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/no-restricted-matchers.md
|
|
2352
2357
|
*/
|
|
2353
2358
|
'jest/no-restricted-matchers'?: Linter.RuleEntry<JestNoRestrictedMatchers>;
|
|
2354
2359
|
/**
|
|
2355
2360
|
* Disallow using `expect` outside of `it` or `test` blocks
|
|
2356
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2361
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/no-standalone-expect.md
|
|
2357
2362
|
*/
|
|
2358
2363
|
'jest/no-standalone-expect'?: Linter.RuleEntry<JestNoStandaloneExpect>;
|
|
2359
2364
|
/**
|
|
2360
2365
|
* Require using `.only` and `.skip` over `f` and `x`
|
|
2361
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2366
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/no-test-prefixes.md
|
|
2362
2367
|
*/
|
|
2363
2368
|
'jest/no-test-prefixes'?: Linter.RuleEntry<[]>;
|
|
2364
2369
|
/**
|
|
2365
2370
|
* Disallow explicitly returning from tests
|
|
2366
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2371
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/no-test-return-statement.md
|
|
2367
2372
|
*/
|
|
2368
2373
|
'jest/no-test-return-statement'?: Linter.RuleEntry<[]>;
|
|
2369
2374
|
/**
|
|
2370
2375
|
* Disallow unnecessary assertions based on types
|
|
2371
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2376
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/no-unnecessary-assertion.md
|
|
2372
2377
|
*/
|
|
2373
2378
|
'jest/no-unnecessary-assertion'?: Linter.RuleEntry<[]>;
|
|
2374
2379
|
/**
|
|
2375
2380
|
* Disallow unnecessary async function wrapper for expected promises
|
|
2376
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2381
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/no-unneeded-async-expect-function.md
|
|
2377
2382
|
*/
|
|
2378
2383
|
'jest/no-unneeded-async-expect-function'?: Linter.RuleEntry<[]>;
|
|
2379
2384
|
/**
|
|
2380
2385
|
* Disallow using `jest.mock()` factories without an explicit type parameter
|
|
2381
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2386
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/no-untyped-mock-factory.md
|
|
2382
2387
|
*/
|
|
2383
2388
|
'jest/no-untyped-mock-factory'?: Linter.RuleEntry<[]>;
|
|
2384
2389
|
/**
|
|
2385
2390
|
* Enforce padding around `afterAll` blocks
|
|
2386
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2391
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/padding-around-after-all-blocks.md
|
|
2387
2392
|
*/
|
|
2388
2393
|
'jest/padding-around-after-all-blocks'?: Linter.RuleEntry<[]>;
|
|
2389
2394
|
/**
|
|
2390
2395
|
* Enforce padding around `afterEach` blocks
|
|
2391
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2396
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/padding-around-after-each-blocks.md
|
|
2392
2397
|
*/
|
|
2393
2398
|
'jest/padding-around-after-each-blocks'?: Linter.RuleEntry<[]>;
|
|
2394
2399
|
/**
|
|
2395
2400
|
* Enforce padding around Jest functions
|
|
2396
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2401
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/padding-around-all.md
|
|
2397
2402
|
*/
|
|
2398
2403
|
'jest/padding-around-all'?: Linter.RuleEntry<[]>;
|
|
2399
2404
|
/**
|
|
2400
2405
|
* Enforce padding around `beforeAll` blocks
|
|
2401
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2406
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/padding-around-before-all-blocks.md
|
|
2402
2407
|
*/
|
|
2403
2408
|
'jest/padding-around-before-all-blocks'?: Linter.RuleEntry<[]>;
|
|
2404
2409
|
/**
|
|
2405
2410
|
* Enforce padding around `beforeEach` blocks
|
|
2406
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2411
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/padding-around-before-each-blocks.md
|
|
2407
2412
|
*/
|
|
2408
2413
|
'jest/padding-around-before-each-blocks'?: Linter.RuleEntry<[]>;
|
|
2409
2414
|
/**
|
|
2410
2415
|
* Enforce padding around `describe` blocks
|
|
2411
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2416
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/padding-around-describe-blocks.md
|
|
2412
2417
|
*/
|
|
2413
2418
|
'jest/padding-around-describe-blocks'?: Linter.RuleEntry<[]>;
|
|
2414
2419
|
/**
|
|
2415
2420
|
* Enforce padding around `expect` groups
|
|
2416
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2421
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/padding-around-expect-groups.md
|
|
2417
2422
|
*/
|
|
2418
2423
|
'jest/padding-around-expect-groups'?: Linter.RuleEntry<[]>;
|
|
2419
2424
|
/**
|
|
2420
2425
|
* Enforce padding around `test` and `it` blocks
|
|
2421
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2426
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/padding-around-test-blocks.md
|
|
2422
2427
|
*/
|
|
2423
2428
|
'jest/padding-around-test-blocks'?: Linter.RuleEntry<[]>;
|
|
2424
2429
|
/**
|
|
2425
2430
|
* Suggest using `toHaveBeenCalledWith()`
|
|
2426
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2431
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/prefer-called-with.md
|
|
2427
2432
|
*/
|
|
2428
2433
|
'jest/prefer-called-with'?: Linter.RuleEntry<[]>;
|
|
2429
2434
|
/**
|
|
2430
2435
|
* Suggest using the built-in comparison matchers
|
|
2431
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2436
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/prefer-comparison-matcher.md
|
|
2432
2437
|
*/
|
|
2433
2438
|
'jest/prefer-comparison-matcher'?: Linter.RuleEntry<[]>;
|
|
2434
2439
|
/**
|
|
2435
2440
|
* Prefer using `.each` rather than manual loops
|
|
2436
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2441
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/prefer-each.md
|
|
2437
2442
|
*/
|
|
2438
2443
|
'jest/prefer-each'?: Linter.RuleEntry<[]>;
|
|
2439
2444
|
/**
|
|
2440
2445
|
* Prefer having the last statement in a test be an assertion
|
|
2441
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2446
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/prefer-ending-with-an-expect.md
|
|
2442
2447
|
*/
|
|
2443
2448
|
'jest/prefer-ending-with-an-expect'?: Linter.RuleEntry<JestPreferEndingWithAnExpect>;
|
|
2444
2449
|
/**
|
|
2445
2450
|
* Suggest using the built-in equality matchers
|
|
2446
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2451
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/prefer-equality-matcher.md
|
|
2447
2452
|
*/
|
|
2448
2453
|
'jest/prefer-equality-matcher'?: Linter.RuleEntry<[]>;
|
|
2449
2454
|
/**
|
|
2450
2455
|
* Suggest using `expect.assertions()` OR `expect.hasAssertions()`
|
|
2451
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2456
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/prefer-expect-assertions.md
|
|
2452
2457
|
*/
|
|
2453
2458
|
'jest/prefer-expect-assertions'?: Linter.RuleEntry<JestPreferExpectAssertions>;
|
|
2454
2459
|
/**
|
|
2455
2460
|
* Prefer `await expect(...).resolves` over `expect(await ...)` syntax
|
|
2456
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2461
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/prefer-expect-resolves.md
|
|
2457
2462
|
*/
|
|
2458
2463
|
'jest/prefer-expect-resolves'?: Linter.RuleEntry<[]>;
|
|
2459
2464
|
/**
|
|
2460
2465
|
* Prefer having hooks in a consistent order
|
|
2461
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2466
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/prefer-hooks-in-order.md
|
|
2462
2467
|
*/
|
|
2463
2468
|
'jest/prefer-hooks-in-order'?: Linter.RuleEntry<[]>;
|
|
2464
2469
|
/**
|
|
2465
2470
|
* Suggest having hooks before any test cases
|
|
2466
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2471
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/prefer-hooks-on-top.md
|
|
2467
2472
|
*/
|
|
2468
2473
|
'jest/prefer-hooks-on-top'?: Linter.RuleEntry<[]>;
|
|
2469
2474
|
/**
|
|
2470
2475
|
* Prefer importing Jest globals
|
|
2471
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2476
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/prefer-importing-jest-globals.md
|
|
2472
2477
|
*/
|
|
2473
2478
|
'jest/prefer-importing-jest-globals'?: Linter.RuleEntry<JestPreferImportingJestGlobals>;
|
|
2474
2479
|
/**
|
|
2475
2480
|
* Prefer `jest.mocked()` over `fn as jest.Mock`
|
|
2476
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2481
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/prefer-jest-mocked.md
|
|
2477
2482
|
*/
|
|
2478
2483
|
'jest/prefer-jest-mocked'?: Linter.RuleEntry<[]>;
|
|
2479
2484
|
/**
|
|
2480
2485
|
* Enforce lowercase test names
|
|
2481
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2486
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/prefer-lowercase-title.md
|
|
2482
2487
|
*/
|
|
2483
2488
|
'jest/prefer-lowercase-title'?: Linter.RuleEntry<JestPreferLowercaseTitle>;
|
|
2484
2489
|
/**
|
|
2485
2490
|
* Prefer mock resolved/rejected shorthands for promises
|
|
2486
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2491
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/prefer-mock-promise-shorthand.md
|
|
2487
2492
|
*/
|
|
2488
2493
|
'jest/prefer-mock-promise-shorthand'?: Linter.RuleEntry<[]>;
|
|
2489
2494
|
/**
|
|
2490
2495
|
* Prefer mock return shorthands
|
|
2491
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2496
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/prefer-mock-return-shorthand.md
|
|
2492
2497
|
*/
|
|
2493
2498
|
'jest/prefer-mock-return-shorthand'?: Linter.RuleEntry<[]>;
|
|
2494
2499
|
/**
|
|
2495
2500
|
* Prefer including a hint with external snapshots
|
|
2496
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2501
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/prefer-snapshot-hint.md
|
|
2497
2502
|
*/
|
|
2498
2503
|
'jest/prefer-snapshot-hint'?: Linter.RuleEntry<JestPreferSnapshotHint>;
|
|
2499
2504
|
/**
|
|
2500
2505
|
* Suggest using `jest.spyOn()`
|
|
2501
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2506
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/prefer-spy-on.md
|
|
2502
2507
|
*/
|
|
2503
2508
|
'jest/prefer-spy-on'?: Linter.RuleEntry<[]>;
|
|
2504
2509
|
/**
|
|
2505
2510
|
* Suggest using `toStrictEqual()`
|
|
2506
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2511
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/prefer-strict-equal.md
|
|
2507
2512
|
*/
|
|
2508
2513
|
'jest/prefer-strict-equal'?: Linter.RuleEntry<[]>;
|
|
2509
2514
|
/**
|
|
2510
2515
|
* Suggest using `toBe()` for primitive literals
|
|
2511
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2516
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/prefer-to-be.md
|
|
2512
2517
|
*/
|
|
2513
2518
|
'jest/prefer-to-be'?: Linter.RuleEntry<[]>;
|
|
2514
2519
|
/**
|
|
2515
2520
|
* Suggest using `toContain()`
|
|
2516
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2521
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/prefer-to-contain.md
|
|
2517
2522
|
*/
|
|
2518
2523
|
'jest/prefer-to-contain'?: Linter.RuleEntry<[]>;
|
|
2519
2524
|
/**
|
|
2520
2525
|
* Suggest using `toHaveBeenCalled`
|
|
2521
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2526
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/prefer-to-have-been-called.md
|
|
2522
2527
|
*/
|
|
2523
2528
|
'jest/prefer-to-have-been-called'?: Linter.RuleEntry<[]>;
|
|
2524
2529
|
/**
|
|
2525
2530
|
* Suggest using `toHaveBeenCalledTimes()`
|
|
2526
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2531
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/prefer-to-have-been-called-times.md
|
|
2527
2532
|
*/
|
|
2528
2533
|
'jest/prefer-to-have-been-called-times'?: Linter.RuleEntry<[]>;
|
|
2529
2534
|
/**
|
|
2530
2535
|
* Suggest using `toHaveLength()`
|
|
2531
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2536
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/prefer-to-have-length.md
|
|
2532
2537
|
*/
|
|
2533
2538
|
'jest/prefer-to-have-length'?: Linter.RuleEntry<[]>;
|
|
2534
2539
|
/**
|
|
2535
2540
|
* Suggest using `test.todo`
|
|
2536
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2541
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/prefer-todo.md
|
|
2537
2542
|
*/
|
|
2538
2543
|
'jest/prefer-todo'?: Linter.RuleEntry<[]>;
|
|
2539
2544
|
/**
|
|
2540
2545
|
* Require setup and teardown code to be within a hook
|
|
2541
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2546
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/require-hook.md
|
|
2542
2547
|
*/
|
|
2543
2548
|
'jest/require-hook'?: Linter.RuleEntry<JestRequireHook>;
|
|
2544
2549
|
/**
|
|
2545
2550
|
* Require a message for `toThrow()`
|
|
2546
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2551
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/require-to-throw-message.md
|
|
2547
2552
|
*/
|
|
2548
2553
|
'jest/require-to-throw-message'?: Linter.RuleEntry<[]>;
|
|
2549
2554
|
/**
|
|
2550
2555
|
* Require test cases and hooks to be inside a `describe` block
|
|
2551
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2556
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/require-top-level-describe.md
|
|
2552
2557
|
*/
|
|
2553
2558
|
'jest/require-top-level-describe'?: Linter.RuleEntry<JestRequireTopLevelDescribe>;
|
|
2554
2559
|
/**
|
|
2555
2560
|
* Enforce unbound methods are called with their expected scope
|
|
2556
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2561
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/unbound-method.md
|
|
2557
2562
|
*/
|
|
2558
2563
|
'jest/unbound-method'?: Linter.RuleEntry<JestUnboundMethod>;
|
|
2559
2564
|
/**
|
|
2560
2565
|
* Enforce valid `describe()` callback
|
|
2561
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2566
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/valid-describe-callback.md
|
|
2562
2567
|
*/
|
|
2563
2568
|
'jest/valid-describe-callback'?: Linter.RuleEntry<[]>;
|
|
2564
2569
|
/**
|
|
2565
2570
|
* Enforce valid `expect()` usage
|
|
2566
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2571
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/valid-expect.md
|
|
2567
2572
|
*/
|
|
2568
2573
|
'jest/valid-expect'?: Linter.RuleEntry<JestValidExpect>;
|
|
2569
2574
|
/**
|
|
2570
2575
|
* Require promises that have expectations in their chain to be valid
|
|
2571
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2576
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/valid-expect-in-promise.md
|
|
2572
2577
|
*/
|
|
2573
2578
|
'jest/valid-expect-in-promise'?: Linter.RuleEntry<[]>;
|
|
2574
2579
|
/**
|
|
2575
2580
|
* Require that `resolve` and `reject` modifiers are present (and only) for promise-like types
|
|
2576
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2581
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/valid-expect-with-promise.md
|
|
2577
2582
|
*/
|
|
2578
2583
|
'jest/valid-expect-with-promise'?: Linter.RuleEntry<[]>;
|
|
2579
2584
|
/**
|
|
2580
2585
|
* Disallow mocking of non-existing module paths
|
|
2581
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2586
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/valid-mock-module-path.md
|
|
2582
2587
|
*/
|
|
2583
2588
|
'jest/valid-mock-module-path'?: Linter.RuleEntry<JestValidMockModulePath>;
|
|
2584
2589
|
/**
|
|
2585
2590
|
* Enforce valid titles
|
|
2586
|
-
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
2591
|
+
* @see https://github.com/jest-community/eslint-plugin-jest/blob/v29.13.0/docs/rules/valid-title.md
|
|
2587
2592
|
*/
|
|
2588
2593
|
'jest/valid-title'?: Linter.RuleEntry<JestValidTitle>;
|
|
2589
2594
|
/**
|
|
@@ -4748,6 +4753,7 @@ interface RuleOptions {
|
|
|
4748
4753
|
'playwright/valid-expect-in-promise'?: Linter.RuleEntry<[]>;
|
|
4749
4754
|
/**
|
|
4750
4755
|
* Enforce valid tag format in Playwright test blocks and titles
|
|
4756
|
+
* @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/valid-test-tags.md
|
|
4751
4757
|
*/
|
|
4752
4758
|
'playwright/valid-test-tags'?: Linter.RuleEntry<PlaywrightValidTestTags>;
|
|
4753
4759
|
/**
|
|
@@ -4918,7 +4924,7 @@ interface RuleOptions {
|
|
|
4918
4924
|
*/
|
|
4919
4925
|
'react-dom/no-unknown-property'?: Linter.RuleEntry<ReactDomNoUnknownProperty>;
|
|
4920
4926
|
/**
|
|
4921
|
-
* Enforces 'sandbox' attribute for 'iframe' elements is not set to unsafe combinations.
|
|
4927
|
+
* Enforces that the 'sandbox' attribute for 'iframe' elements is not set to unsafe combinations.
|
|
4922
4928
|
* @see https://eslint-react.xyz/docs/rules/dom-no-unsafe-iframe-sandbox
|
|
4923
4929
|
*/
|
|
4924
4930
|
'react-dom/no-unsafe-iframe-sandbox'?: Linter.RuleEntry<[]>;
|
|
@@ -5096,6 +5102,11 @@ interface RuleOptions {
|
|
|
5096
5102
|
*/
|
|
5097
5103
|
'react-naming-convention/use-state'?: Linter.RuleEntry<ReactNamingConventionUseState>;
|
|
5098
5104
|
'react-refresh/only-export-components'?: Linter.RuleEntry<ReactRefreshOnlyExportComponents>;
|
|
5105
|
+
/**
|
|
5106
|
+
* Validate and transform React Client/Server Function definitions.
|
|
5107
|
+
* @see https://eslint-react.xyz/docs/rules/function-definition
|
|
5108
|
+
*/
|
|
5109
|
+
'react-rsc/function-definition'?: Linter.RuleEntry<[]>;
|
|
5099
5110
|
/**
|
|
5100
5111
|
* Enforces that every 'addEventListener' in a component or custom hook has a corresponding 'removeEventListener'.
|
|
5101
5112
|
* @see https://eslint-react.xyz/docs/rules/web-api-no-leaked-event-listener
|
|
@@ -5117,12 +5128,12 @@ interface RuleOptions {
|
|
|
5117
5128
|
*/
|
|
5118
5129
|
'react-web-api/no-leaked-timeout'?: Linter.RuleEntry<[]>;
|
|
5119
5130
|
/**
|
|
5120
|
-
* Prevents unnecessary
|
|
5131
|
+
* Prevents unnecessary '$' symbols before JSX expressions.
|
|
5121
5132
|
* @see https://eslint-react.xyz/docs/rules/jsx-dollar
|
|
5122
5133
|
*/
|
|
5123
5134
|
'react-x/jsx-dollar'?: Linter.RuleEntry<[]>;
|
|
5124
5135
|
/**
|
|
5125
|
-
* Enforces
|
|
5136
|
+
* Enforces 'key' prop placement before spread props.
|
|
5126
5137
|
* @see https://eslint-react.xyz/docs/rules/jsx-key-before-spread
|
|
5127
5138
|
*/
|
|
5128
5139
|
'react-x/jsx-key-before-spread'?: Linter.RuleEntry<[]>;
|
|
@@ -5137,7 +5148,7 @@ interface RuleOptions {
|
|
|
5137
5148
|
*/
|
|
5138
5149
|
'react-x/jsx-no-duplicate-props'?: Linter.RuleEntry<[]>;
|
|
5139
5150
|
/**
|
|
5140
|
-
* Disallows
|
|
5151
|
+
* Disallows immediately-invoked function expressions in JSX.
|
|
5141
5152
|
* @see https://eslint-react.xyz/docs/rules/jsx-no-iife
|
|
5142
5153
|
*/
|
|
5143
5154
|
'react-x/jsx-no-iife'?: Linter.RuleEntry<[]>;
|
|
@@ -5147,12 +5158,12 @@ interface RuleOptions {
|
|
|
5147
5158
|
*/
|
|
5148
5159
|
'react-x/jsx-no-undef'?: Linter.RuleEntry<[]>;
|
|
5149
5160
|
/**
|
|
5150
|
-
* Enforces
|
|
5161
|
+
* Enforces shorthand syntax for boolean props.
|
|
5151
5162
|
* @see https://eslint-react.xyz/docs/rules/jsx-shorthand-boolean
|
|
5152
5163
|
*/
|
|
5153
5164
|
'react-x/jsx-shorthand-boolean'?: Linter.RuleEntry<ReactXJsxShorthandBoolean>;
|
|
5154
5165
|
/**
|
|
5155
|
-
* Enforces
|
|
5166
|
+
* Enforces shorthand syntax for fragment elements.
|
|
5156
5167
|
* @see https://eslint-react.xyz/docs/rules/jsx-shorthand-fragment
|
|
5157
5168
|
*/
|
|
5158
5169
|
'react-x/jsx-shorthand-fragment'?: Linter.RuleEntry<ReactXJsxShorthandFragment>;
|
|
@@ -5162,7 +5173,7 @@ interface RuleOptions {
|
|
|
5162
5173
|
*/
|
|
5163
5174
|
'react-x/jsx-uses-react'?: Linter.RuleEntry<[]>;
|
|
5164
5175
|
/**
|
|
5165
|
-
* Marks
|
|
5176
|
+
* Marks JSX element variables as used.
|
|
5166
5177
|
* @see https://eslint-react.xyz/docs/rules/jsx-uses-vars
|
|
5167
5178
|
*/
|
|
5168
5179
|
'react-x/jsx-uses-vars'?: Linter.RuleEntry<[]>;
|
|
@@ -5268,7 +5279,7 @@ interface RuleOptions {
|
|
|
5268
5279
|
*/
|
|
5269
5280
|
'react-x/no-forward-ref'?: Linter.RuleEntry<[]>;
|
|
5270
5281
|
/**
|
|
5271
|
-
* Prevents
|
|
5282
|
+
* Prevents implicitly passing the 'key' prop to components.
|
|
5272
5283
|
* @see https://eslint-react.xyz/docs/rules/no-implicit-key
|
|
5273
5284
|
*/
|
|
5274
5285
|
'react-x/no-implicit-key'?: Linter.RuleEntry<[]>;
|
|
@@ -5278,12 +5289,12 @@ interface RuleOptions {
|
|
|
5278
5289
|
*/
|
|
5279
5290
|
'react-x/no-leaked-conditional-rendering'?: Linter.RuleEntry<[]>;
|
|
5280
5291
|
/**
|
|
5281
|
-
* Enforces that all components have a 'displayName' that can be used in
|
|
5292
|
+
* Enforces that all components have a 'displayName' that can be used in DevTools.
|
|
5282
5293
|
* @see https://eslint-react.xyz/docs/rules/no-missing-component-display-name
|
|
5283
5294
|
*/
|
|
5284
5295
|
'react-x/no-missing-component-display-name'?: Linter.RuleEntry<[]>;
|
|
5285
5296
|
/**
|
|
5286
|
-
* Enforces that all contexts have a 'displayName' that can be used in
|
|
5297
|
+
* Enforces that all contexts have a 'displayName' that can be used in DevTools.
|
|
5287
5298
|
* @see https://eslint-react.xyz/docs/rules/no-missing-context-display-name
|
|
5288
5299
|
*/
|
|
5289
5300
|
'react-x/no-missing-context-display-name'?: Linter.RuleEntry<[]>;
|
|
@@ -5338,7 +5349,7 @@ interface RuleOptions {
|
|
|
5338
5349
|
*/
|
|
5339
5350
|
'react-x/no-string-refs'?: Linter.RuleEntry<[]>;
|
|
5340
5351
|
/**
|
|
5341
|
-
* Disallows unnecessary 'key' props on elements.
|
|
5352
|
+
* Disallows unnecessary 'key' props on nested child elements when rendering lists.
|
|
5342
5353
|
* @see https://eslint-react.xyz/docs/rules/no-unnecessary-key
|
|
5343
5354
|
*/
|
|
5344
5355
|
'react-x/no-unnecessary-key'?: Linter.RuleEntry<[]>;
|
|
@@ -6197,725 +6208,730 @@ interface RuleOptions {
|
|
|
6197
6208
|
'unicode-bom'?: Linter.RuleEntry<UnicodeBom>;
|
|
6198
6209
|
/**
|
|
6199
6210
|
* Improve regexes by making them shorter, consistent, and safer.
|
|
6200
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6211
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/better-regex.md
|
|
6201
6212
|
*/
|
|
6202
6213
|
'unicorn/better-regex'?: Linter.RuleEntry<UnicornBetterRegex>;
|
|
6203
6214
|
/**
|
|
6204
6215
|
* Enforce a specific parameter name in catch clauses.
|
|
6205
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6216
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/catch-error-name.md
|
|
6206
6217
|
*/
|
|
6207
6218
|
'unicorn/catch-error-name'?: Linter.RuleEntry<UnicornCatchErrorName>;
|
|
6208
6219
|
/**
|
|
6209
6220
|
* Enforce consistent assertion style with `node:assert`.
|
|
6210
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6221
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-assert.md
|
|
6211
6222
|
*/
|
|
6212
6223
|
'unicorn/consistent-assert'?: Linter.RuleEntry<[]>;
|
|
6213
6224
|
/**
|
|
6214
6225
|
* Prefer passing `Date` directly to the constructor when cloning.
|
|
6215
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6226
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-date-clone.md
|
|
6216
6227
|
*/
|
|
6217
6228
|
'unicorn/consistent-date-clone'?: Linter.RuleEntry<[]>;
|
|
6218
6229
|
/**
|
|
6219
6230
|
* Use destructured variables over properties.
|
|
6220
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6231
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-destructuring.md
|
|
6221
6232
|
*/
|
|
6222
6233
|
'unicorn/consistent-destructuring'?: Linter.RuleEntry<[]>;
|
|
6223
6234
|
/**
|
|
6224
6235
|
* Prefer consistent types when spreading a ternary in an array literal.
|
|
6225
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6236
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-empty-array-spread.md
|
|
6226
6237
|
*/
|
|
6227
6238
|
'unicorn/consistent-empty-array-spread'?: Linter.RuleEntry<[]>;
|
|
6228
6239
|
/**
|
|
6229
6240
|
* Enforce consistent style for element existence checks with `indexOf()`, `lastIndexOf()`, `findIndex()`, and `findLastIndex()`.
|
|
6230
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6241
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-existence-index-check.md
|
|
6231
6242
|
*/
|
|
6232
6243
|
'unicorn/consistent-existence-index-check'?: Linter.RuleEntry<[]>;
|
|
6233
6244
|
/**
|
|
6234
6245
|
* Move function definitions to the highest possible scope.
|
|
6235
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6246
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/consistent-function-scoping.md
|
|
6236
6247
|
*/
|
|
6237
6248
|
'unicorn/consistent-function-scoping'?: Linter.RuleEntry<UnicornConsistentFunctionScoping>;
|
|
6238
6249
|
/**
|
|
6239
6250
|
* Enforce correct `Error` subclassing.
|
|
6240
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6251
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/custom-error-definition.md
|
|
6241
6252
|
*/
|
|
6242
6253
|
'unicorn/custom-error-definition'?: Linter.RuleEntry<[]>;
|
|
6243
6254
|
/**
|
|
6244
6255
|
* Enforce no spaces between braces.
|
|
6245
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6256
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/empty-brace-spaces.md
|
|
6246
6257
|
*/
|
|
6247
6258
|
'unicorn/empty-brace-spaces'?: Linter.RuleEntry<[]>;
|
|
6248
6259
|
/**
|
|
6249
6260
|
* Enforce passing a `message` value when creating a built-in error.
|
|
6250
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6261
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/error-message.md
|
|
6251
6262
|
*/
|
|
6252
6263
|
'unicorn/error-message'?: Linter.RuleEntry<[]>;
|
|
6253
6264
|
/**
|
|
6254
6265
|
* Require escape sequences to use uppercase or lowercase values.
|
|
6255
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6266
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/escape-case.md
|
|
6256
6267
|
*/
|
|
6257
6268
|
'unicorn/escape-case'?: Linter.RuleEntry<UnicornEscapeCase>;
|
|
6258
6269
|
/**
|
|
6259
6270
|
* Add expiration conditions to TODO comments.
|
|
6260
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6271
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/expiring-todo-comments.md
|
|
6261
6272
|
*/
|
|
6262
6273
|
'unicorn/expiring-todo-comments'?: Linter.RuleEntry<UnicornExpiringTodoComments>;
|
|
6263
6274
|
/**
|
|
6264
6275
|
* Enforce explicitly comparing the `length` or `size` property of a value.
|
|
6265
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6276
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/explicit-length-check.md
|
|
6266
6277
|
*/
|
|
6267
6278
|
'unicorn/explicit-length-check'?: Linter.RuleEntry<UnicornExplicitLengthCheck>;
|
|
6268
6279
|
/**
|
|
6269
6280
|
* Enforce a case style for filenames.
|
|
6270
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6281
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/filename-case.md
|
|
6271
6282
|
*/
|
|
6272
6283
|
'unicorn/filename-case'?: Linter.RuleEntry<UnicornFilenameCase>;
|
|
6273
6284
|
/**
|
|
6274
6285
|
* Enforce specific import styles per module.
|
|
6275
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6286
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/import-style.md
|
|
6276
6287
|
*/
|
|
6277
6288
|
'unicorn/import-style'?: Linter.RuleEntry<UnicornImportStyle>;
|
|
6289
|
+
/**
|
|
6290
|
+
* Prevent usage of variables from outside the scope of isolated functions.
|
|
6291
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/isolated-functions.md
|
|
6292
|
+
*/
|
|
6293
|
+
'unicorn/isolated-functions'?: Linter.RuleEntry<UnicornIsolatedFunctions>;
|
|
6278
6294
|
/**
|
|
6279
6295
|
* Enforce the use of `new` for all builtins, except `String`, `Number`, `Boolean`, `Symbol` and `BigInt`.
|
|
6280
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6296
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/new-for-builtins.md
|
|
6281
6297
|
*/
|
|
6282
6298
|
'unicorn/new-for-builtins'?: Linter.RuleEntry<[]>;
|
|
6283
6299
|
/**
|
|
6284
6300
|
* Enforce specifying rules to disable in `eslint-disable` comments.
|
|
6285
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6301
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-abusive-eslint-disable.md
|
|
6286
6302
|
*/
|
|
6287
6303
|
'unicorn/no-abusive-eslint-disable'?: Linter.RuleEntry<[]>;
|
|
6288
6304
|
/**
|
|
6289
6305
|
* Disallow recursive access to `this` within getters and setters.
|
|
6290
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6306
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-accessor-recursion.md
|
|
6291
6307
|
*/
|
|
6292
6308
|
'unicorn/no-accessor-recursion'?: Linter.RuleEntry<[]>;
|
|
6293
6309
|
/**
|
|
6294
6310
|
* Disallow anonymous functions and classes as the default export.
|
|
6295
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6311
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-anonymous-default-export.md
|
|
6296
6312
|
*/
|
|
6297
6313
|
'unicorn/no-anonymous-default-export'?: Linter.RuleEntry<[]>;
|
|
6298
6314
|
/**
|
|
6299
6315
|
* Prevent passing a function reference directly to iterator methods.
|
|
6300
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6316
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-callback-reference.md
|
|
6301
6317
|
*/
|
|
6302
6318
|
'unicorn/no-array-callback-reference'?: Linter.RuleEntry<[]>;
|
|
6303
6319
|
/**
|
|
6304
6320
|
* Prefer `for…of` over the `forEach` method.
|
|
6305
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6321
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-for-each.md
|
|
6306
6322
|
*/
|
|
6307
6323
|
'unicorn/no-array-for-each'?: Linter.RuleEntry<[]>;
|
|
6308
6324
|
/**
|
|
6309
6325
|
* Disallow using the `this` argument in array methods.
|
|
6310
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6326
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-method-this-argument.md
|
|
6311
6327
|
*/
|
|
6312
6328
|
'unicorn/no-array-method-this-argument'?: Linter.RuleEntry<[]>;
|
|
6313
6329
|
/**
|
|
6314
6330
|
* Replaced by `unicorn/prefer-single-call` which covers more cases.
|
|
6315
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6331
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/deleted-and-deprecated-rules.md#no-array-push-push
|
|
6316
6332
|
* @deprecated
|
|
6317
6333
|
*/
|
|
6318
6334
|
'unicorn/no-array-push-push'?: Linter.RuleEntry<[]>;
|
|
6319
6335
|
/**
|
|
6320
6336
|
* Disallow `Array#reduce()` and `Array#reduceRight()`.
|
|
6321
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6337
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-reduce.md
|
|
6322
6338
|
*/
|
|
6323
6339
|
'unicorn/no-array-reduce'?: Linter.RuleEntry<UnicornNoArrayReduce>;
|
|
6324
6340
|
/**
|
|
6325
6341
|
* Prefer `Array#toReversed()` over `Array#reverse()`.
|
|
6326
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6342
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-reverse.md
|
|
6327
6343
|
*/
|
|
6328
6344
|
'unicorn/no-array-reverse'?: Linter.RuleEntry<UnicornNoArrayReverse>;
|
|
6329
6345
|
/**
|
|
6330
6346
|
* Prefer `Array#toSorted()` over `Array#sort()`.
|
|
6331
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6347
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-array-sort.md
|
|
6332
6348
|
*/
|
|
6333
6349
|
'unicorn/no-array-sort'?: Linter.RuleEntry<UnicornNoArraySort>;
|
|
6334
6350
|
/**
|
|
6335
6351
|
* Disallow member access from await expression.
|
|
6336
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6352
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-await-expression-member.md
|
|
6337
6353
|
*/
|
|
6338
6354
|
'unicorn/no-await-expression-member'?: Linter.RuleEntry<[]>;
|
|
6339
6355
|
/**
|
|
6340
6356
|
* Disallow using `await` in `Promise` method parameters.
|
|
6341
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6357
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-await-in-promise-methods.md
|
|
6342
6358
|
*/
|
|
6343
6359
|
'unicorn/no-await-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
6344
6360
|
/**
|
|
6345
6361
|
* Do not use leading/trailing space between `console.log` parameters.
|
|
6346
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6362
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-console-spaces.md
|
|
6347
6363
|
*/
|
|
6348
6364
|
'unicorn/no-console-spaces'?: Linter.RuleEntry<[]>;
|
|
6349
6365
|
/**
|
|
6350
6366
|
* Do not use `document.cookie` directly.
|
|
6351
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6367
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-document-cookie.md
|
|
6352
6368
|
*/
|
|
6353
6369
|
'unicorn/no-document-cookie'?: Linter.RuleEntry<[]>;
|
|
6354
6370
|
/**
|
|
6355
6371
|
* Disallow empty files.
|
|
6356
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6372
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-empty-file.md
|
|
6357
6373
|
*/
|
|
6358
6374
|
'unicorn/no-empty-file'?: Linter.RuleEntry<[]>;
|
|
6359
6375
|
/**
|
|
6360
6376
|
* Do not use a `for` loop that can be replaced with a `for-of` loop.
|
|
6361
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6377
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-for-loop.md
|
|
6362
6378
|
*/
|
|
6363
6379
|
'unicorn/no-for-loop'?: Linter.RuleEntry<[]>;
|
|
6364
6380
|
/**
|
|
6365
6381
|
* Enforce the use of Unicode escapes instead of hexadecimal escapes.
|
|
6366
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6382
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-hex-escape.md
|
|
6367
6383
|
*/
|
|
6368
6384
|
'unicorn/no-hex-escape'?: Linter.RuleEntry<[]>;
|
|
6369
6385
|
/**
|
|
6370
6386
|
* Disallow immediate mutation after variable assignment.
|
|
6371
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6387
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-immediate-mutation.md
|
|
6372
6388
|
*/
|
|
6373
6389
|
'unicorn/no-immediate-mutation'?: Linter.RuleEntry<[]>;
|
|
6374
6390
|
/**
|
|
6375
6391
|
* Replaced by `unicorn/no-instanceof-builtins` which covers more cases.
|
|
6376
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6392
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array
|
|
6377
6393
|
* @deprecated
|
|
6378
6394
|
*/
|
|
6379
6395
|
'unicorn/no-instanceof-array'?: Linter.RuleEntry<[]>;
|
|
6380
6396
|
/**
|
|
6381
6397
|
* Disallow `instanceof` with built-in objects
|
|
6382
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6398
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-instanceof-builtins.md
|
|
6383
6399
|
*/
|
|
6384
6400
|
'unicorn/no-instanceof-builtins'?: Linter.RuleEntry<UnicornNoInstanceofBuiltins>;
|
|
6385
6401
|
/**
|
|
6386
6402
|
* Disallow invalid options in `fetch()` and `new Request()`.
|
|
6387
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6403
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-invalid-fetch-options.md
|
|
6388
6404
|
*/
|
|
6389
6405
|
'unicorn/no-invalid-fetch-options'?: Linter.RuleEntry<[]>;
|
|
6390
6406
|
/**
|
|
6391
6407
|
* Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
|
|
6392
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6408
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-invalid-remove-event-listener.md
|
|
6393
6409
|
*/
|
|
6394
6410
|
'unicorn/no-invalid-remove-event-listener'?: Linter.RuleEntry<[]>;
|
|
6395
6411
|
/**
|
|
6396
6412
|
* Disallow identifiers starting with `new` or `class`.
|
|
6397
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6413
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-keyword-prefix.md
|
|
6398
6414
|
*/
|
|
6399
6415
|
'unicorn/no-keyword-prefix'?: Linter.RuleEntry<UnicornNoKeywordPrefix>;
|
|
6400
6416
|
/**
|
|
6401
6417
|
* Replaced by `unicorn/no-unnecessary-slice-end` which covers more cases.
|
|
6402
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6418
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/deleted-and-deprecated-rules.md#no-length-as-slice-end
|
|
6403
6419
|
* @deprecated
|
|
6404
6420
|
*/
|
|
6405
6421
|
'unicorn/no-length-as-slice-end'?: Linter.RuleEntry<[]>;
|
|
6406
6422
|
/**
|
|
6407
6423
|
* Disallow `if` statements as the only statement in `if` blocks without `else`.
|
|
6408
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6424
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-lonely-if.md
|
|
6409
6425
|
*/
|
|
6410
6426
|
'unicorn/no-lonely-if'?: Linter.RuleEntry<[]>;
|
|
6411
6427
|
/**
|
|
6412
6428
|
* Disallow a magic number as the `depth` argument in `Array#flat(…).`
|
|
6413
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6429
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-magic-array-flat-depth.md
|
|
6414
6430
|
*/
|
|
6415
6431
|
'unicorn/no-magic-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
6416
6432
|
/**
|
|
6417
6433
|
* Disallow named usage of default import and export.
|
|
6418
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6434
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-named-default.md
|
|
6419
6435
|
*/
|
|
6420
6436
|
'unicorn/no-named-default'?: Linter.RuleEntry<[]>;
|
|
6421
6437
|
/**
|
|
6422
6438
|
* Disallow negated conditions.
|
|
6423
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6439
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-negated-condition.md
|
|
6424
6440
|
*/
|
|
6425
6441
|
'unicorn/no-negated-condition'?: Linter.RuleEntry<[]>;
|
|
6426
6442
|
/**
|
|
6427
6443
|
* Disallow negated expression in equality check.
|
|
6428
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6444
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-negation-in-equality-check.md
|
|
6429
6445
|
*/
|
|
6430
6446
|
'unicorn/no-negation-in-equality-check'?: Linter.RuleEntry<[]>;
|
|
6431
6447
|
/**
|
|
6432
6448
|
* Disallow nested ternary expressions.
|
|
6433
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6449
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-nested-ternary.md
|
|
6434
6450
|
*/
|
|
6435
6451
|
'unicorn/no-nested-ternary'?: Linter.RuleEntry<[]>;
|
|
6436
6452
|
/**
|
|
6437
6453
|
* Disallow `new Array()`.
|
|
6438
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6454
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-new-array.md
|
|
6439
6455
|
*/
|
|
6440
6456
|
'unicorn/no-new-array'?: Linter.RuleEntry<[]>;
|
|
6441
6457
|
/**
|
|
6442
6458
|
* Enforce the use of `Buffer.from()` and `Buffer.alloc()` instead of the deprecated `new Buffer()`.
|
|
6443
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6459
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-new-buffer.md
|
|
6444
6460
|
*/
|
|
6445
6461
|
'unicorn/no-new-buffer'?: Linter.RuleEntry<[]>;
|
|
6446
6462
|
/**
|
|
6447
6463
|
* Disallow the use of the `null` literal.
|
|
6448
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6464
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-null.md
|
|
6449
6465
|
*/
|
|
6450
6466
|
'unicorn/no-null'?: Linter.RuleEntry<UnicornNoNull>;
|
|
6451
6467
|
/**
|
|
6452
6468
|
* Disallow the use of objects as default parameters.
|
|
6453
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6469
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-object-as-default-parameter.md
|
|
6454
6470
|
*/
|
|
6455
6471
|
'unicorn/no-object-as-default-parameter'?: Linter.RuleEntry<[]>;
|
|
6456
6472
|
/**
|
|
6457
6473
|
* Disallow `process.exit()`.
|
|
6458
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6474
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-process-exit.md
|
|
6459
6475
|
*/
|
|
6460
6476
|
'unicorn/no-process-exit'?: Linter.RuleEntry<[]>;
|
|
6461
6477
|
/**
|
|
6462
6478
|
* Disallow passing single-element arrays to `Promise` methods.
|
|
6463
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6479
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-single-promise-in-promise-methods.md
|
|
6464
6480
|
*/
|
|
6465
6481
|
'unicorn/no-single-promise-in-promise-methods'?: Linter.RuleEntry<[]>;
|
|
6466
6482
|
/**
|
|
6467
6483
|
* Disallow classes that only have static members.
|
|
6468
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6484
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-static-only-class.md
|
|
6469
6485
|
*/
|
|
6470
6486
|
'unicorn/no-static-only-class'?: Linter.RuleEntry<[]>;
|
|
6471
6487
|
/**
|
|
6472
6488
|
* Disallow `then` property.
|
|
6473
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6489
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-thenable.md
|
|
6474
6490
|
*/
|
|
6475
6491
|
'unicorn/no-thenable'?: Linter.RuleEntry<[]>;
|
|
6476
6492
|
/**
|
|
6477
6493
|
* Disallow assigning `this` to a variable.
|
|
6478
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6494
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-this-assignment.md
|
|
6479
6495
|
*/
|
|
6480
6496
|
'unicorn/no-this-assignment'?: Linter.RuleEntry<[]>;
|
|
6481
6497
|
/**
|
|
6482
6498
|
* Disallow comparing `undefined` using `typeof`.
|
|
6483
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6499
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-typeof-undefined.md
|
|
6484
6500
|
*/
|
|
6485
6501
|
'unicorn/no-typeof-undefined'?: Linter.RuleEntry<UnicornNoTypeofUndefined>;
|
|
6486
6502
|
/**
|
|
6487
6503
|
* Disallow using `1` as the `depth` argument of `Array#flat()`.
|
|
6488
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6504
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unnecessary-array-flat-depth.md
|
|
6489
6505
|
*/
|
|
6490
6506
|
'unicorn/no-unnecessary-array-flat-depth'?: Linter.RuleEntry<[]>;
|
|
6491
6507
|
/**
|
|
6492
6508
|
* Disallow using `.length` or `Infinity` as the `deleteCount` or `skipCount` argument of `Array#{splice,toSpliced}()`.
|
|
6493
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6509
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unnecessary-array-splice-count.md
|
|
6494
6510
|
*/
|
|
6495
6511
|
'unicorn/no-unnecessary-array-splice-count'?: Linter.RuleEntry<[]>;
|
|
6496
6512
|
/**
|
|
6497
6513
|
* Disallow awaiting non-promise values.
|
|
6498
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6514
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unnecessary-await.md
|
|
6499
6515
|
*/
|
|
6500
6516
|
'unicorn/no-unnecessary-await'?: Linter.RuleEntry<[]>;
|
|
6501
6517
|
/**
|
|
6502
6518
|
* Enforce the use of built-in methods instead of unnecessary polyfills.
|
|
6503
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6519
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unnecessary-polyfills.md
|
|
6504
6520
|
*/
|
|
6505
6521
|
'unicorn/no-unnecessary-polyfills'?: Linter.RuleEntry<UnicornNoUnnecessaryPolyfills>;
|
|
6506
6522
|
/**
|
|
6507
6523
|
* Disallow using `.length` or `Infinity` as the `end` argument of `{Array,String,TypedArray}#slice()`.
|
|
6508
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6524
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unnecessary-slice-end.md
|
|
6509
6525
|
*/
|
|
6510
6526
|
'unicorn/no-unnecessary-slice-end'?: Linter.RuleEntry<[]>;
|
|
6511
6527
|
/**
|
|
6512
6528
|
* Disallow unreadable array destructuring.
|
|
6513
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6529
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unreadable-array-destructuring.md
|
|
6514
6530
|
*/
|
|
6515
6531
|
'unicorn/no-unreadable-array-destructuring'?: Linter.RuleEntry<[]>;
|
|
6516
6532
|
/**
|
|
6517
6533
|
* Disallow unreadable IIFEs.
|
|
6518
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6534
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unreadable-iife.md
|
|
6519
6535
|
*/
|
|
6520
6536
|
'unicorn/no-unreadable-iife'?: Linter.RuleEntry<[]>;
|
|
6521
6537
|
/**
|
|
6522
6538
|
* Disallow unused object properties.
|
|
6523
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6539
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-unused-properties.md
|
|
6524
6540
|
*/
|
|
6525
6541
|
'unicorn/no-unused-properties'?: Linter.RuleEntry<[]>;
|
|
6526
6542
|
/**
|
|
6527
6543
|
* Disallow useless values or fallbacks in `Set`, `Map`, `WeakSet`, or `WeakMap`.
|
|
6528
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6544
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-collection-argument.md
|
|
6529
6545
|
*/
|
|
6530
6546
|
'unicorn/no-useless-collection-argument'?: Linter.RuleEntry<[]>;
|
|
6531
6547
|
/**
|
|
6532
6548
|
* Disallow unnecessary `Error.captureStackTrace(…)`.
|
|
6533
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6549
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-error-capture-stack-trace.md
|
|
6534
6550
|
*/
|
|
6535
6551
|
'unicorn/no-useless-error-capture-stack-trace'?: Linter.RuleEntry<[]>;
|
|
6536
6552
|
/**
|
|
6537
6553
|
* Disallow useless fallback when spreading in object literals.
|
|
6538
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6554
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-fallback-in-spread.md
|
|
6539
6555
|
*/
|
|
6540
6556
|
'unicorn/no-useless-fallback-in-spread'?: Linter.RuleEntry<[]>;
|
|
6541
6557
|
/**
|
|
6542
6558
|
* Disallow useless array length check.
|
|
6543
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6559
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-length-check.md
|
|
6544
6560
|
*/
|
|
6545
6561
|
'unicorn/no-useless-length-check'?: Linter.RuleEntry<[]>;
|
|
6546
6562
|
/**
|
|
6547
6563
|
* Disallow returning/yielding `Promise.resolve/reject()` in async functions or promise callbacks
|
|
6548
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6564
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-promise-resolve-reject.md
|
|
6549
6565
|
*/
|
|
6550
6566
|
'unicorn/no-useless-promise-resolve-reject'?: Linter.RuleEntry<[]>;
|
|
6551
6567
|
/**
|
|
6552
6568
|
* Disallow unnecessary spread.
|
|
6553
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6569
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-spread.md
|
|
6554
6570
|
*/
|
|
6555
6571
|
'unicorn/no-useless-spread'?: Linter.RuleEntry<[]>;
|
|
6556
6572
|
/**
|
|
6557
6573
|
* Disallow useless case in switch statements.
|
|
6558
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6574
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-switch-case.md
|
|
6559
6575
|
*/
|
|
6560
6576
|
'unicorn/no-useless-switch-case'?: Linter.RuleEntry<[]>;
|
|
6561
6577
|
/**
|
|
6562
6578
|
* Disallow useless `undefined`.
|
|
6563
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6579
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-useless-undefined.md
|
|
6564
6580
|
*/
|
|
6565
6581
|
'unicorn/no-useless-undefined'?: Linter.RuleEntry<UnicornNoUselessUndefined>;
|
|
6566
6582
|
/**
|
|
6567
6583
|
* Disallow number literals with zero fractions or dangling dots.
|
|
6568
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6584
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/no-zero-fractions.md
|
|
6569
6585
|
*/
|
|
6570
6586
|
'unicorn/no-zero-fractions'?: Linter.RuleEntry<[]>;
|
|
6571
6587
|
/**
|
|
6572
6588
|
* Enforce proper case for numeric literals.
|
|
6573
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6589
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/number-literal-case.md
|
|
6574
6590
|
*/
|
|
6575
6591
|
'unicorn/number-literal-case'?: Linter.RuleEntry<UnicornNumberLiteralCase>;
|
|
6576
6592
|
/**
|
|
6577
6593
|
* Enforce the style of numeric separators by correctly grouping digits.
|
|
6578
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6594
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/numeric-separators-style.md
|
|
6579
6595
|
*/
|
|
6580
6596
|
'unicorn/numeric-separators-style'?: Linter.RuleEntry<UnicornNumericSeparatorsStyle>;
|
|
6581
6597
|
/**
|
|
6582
6598
|
* Prefer `.addEventListener()` and `.removeEventListener()` over `on`-functions.
|
|
6583
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6599
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-add-event-listener.md
|
|
6584
6600
|
*/
|
|
6585
6601
|
'unicorn/prefer-add-event-listener'?: Linter.RuleEntry<UnicornPreferAddEventListener>;
|
|
6586
6602
|
/**
|
|
6587
6603
|
* Prefer `.find(…)` and `.findLast(…)` over the first or last element from `.filter(…)`.
|
|
6588
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6604
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-array-find.md
|
|
6589
6605
|
*/
|
|
6590
6606
|
'unicorn/prefer-array-find'?: Linter.RuleEntry<UnicornPreferArrayFind>;
|
|
6591
6607
|
/**
|
|
6592
6608
|
* Prefer `Array#flat()` over legacy techniques to flatten arrays.
|
|
6593
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6609
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-array-flat.md
|
|
6594
6610
|
*/
|
|
6595
6611
|
'unicorn/prefer-array-flat'?: Linter.RuleEntry<UnicornPreferArrayFlat>;
|
|
6596
6612
|
/**
|
|
6597
6613
|
* Prefer `.flatMap(…)` over `.map(…).flat()`.
|
|
6598
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6614
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-array-flat-map.md
|
|
6599
6615
|
*/
|
|
6600
6616
|
'unicorn/prefer-array-flat-map'?: Linter.RuleEntry<[]>;
|
|
6601
6617
|
/**
|
|
6602
6618
|
* Prefer `Array#{indexOf,lastIndexOf}()` over `Array#{findIndex,findLastIndex}()` when looking for the index of an item.
|
|
6603
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6619
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-array-index-of.md
|
|
6604
6620
|
*/
|
|
6605
6621
|
'unicorn/prefer-array-index-of'?: Linter.RuleEntry<[]>;
|
|
6606
6622
|
/**
|
|
6607
6623
|
* Prefer `.some(…)` over `.filter(…).length` check and `.{find,findLast,findIndex,findLastIndex}(…)`.
|
|
6608
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6624
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-array-some.md
|
|
6609
6625
|
*/
|
|
6610
6626
|
'unicorn/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
6611
6627
|
/**
|
|
6612
6628
|
* Prefer `.at()` method for index access and `String#charAt()`.
|
|
6613
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6629
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-at.md
|
|
6614
6630
|
*/
|
|
6615
6631
|
'unicorn/prefer-at'?: Linter.RuleEntry<UnicornPreferAt>;
|
|
6616
6632
|
/**
|
|
6617
6633
|
* Prefer `BigInt` literals over the constructor.
|
|
6618
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6634
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-bigint-literals.md
|
|
6619
6635
|
*/
|
|
6620
6636
|
'unicorn/prefer-bigint-literals'?: Linter.RuleEntry<[]>;
|
|
6621
6637
|
/**
|
|
6622
6638
|
* Prefer `Blob#arrayBuffer()` over `FileReader#readAsArrayBuffer(…)` and `Blob#text()` over `FileReader#readAsText(…)`.
|
|
6623
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6639
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-blob-reading-methods.md
|
|
6624
6640
|
*/
|
|
6625
6641
|
'unicorn/prefer-blob-reading-methods'?: Linter.RuleEntry<[]>;
|
|
6626
6642
|
/**
|
|
6627
6643
|
* Prefer class field declarations over `this` assignments in constructors.
|
|
6628
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6644
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-class-fields.md
|
|
6629
6645
|
*/
|
|
6630
6646
|
'unicorn/prefer-class-fields'?: Linter.RuleEntry<[]>;
|
|
6631
6647
|
/**
|
|
6632
6648
|
* Prefer using `Element#classList.toggle()` to toggle class names.
|
|
6633
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6649
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-classlist-toggle.md
|
|
6634
6650
|
*/
|
|
6635
6651
|
'unicorn/prefer-classlist-toggle'?: Linter.RuleEntry<[]>;
|
|
6636
6652
|
/**
|
|
6637
6653
|
* Prefer `String#codePointAt(…)` over `String#charCodeAt(…)` and `String.fromCodePoint(…)` over `String.fromCharCode(…)`.
|
|
6638
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6654
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-code-point.md
|
|
6639
6655
|
*/
|
|
6640
6656
|
'unicorn/prefer-code-point'?: Linter.RuleEntry<[]>;
|
|
6641
6657
|
/**
|
|
6642
6658
|
* Prefer `Date.now()` to get the number of milliseconds since the Unix Epoch.
|
|
6643
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6659
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-date-now.md
|
|
6644
6660
|
*/
|
|
6645
6661
|
'unicorn/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
6646
6662
|
/**
|
|
6647
6663
|
* Prefer default parameters over reassignment.
|
|
6648
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6664
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-default-parameters.md
|
|
6649
6665
|
*/
|
|
6650
6666
|
'unicorn/prefer-default-parameters'?: Linter.RuleEntry<[]>;
|
|
6651
6667
|
/**
|
|
6652
6668
|
* Prefer `Node#append()` over `Node#appendChild()`.
|
|
6653
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6669
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-dom-node-append.md
|
|
6654
6670
|
*/
|
|
6655
6671
|
'unicorn/prefer-dom-node-append'?: Linter.RuleEntry<[]>;
|
|
6656
6672
|
/**
|
|
6657
6673
|
* Prefer using `.dataset` on DOM elements over calling attribute methods.
|
|
6658
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6674
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-dom-node-dataset.md
|
|
6659
6675
|
*/
|
|
6660
6676
|
'unicorn/prefer-dom-node-dataset'?: Linter.RuleEntry<[]>;
|
|
6661
6677
|
/**
|
|
6662
6678
|
* Prefer `childNode.remove()` over `parentNode.removeChild(childNode)`.
|
|
6663
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6679
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-dom-node-remove.md
|
|
6664
6680
|
*/
|
|
6665
6681
|
'unicorn/prefer-dom-node-remove'?: Linter.RuleEntry<[]>;
|
|
6666
6682
|
/**
|
|
6667
6683
|
* Prefer `.textContent` over `.innerText`.
|
|
6668
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6684
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-dom-node-text-content.md
|
|
6669
6685
|
*/
|
|
6670
6686
|
'unicorn/prefer-dom-node-text-content'?: Linter.RuleEntry<[]>;
|
|
6671
6687
|
/**
|
|
6672
6688
|
* Prefer `EventTarget` over `EventEmitter`.
|
|
6673
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6689
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-event-target.md
|
|
6674
6690
|
*/
|
|
6675
6691
|
'unicorn/prefer-event-target'?: Linter.RuleEntry<[]>;
|
|
6676
6692
|
/**
|
|
6677
6693
|
* Prefer `export…from` when re-exporting.
|
|
6678
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6694
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-export-from.md
|
|
6679
6695
|
*/
|
|
6680
6696
|
'unicorn/prefer-export-from'?: Linter.RuleEntry<UnicornPreferExportFrom>;
|
|
6681
6697
|
/**
|
|
6682
6698
|
* Prefer `globalThis` over `window`, `self`, and `global`.
|
|
6683
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6699
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-global-this.md
|
|
6684
6700
|
*/
|
|
6685
6701
|
'unicorn/prefer-global-this'?: Linter.RuleEntry<[]>;
|
|
6686
6702
|
/**
|
|
6687
6703
|
* Prefer `import.meta.{dirname,filename}` over legacy techniques for getting file paths.
|
|
6688
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6704
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-import-meta-properties.md
|
|
6689
6705
|
*/
|
|
6690
6706
|
'unicorn/prefer-import-meta-properties'?: Linter.RuleEntry<[]>;
|
|
6691
6707
|
/**
|
|
6692
6708
|
* Prefer `.includes()` over `.indexOf()`, `.lastIndexOf()`, and `Array#some()` when checking for existence or non-existence.
|
|
6693
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6709
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-includes.md
|
|
6694
6710
|
*/
|
|
6695
6711
|
'unicorn/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
6696
6712
|
/**
|
|
6697
6713
|
* Prefer reading a JSON file as a buffer.
|
|
6698
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6714
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-json-parse-buffer.md
|
|
6699
6715
|
*/
|
|
6700
6716
|
'unicorn/prefer-json-parse-buffer'?: Linter.RuleEntry<[]>;
|
|
6701
6717
|
/**
|
|
6702
6718
|
* Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`.
|
|
6703
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6719
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-keyboard-event-key.md
|
|
6704
6720
|
*/
|
|
6705
6721
|
'unicorn/prefer-keyboard-event-key'?: Linter.RuleEntry<[]>;
|
|
6706
6722
|
/**
|
|
6707
6723
|
* Prefer using a logical operator over a ternary.
|
|
6708
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6724
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-logical-operator-over-ternary.md
|
|
6709
6725
|
*/
|
|
6710
6726
|
'unicorn/prefer-logical-operator-over-ternary'?: Linter.RuleEntry<[]>;
|
|
6711
6727
|
/**
|
|
6712
6728
|
* Prefer `Math.min()` and `Math.max()` over ternaries for simple comparisons.
|
|
6713
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6729
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-math-min-max.md
|
|
6714
6730
|
*/
|
|
6715
6731
|
'unicorn/prefer-math-min-max'?: Linter.RuleEntry<[]>;
|
|
6716
6732
|
/**
|
|
6717
6733
|
* Enforce the use of `Math.trunc` instead of bitwise operators.
|
|
6718
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6734
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-math-trunc.md
|
|
6719
6735
|
*/
|
|
6720
6736
|
'unicorn/prefer-math-trunc'?: Linter.RuleEntry<[]>;
|
|
6721
6737
|
/**
|
|
6722
6738
|
* Prefer `.before()` over `.insertBefore()`, `.replaceWith()` over `.replaceChild()`, prefer one of `.before()`, `.after()`, `.append()` or `.prepend()` over `insertAdjacentText()` and `insertAdjacentElement()`.
|
|
6723
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6739
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-modern-dom-apis.md
|
|
6724
6740
|
*/
|
|
6725
6741
|
'unicorn/prefer-modern-dom-apis'?: Linter.RuleEntry<[]>;
|
|
6726
6742
|
/**
|
|
6727
6743
|
* Prefer modern `Math` APIs over legacy patterns.
|
|
6728
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6744
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-modern-math-apis.md
|
|
6729
6745
|
*/
|
|
6730
6746
|
'unicorn/prefer-modern-math-apis'?: Linter.RuleEntry<[]>;
|
|
6731
6747
|
/**
|
|
6732
6748
|
* Prefer JavaScript modules (ESM) over CommonJS.
|
|
6733
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6749
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-module.md
|
|
6734
6750
|
*/
|
|
6735
6751
|
'unicorn/prefer-module'?: Linter.RuleEntry<[]>;
|
|
6736
6752
|
/**
|
|
6737
6753
|
* Prefer using `String`, `Number`, `BigInt`, `Boolean`, and `Symbol` directly.
|
|
6738
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6754
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-native-coercion-functions.md
|
|
6739
6755
|
*/
|
|
6740
6756
|
'unicorn/prefer-native-coercion-functions'?: Linter.RuleEntry<[]>;
|
|
6741
6757
|
/**
|
|
6742
6758
|
* Prefer negative index over `.length - index` when possible.
|
|
6743
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6759
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-negative-index.md
|
|
6744
6760
|
*/
|
|
6745
6761
|
'unicorn/prefer-negative-index'?: Linter.RuleEntry<[]>;
|
|
6746
6762
|
/**
|
|
6747
6763
|
* Prefer using the `node:` protocol when importing Node.js builtin modules.
|
|
6748
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6764
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-node-protocol.md
|
|
6749
6765
|
*/
|
|
6750
6766
|
'unicorn/prefer-node-protocol'?: Linter.RuleEntry<[]>;
|
|
6751
6767
|
/**
|
|
6752
6768
|
* Prefer `Number` static properties over global ones.
|
|
6753
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6769
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-number-properties.md
|
|
6754
6770
|
*/
|
|
6755
6771
|
'unicorn/prefer-number-properties'?: Linter.RuleEntry<UnicornPreferNumberProperties>;
|
|
6756
6772
|
/**
|
|
6757
6773
|
* Prefer using `Object.fromEntries(…)` to transform a list of key-value pairs into an object.
|
|
6758
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6774
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-object-from-entries.md
|
|
6759
6775
|
*/
|
|
6760
6776
|
'unicorn/prefer-object-from-entries'?: Linter.RuleEntry<UnicornPreferObjectFromEntries>;
|
|
6761
6777
|
/**
|
|
6762
6778
|
* Prefer omitting the `catch` binding parameter.
|
|
6763
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6779
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-optional-catch-binding.md
|
|
6764
6780
|
*/
|
|
6765
6781
|
'unicorn/prefer-optional-catch-binding'?: Linter.RuleEntry<[]>;
|
|
6766
6782
|
/**
|
|
6767
6783
|
* Prefer borrowing methods from the prototype instead of the instance.
|
|
6768
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6784
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-prototype-methods.md
|
|
6769
6785
|
*/
|
|
6770
6786
|
'unicorn/prefer-prototype-methods'?: Linter.RuleEntry<[]>;
|
|
6771
6787
|
/**
|
|
6772
6788
|
* Prefer `.querySelector()` over `.getElementById()`, `.querySelectorAll()` over `.getElementsByClassName()` and `.getElementsByTagName()` and `.getElementsByName()`.
|
|
6773
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6789
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-query-selector.md
|
|
6774
6790
|
*/
|
|
6775
6791
|
'unicorn/prefer-query-selector'?: Linter.RuleEntry<[]>;
|
|
6776
6792
|
/**
|
|
6777
6793
|
* Prefer `Reflect.apply()` over `Function#apply()`.
|
|
6778
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6794
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-reflect-apply.md
|
|
6779
6795
|
*/
|
|
6780
6796
|
'unicorn/prefer-reflect-apply'?: Linter.RuleEntry<[]>;
|
|
6781
6797
|
/**
|
|
6782
6798
|
* Prefer `RegExp#test()` over `String#match()` and `RegExp#exec()`.
|
|
6783
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6799
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-regexp-test.md
|
|
6784
6800
|
*/
|
|
6785
6801
|
'unicorn/prefer-regexp-test'?: Linter.RuleEntry<[]>;
|
|
6786
6802
|
/**
|
|
6787
6803
|
* Prefer `Response.json()` over `new Response(JSON.stringify())`.
|
|
6788
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6804
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-response-static-json.md
|
|
6789
6805
|
*/
|
|
6790
6806
|
'unicorn/prefer-response-static-json'?: Linter.RuleEntry<[]>;
|
|
6791
6807
|
/**
|
|
6792
6808
|
* Prefer `Set#has()` over `Array#includes()` when checking for existence or non-existence.
|
|
6793
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6809
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-set-has.md
|
|
6794
6810
|
*/
|
|
6795
6811
|
'unicorn/prefer-set-has'?: Linter.RuleEntry<[]>;
|
|
6796
6812
|
/**
|
|
6797
6813
|
* Prefer using `Set#size` instead of `Array#length`.
|
|
6798
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6814
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-set-size.md
|
|
6799
6815
|
*/
|
|
6800
6816
|
'unicorn/prefer-set-size'?: Linter.RuleEntry<[]>;
|
|
6801
6817
|
/**
|
|
6802
6818
|
* Enforce combining multiple `Array#push()`, `Element#classList.{add,remove}()`, and `importScripts()` into one call.
|
|
6803
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6819
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-single-call.md
|
|
6804
6820
|
*/
|
|
6805
6821
|
'unicorn/prefer-single-call'?: Linter.RuleEntry<UnicornPreferSingleCall>;
|
|
6806
6822
|
/**
|
|
6807
6823
|
* Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()` and `String#split('')`.
|
|
6808
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6824
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-spread.md
|
|
6809
6825
|
*/
|
|
6810
6826
|
'unicorn/prefer-spread'?: Linter.RuleEntry<[]>;
|
|
6811
6827
|
/**
|
|
6812
6828
|
* Prefer using the `String.raw` tag to avoid escaping `\`.
|
|
6813
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6829
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-string-raw.md
|
|
6814
6830
|
*/
|
|
6815
6831
|
'unicorn/prefer-string-raw'?: Linter.RuleEntry<[]>;
|
|
6816
6832
|
/**
|
|
6817
6833
|
* Prefer `String#replaceAll()` over regex searches with the global flag.
|
|
6818
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6834
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-string-replace-all.md
|
|
6819
6835
|
*/
|
|
6820
6836
|
'unicorn/prefer-string-replace-all'?: Linter.RuleEntry<[]>;
|
|
6821
6837
|
/**
|
|
6822
6838
|
* Prefer `String#slice()` over `String#substr()` and `String#substring()`.
|
|
6823
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6839
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-string-slice.md
|
|
6824
6840
|
*/
|
|
6825
6841
|
'unicorn/prefer-string-slice'?: Linter.RuleEntry<[]>;
|
|
6826
6842
|
/**
|
|
6827
6843
|
* Prefer `String#startsWith()` & `String#endsWith()` over `RegExp#test()`.
|
|
6828
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6844
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-string-starts-ends-with.md
|
|
6829
6845
|
*/
|
|
6830
6846
|
'unicorn/prefer-string-starts-ends-with'?: Linter.RuleEntry<[]>;
|
|
6831
6847
|
/**
|
|
6832
6848
|
* Prefer `String#trimStart()` / `String#trimEnd()` over `String#trimLeft()` / `String#trimRight()`.
|
|
6833
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6849
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-string-trim-start-end.md
|
|
6834
6850
|
*/
|
|
6835
6851
|
'unicorn/prefer-string-trim-start-end'?: Linter.RuleEntry<[]>;
|
|
6836
6852
|
/**
|
|
6837
6853
|
* Prefer using `structuredClone` to create a deep clone.
|
|
6838
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6854
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-structured-clone.md
|
|
6839
6855
|
*/
|
|
6840
6856
|
'unicorn/prefer-structured-clone'?: Linter.RuleEntry<UnicornPreferStructuredClone>;
|
|
6841
6857
|
/**
|
|
6842
6858
|
* Prefer `switch` over multiple `else-if`.
|
|
6843
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6859
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-switch.md
|
|
6844
6860
|
*/
|
|
6845
6861
|
'unicorn/prefer-switch'?: Linter.RuleEntry<UnicornPreferSwitch>;
|
|
6846
6862
|
/**
|
|
6847
6863
|
* Prefer ternary expressions over simple `if-else` statements.
|
|
6848
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6864
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-ternary.md
|
|
6849
6865
|
*/
|
|
6850
6866
|
'unicorn/prefer-ternary'?: Linter.RuleEntry<UnicornPreferTernary>;
|
|
6851
6867
|
/**
|
|
6852
6868
|
* Prefer top-level await over top-level promises and async function calls.
|
|
6853
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6869
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-top-level-await.md
|
|
6854
6870
|
*/
|
|
6855
6871
|
'unicorn/prefer-top-level-await'?: Linter.RuleEntry<[]>;
|
|
6856
6872
|
/**
|
|
6857
6873
|
* Enforce throwing `TypeError` in type checking conditions.
|
|
6858
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6874
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prefer-type-error.md
|
|
6859
6875
|
*/
|
|
6860
6876
|
'unicorn/prefer-type-error'?: Linter.RuleEntry<[]>;
|
|
6861
6877
|
/**
|
|
6862
6878
|
* Prevent abbreviations.
|
|
6863
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6879
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/prevent-abbreviations.md
|
|
6864
6880
|
*/
|
|
6865
6881
|
'unicorn/prevent-abbreviations'?: Linter.RuleEntry<UnicornPreventAbbreviations>;
|
|
6866
6882
|
/**
|
|
6867
6883
|
* Enforce consistent relative URL style.
|
|
6868
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6884
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/relative-url-style.md
|
|
6869
6885
|
*/
|
|
6870
6886
|
'unicorn/relative-url-style'?: Linter.RuleEntry<UnicornRelativeUrlStyle>;
|
|
6871
6887
|
/**
|
|
6872
6888
|
* Enforce using the separator argument with `Array#join()`.
|
|
6873
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6889
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/require-array-join-separator.md
|
|
6874
6890
|
*/
|
|
6875
6891
|
'unicorn/require-array-join-separator'?: Linter.RuleEntry<[]>;
|
|
6876
6892
|
/**
|
|
6877
6893
|
* Require non-empty module attributes for imports and exports
|
|
6878
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6894
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/require-module-attributes.md
|
|
6879
6895
|
*/
|
|
6880
6896
|
'unicorn/require-module-attributes'?: Linter.RuleEntry<[]>;
|
|
6881
6897
|
/**
|
|
6882
6898
|
* Require non-empty specifier list in import and export statements.
|
|
6883
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6899
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/require-module-specifiers.md
|
|
6884
6900
|
*/
|
|
6885
6901
|
'unicorn/require-module-specifiers'?: Linter.RuleEntry<[]>;
|
|
6886
6902
|
/**
|
|
6887
6903
|
* Enforce using the digits argument with `Number#toFixed()`.
|
|
6888
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6904
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/require-number-to-fixed-digits-argument.md
|
|
6889
6905
|
*/
|
|
6890
6906
|
'unicorn/require-number-to-fixed-digits-argument'?: Linter.RuleEntry<[]>;
|
|
6891
6907
|
/**
|
|
6892
6908
|
* Enforce using the `targetOrigin` argument with `window.postMessage()`.
|
|
6893
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6909
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/require-post-message-target-origin.md
|
|
6894
6910
|
*/
|
|
6895
6911
|
'unicorn/require-post-message-target-origin'?: Linter.RuleEntry<[]>;
|
|
6896
6912
|
/**
|
|
6897
6913
|
* Enforce better string content.
|
|
6898
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6914
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/string-content.md
|
|
6899
6915
|
*/
|
|
6900
6916
|
'unicorn/string-content'?: Linter.RuleEntry<UnicornStringContent>;
|
|
6901
6917
|
/**
|
|
6902
6918
|
* Enforce consistent brace style for `case` clauses.
|
|
6903
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6919
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/switch-case-braces.md
|
|
6904
6920
|
*/
|
|
6905
6921
|
'unicorn/switch-case-braces'?: Linter.RuleEntry<UnicornSwitchCaseBraces>;
|
|
6906
6922
|
/**
|
|
6907
6923
|
* Fix whitespace-insensitive template indentation.
|
|
6908
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6924
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/template-indent.md
|
|
6909
6925
|
*/
|
|
6910
6926
|
'unicorn/template-indent'?: Linter.RuleEntry<UnicornTemplateIndent>;
|
|
6911
6927
|
/**
|
|
6912
6928
|
* Enforce consistent case for text encoding identifiers.
|
|
6913
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6929
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/text-encoding-identifier-case.md
|
|
6914
6930
|
*/
|
|
6915
6931
|
'unicorn/text-encoding-identifier-case'?: Linter.RuleEntry<UnicornTextEncodingIdentifierCase>;
|
|
6916
6932
|
/**
|
|
6917
6933
|
* Require `new` when creating an error.
|
|
6918
|
-
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/
|
|
6934
|
+
* @see https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v63.0.0/docs/rules/throw-new-error.md
|
|
6919
6935
|
*/
|
|
6920
6936
|
'unicorn/throw-new-error'?: Linter.RuleEntry<[]>;
|
|
6921
6937
|
/**
|
|
@@ -7542,15 +7558,24 @@ type StylisticCurlyNewline = [] | [(("always" | "never") | {
|
|
|
7542
7558
|
consistent?: boolean;
|
|
7543
7559
|
})]; // ----- @stylistic/dot-location -----
|
|
7544
7560
|
type StylisticDotLocation = [] | [("object" | "property")]; // ----- @stylistic/eol-last -----
|
|
7545
|
-
type StylisticEolLast = [] | [("always" | "never" | "unix" | "windows")]; // ----- @stylistic/exp-
|
|
7561
|
+
type StylisticEolLast = [] | [("always" | "never" | "unix" | "windows")]; // ----- @stylistic/exp-jsx-props-style -----
|
|
7562
|
+
type StylisticExpJsxPropsStyle = [] | [{
|
|
7563
|
+
singleLine?: {
|
|
7564
|
+
maxItems?: number;
|
|
7565
|
+
};
|
|
7566
|
+
multiLine?: {
|
|
7567
|
+
minItems?: number;
|
|
7568
|
+
maxItemsPerLine?: number;
|
|
7569
|
+
};
|
|
7570
|
+
}]; // ----- @stylistic/exp-list-style -----
|
|
7546
7571
|
type StylisticExpListStyle = [] | [{
|
|
7547
7572
|
singleLine?: _StylisticExpListStyle_SingleLineConfig;
|
|
7548
7573
|
multiLine?: _StylisticExpListStyle_MultiLineConfig;
|
|
7549
7574
|
overrides?: {
|
|
7575
|
+
"()"?: _StylisticExpListStyle_BaseConfig;
|
|
7550
7576
|
"[]"?: _StylisticExpListStyle_BaseConfig;
|
|
7551
7577
|
"{}"?: _StylisticExpListStyle_BaseConfig;
|
|
7552
7578
|
"<>"?: _StylisticExpListStyle_BaseConfig;
|
|
7553
|
-
"()"?: _StylisticExpListStyle_BaseConfig;
|
|
7554
7579
|
ArrayExpression?: _StylisticExpListStyle_BaseConfig;
|
|
7555
7580
|
ArrayPattern?: _StylisticExpListStyle_BaseConfig;
|
|
7556
7581
|
ArrowFunctionExpression?: _StylisticExpListStyle_BaseConfig;
|
|
@@ -7558,21 +7583,22 @@ type StylisticExpListStyle = [] | [{
|
|
|
7558
7583
|
ExportNamedDeclaration?: _StylisticExpListStyle_BaseConfig;
|
|
7559
7584
|
FunctionDeclaration?: _StylisticExpListStyle_BaseConfig;
|
|
7560
7585
|
FunctionExpression?: _StylisticExpListStyle_BaseConfig;
|
|
7561
|
-
|
|
7586
|
+
IfStatement?: _StylisticExpListStyle_BaseConfig;
|
|
7562
7587
|
ImportAttributes?: _StylisticExpListStyle_BaseConfig;
|
|
7588
|
+
ImportDeclaration?: _StylisticExpListStyle_BaseConfig;
|
|
7589
|
+
JSONArrayExpression?: _StylisticExpListStyle_BaseConfig;
|
|
7590
|
+
JSONObjectExpression?: _StylisticExpListStyle_BaseConfig;
|
|
7563
7591
|
NewExpression?: _StylisticExpListStyle_BaseConfig;
|
|
7564
7592
|
ObjectExpression?: _StylisticExpListStyle_BaseConfig;
|
|
7565
7593
|
ObjectPattern?: _StylisticExpListStyle_BaseConfig;
|
|
7566
7594
|
TSDeclareFunction?: _StylisticExpListStyle_BaseConfig;
|
|
7595
|
+
TSEnumBody?: _StylisticExpListStyle_BaseConfig;
|
|
7567
7596
|
TSFunctionType?: _StylisticExpListStyle_BaseConfig;
|
|
7568
7597
|
TSInterfaceBody?: _StylisticExpListStyle_BaseConfig;
|
|
7569
|
-
TSEnumBody?: _StylisticExpListStyle_BaseConfig;
|
|
7570
7598
|
TSTupleType?: _StylisticExpListStyle_BaseConfig;
|
|
7571
7599
|
TSTypeLiteral?: _StylisticExpListStyle_BaseConfig;
|
|
7572
7600
|
TSTypeParameterDeclaration?: _StylisticExpListStyle_BaseConfig;
|
|
7573
7601
|
TSTypeParameterInstantiation?: _StylisticExpListStyle_BaseConfig;
|
|
7574
|
-
JSONArrayExpression?: _StylisticExpListStyle_BaseConfig;
|
|
7575
|
-
JSONObjectExpression?: _StylisticExpListStyle_BaseConfig;
|
|
7576
7602
|
};
|
|
7577
7603
|
}];
|
|
7578
7604
|
interface _StylisticExpListStyle_SingleLineConfig {
|
|
@@ -9213,7 +9239,10 @@ type TypescriptEslintNoUseBeforeDefine = [] | [("nofunc" | {
|
|
|
9213
9239
|
ignoreTypeReferences?: boolean;
|
|
9214
9240
|
typedefs?: boolean;
|
|
9215
9241
|
variables?: boolean;
|
|
9216
|
-
})]; // ----- @typescript-eslint/no-
|
|
9242
|
+
})]; // ----- @typescript-eslint/no-useless-default-assignment -----
|
|
9243
|
+
type TypescriptEslintNoUselessDefaultAssignment = [] | [{
|
|
9244
|
+
allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing?: boolean;
|
|
9245
|
+
}]; // ----- @typescript-eslint/no-var-requires -----
|
|
9217
9246
|
type TypescriptEslintNoVarRequires = [] | [{
|
|
9218
9247
|
allow?: string[];
|
|
9219
9248
|
}]; // ----- @typescript-eslint/only-throw-error -----
|
|
@@ -10606,6 +10635,7 @@ type JsdocTypeFormatting = [] | [{
|
|
|
10606
10635
|
postNewSpacing?: string;
|
|
10607
10636
|
separatorForSingleObjectField?: boolean;
|
|
10608
10637
|
stringQuotes?: ("double" | "single");
|
|
10638
|
+
trailingPunctuationMultilineOnly?: boolean;
|
|
10609
10639
|
typeBracketSpacing?: string;
|
|
10610
10640
|
unionSpacing?: string;
|
|
10611
10641
|
}]; // ----- jsdoc/valid-types -----
|
|
@@ -11947,7 +11977,7 @@ type PerfectionistSortArrayIncludes = {
|
|
|
11947
11977
|
pattern: string;
|
|
11948
11978
|
flags?: string;
|
|
11949
11979
|
} | string));
|
|
11950
|
-
selector?:
|
|
11980
|
+
selector?: "literal";
|
|
11951
11981
|
}, ...({
|
|
11952
11982
|
elementNamePattern?: (({
|
|
11953
11983
|
pattern: string;
|
|
@@ -11956,7 +11986,7 @@ type PerfectionistSortArrayIncludes = {
|
|
|
11956
11986
|
pattern: string;
|
|
11957
11987
|
flags?: string;
|
|
11958
11988
|
} | string));
|
|
11959
|
-
selector?:
|
|
11989
|
+
selector?: "literal";
|
|
11960
11990
|
})[]];
|
|
11961
11991
|
} | {
|
|
11962
11992
|
fallbackSort?: {
|
|
@@ -11974,7 +12004,7 @@ type PerfectionistSortArrayIncludes = {
|
|
|
11974
12004
|
pattern: string;
|
|
11975
12005
|
flags?: string;
|
|
11976
12006
|
} | string));
|
|
11977
|
-
selector?:
|
|
12007
|
+
selector?: "literal";
|
|
11978
12008
|
})[];
|
|
11979
12009
|
newlinesInside?: (("ignore" | number) | "newlinesBetween");
|
|
11980
12010
|
groups?: (string | [string, ...(string)[]] | {
|
|
@@ -12141,6 +12171,7 @@ type PerfectionistSortClasses = [] | [{
|
|
|
12141
12171
|
order?: ("asc" | "desc");
|
|
12142
12172
|
})[];
|
|
12143
12173
|
newlinesBetween?: ("ignore" | number);
|
|
12174
|
+
useExperimentalDependencyDetection?: boolean;
|
|
12144
12175
|
ignoreCallbackDependenciesPatterns?: (({
|
|
12145
12176
|
pattern: string;
|
|
12146
12177
|
flags?: string;
|
|
@@ -14027,7 +14058,7 @@ type PerfectionistSortSets = {
|
|
|
14027
14058
|
pattern: string;
|
|
14028
14059
|
flags?: string;
|
|
14029
14060
|
} | string));
|
|
14030
|
-
selector?:
|
|
14061
|
+
selector?: "literal";
|
|
14031
14062
|
}, ...({
|
|
14032
14063
|
elementNamePattern?: (({
|
|
14033
14064
|
pattern: string;
|
|
@@ -14036,7 +14067,7 @@ type PerfectionistSortSets = {
|
|
|
14036
14067
|
pattern: string;
|
|
14037
14068
|
flags?: string;
|
|
14038
14069
|
} | string));
|
|
14039
|
-
selector?:
|
|
14070
|
+
selector?: "literal";
|
|
14040
14071
|
})[]];
|
|
14041
14072
|
} | {
|
|
14042
14073
|
fallbackSort?: {
|
|
@@ -14054,7 +14085,7 @@ type PerfectionistSortSets = {
|
|
|
14054
14085
|
pattern: string;
|
|
14055
14086
|
flags?: string;
|
|
14056
14087
|
} | string));
|
|
14057
|
-
selector?:
|
|
14088
|
+
selector?: "literal";
|
|
14058
14089
|
})[];
|
|
14059
14090
|
newlinesInside?: (("ignore" | number) | "newlinesBetween");
|
|
14060
14091
|
groups?: (string | [string, ...(string)[]] | {
|
|
@@ -14551,9 +14582,9 @@ type ReactNamingConventionUseState = [] | [{
|
|
|
14551
14582
|
enforceSetterName?: boolean;
|
|
14552
14583
|
}]; // ----- react-refresh/only-export-components -----
|
|
14553
14584
|
type ReactRefreshOnlyExportComponents = [] | [{
|
|
14585
|
+
extraHOCs?: string[];
|
|
14554
14586
|
allowExportNames?: string[];
|
|
14555
14587
|
allowConstantExport?: boolean;
|
|
14556
|
-
customHOCs?: string[];
|
|
14557
14588
|
checkJS?: boolean;
|
|
14558
14589
|
}]; // ----- react-x/jsx-shorthand-boolean -----
|
|
14559
14590
|
type ReactXJsxShorthandBoolean = [] | [(-1 | 1)]; // ----- react-x/jsx-shorthand-fragment -----
|
|
@@ -14852,7 +14883,15 @@ interface _UnicornImportStyle_ModuleStyles {
|
|
|
14852
14883
|
}
|
|
14853
14884
|
interface _UnicornImportStyle_BooleanObject {
|
|
14854
14885
|
[k: string]: boolean | undefined;
|
|
14855
|
-
} // ----- unicorn/
|
|
14886
|
+
} // ----- unicorn/isolated-functions -----
|
|
14887
|
+
type UnicornIsolatedFunctions = [] | [{
|
|
14888
|
+
overrideGlobals?: {
|
|
14889
|
+
[k: string]: (boolean | ("readonly" | "writable" | "writeable" | "off")) | undefined;
|
|
14890
|
+
};
|
|
14891
|
+
functions?: string[];
|
|
14892
|
+
selectors?: string[];
|
|
14893
|
+
comments?: string[];
|
|
14894
|
+
}]; // ----- unicorn/no-array-reduce -----
|
|
14856
14895
|
type UnicornNoArrayReduce = [] | [{
|
|
14857
14896
|
allowSimpleOperations?: boolean;
|
|
14858
14897
|
}]; // ----- unicorn/no-array-reverse -----
|