eslint-config-typed 3.13.7 → 3.14.1
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/plugins/react-coding-style/rules/use-memo-hooks-style.mjs +2 -1
- package/dist/plugins/react-coding-style/rules/use-memo-hooks-style.mjs.map +1 -1
- package/dist/plugins/vitest-coding-style/rules/no-expect-to-strict-equal.mjs +2 -2
- package/dist/plugins/vitest-coding-style/rules/no-expect-to-strict-equal.mjs.map +1 -1
- package/dist/plugins/vitest-coding-style/rules/prefer-assert-not-ok-over-assert-is-not-ok.d.mts +6 -0
- package/dist/plugins/vitest-coding-style/rules/prefer-assert-not-ok-over-assert-is-not-ok.d.mts.map +1 -0
- package/dist/plugins/vitest-coding-style/rules/prefer-assert-not-ok-over-assert-is-not-ok.mjs +35 -0
- package/dist/plugins/vitest-coding-style/rules/prefer-assert-not-ok-over-assert-is-not-ok.mjs.map +1 -0
- package/dist/plugins/vitest-coding-style/rules/prefer-assert-not-ok-over-expect-false.d.mts +6 -0
- package/dist/plugins/vitest-coding-style/rules/prefer-assert-not-ok-over-expect-false.d.mts.map +1 -0
- package/dist/plugins/vitest-coding-style/rules/prefer-assert-not-ok-over-expect-false.mjs +54 -0
- package/dist/plugins/vitest-coding-style/rules/prefer-assert-not-ok-over-expect-false.mjs.map +1 -0
- package/dist/plugins/vitest-coding-style/rules/prefer-assert-over-assert-ok.d.mts +6 -0
- package/dist/plugins/vitest-coding-style/rules/prefer-assert-over-assert-ok.d.mts.map +1 -0
- package/dist/plugins/vitest-coding-style/rules/prefer-assert-over-assert-ok.mjs +35 -0
- package/dist/plugins/vitest-coding-style/rules/prefer-assert-over-assert-ok.mjs.map +1 -0
- package/dist/plugins/vitest-coding-style/rules/prefer-assert-over-expect-true.d.mts +6 -0
- package/dist/plugins/vitest-coding-style/rules/prefer-assert-over-expect-true.d.mts.map +1 -0
- package/dist/plugins/vitest-coding-style/rules/prefer-assert-over-expect-true.mjs +54 -0
- package/dist/plugins/vitest-coding-style/rules/prefer-assert-over-expect-true.mjs.map +1 -0
- package/dist/plugins/vitest-coding-style/rules/rules.d.mts +4 -0
- package/dist/plugins/vitest-coding-style/rules/rules.d.mts.map +1 -1
- package/dist/plugins/vitest-coding-style/rules/rules.mjs +8 -0
- package/dist/plugins/vitest-coding-style/rules/rules.mjs.map +1 -1
- package/dist/rules/eslint-jest-rules.d.mts +1 -0
- package/dist/rules/eslint-jest-rules.d.mts.map +1 -1
- package/dist/rules/eslint-jest-rules.mjs +1 -0
- package/dist/rules/eslint-jest-rules.mjs.map +1 -1
- package/dist/rules/eslint-vitest-coding-style-rules.d.mts +4 -0
- package/dist/rules/eslint-vitest-coding-style-rules.d.mts.map +1 -1
- package/dist/rules/eslint-vitest-coding-style-rules.mjs +4 -0
- package/dist/rules/eslint-vitest-coding-style-rules.mjs.map +1 -1
- package/dist/rules/eslint-vitest-rules.d.mts +7 -0
- package/dist/rules/eslint-vitest-rules.d.mts.map +1 -1
- package/dist/rules/eslint-vitest-rules.mjs +10 -0
- package/dist/rules/eslint-vitest-rules.mjs.map +1 -1
- package/dist/types/rules/eslint-jest-rules.d.mts +104 -63
- package/dist/types/rules/eslint-jest-rules.d.mts.map +1 -1
- package/dist/types/rules/eslint-react-rules.d.mts +1 -1
- package/dist/types/rules/eslint-react-rules.d.mts.map +1 -1
- package/dist/types/rules/eslint-rules.d.mts +4 -4
- package/dist/types/rules/eslint-rules.d.mts.map +1 -1
- package/dist/types/rules/eslint-vitest-coding-style-rules.d.mts +62 -1
- package/dist/types/rules/eslint-vitest-coding-style-rules.d.mts.map +1 -1
- package/dist/types/rules/eslint-vitest-rules.d.mts +86 -1
- package/dist/types/rules/eslint-vitest-rules.d.mts.map +1 -1
- package/dist/types/rules/typescript-eslint-rules.d.mts +1 -1
- package/dist/types/rules/typescript-eslint-rules.d.mts.map +1 -1
- package/package.json +19 -19
- package/src/plugins/react-coding-style/rules/use-memo-hooks-style.mts +2 -1
- package/src/plugins/vitest-coding-style/rules/no-expect-to-strict-equal.mts +2 -2
- package/src/plugins/vitest-coding-style/rules/prefer-assert-coding-style-rules.test.mts +95 -0
- package/src/plugins/vitest-coding-style/rules/prefer-assert-not-ok-over-assert-is-not-ok.mts +42 -0
- package/src/plugins/vitest-coding-style/rules/prefer-assert-not-ok-over-expect-false.mts +74 -0
- package/src/plugins/vitest-coding-style/rules/prefer-assert-over-assert-ok.mts +42 -0
- package/src/plugins/vitest-coding-style/rules/prefer-assert-over-expect-true.mts +74 -0
- package/src/plugins/vitest-coding-style/rules/rules.mts +12 -0
- package/src/rules/eslint-jest-rules.mts +2 -0
- package/src/rules/eslint-vitest-coding-style-rules.mts +4 -0
- package/src/rules/eslint-vitest-rules.mts +11 -0
- package/src/types/rules/eslint-jest-rules.mts +109 -63
- package/src/types/rules/eslint-react-rules.mts +0 -1
- package/src/types/rules/eslint-rules.mts +0 -4
- package/src/types/rules/eslint-vitest-coding-style-rules.mts +66 -1
- package/src/types/rules/eslint-vitest-rules.mts +92 -1
- package/src/types/rules/typescript-eslint-rules.mts +0 -1
|
@@ -10,7 +10,7 @@ type SpreadOptionsIfIsArray<
|
|
|
10
10
|
/**
|
|
11
11
|
* Enforce `test` and `it` usage conventions
|
|
12
12
|
*
|
|
13
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
13
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/consistent-test-it.md
|
|
14
14
|
*
|
|
15
15
|
* ```md
|
|
16
16
|
* | key | value |
|
|
@@ -63,7 +63,7 @@ namespace ConsistentTestIt {
|
|
|
63
63
|
/**
|
|
64
64
|
* Enforce assertion to be made in a test body
|
|
65
65
|
*
|
|
66
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
66
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/expect-expect.md
|
|
67
67
|
*
|
|
68
68
|
* ```md
|
|
69
69
|
* | key | value |
|
|
@@ -113,7 +113,7 @@ namespace ExpectExpect {
|
|
|
113
113
|
/**
|
|
114
114
|
* Enforces a maximum number assertion calls in a test body
|
|
115
115
|
*
|
|
116
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
116
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/max-expects.md
|
|
117
117
|
*
|
|
118
118
|
* ```md
|
|
119
119
|
* | key | value |
|
|
@@ -154,7 +154,7 @@ namespace MaxExpects {
|
|
|
154
154
|
/**
|
|
155
155
|
* Enforces a maximum depth to nested describe calls
|
|
156
156
|
*
|
|
157
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
157
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/max-nested-describe.md
|
|
158
158
|
*
|
|
159
159
|
* ```md
|
|
160
160
|
* | key | value |
|
|
@@ -195,7 +195,7 @@ namespace MaxNestedDescribe {
|
|
|
195
195
|
/**
|
|
196
196
|
* Disallow alias methods
|
|
197
197
|
*
|
|
198
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
198
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/no-alias-methods.md
|
|
199
199
|
*
|
|
200
200
|
* ```md
|
|
201
201
|
* | key | value |
|
|
@@ -212,7 +212,7 @@ namespace NoAliasMethods {
|
|
|
212
212
|
/**
|
|
213
213
|
* Disallow commented out tests
|
|
214
214
|
*
|
|
215
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
215
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/no-commented-out-tests.md
|
|
216
216
|
*
|
|
217
217
|
* ```md
|
|
218
218
|
* | key | value |
|
|
@@ -228,7 +228,7 @@ namespace NoCommentedOutTests {
|
|
|
228
228
|
/**
|
|
229
229
|
* Disallow calling `expect` conditionally
|
|
230
230
|
*
|
|
231
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
231
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/no-conditional-expect.md
|
|
232
232
|
*
|
|
233
233
|
* ```md
|
|
234
234
|
* | key | value |
|
|
@@ -244,7 +244,7 @@ namespace NoConditionalExpect {
|
|
|
244
244
|
/**
|
|
245
245
|
* Disallow conditional logic in tests
|
|
246
246
|
*
|
|
247
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
247
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/no-conditional-in-test.md
|
|
248
248
|
*
|
|
249
249
|
* ```md
|
|
250
250
|
* | key | value |
|
|
@@ -260,7 +260,7 @@ namespace NoConditionalInTest {
|
|
|
260
260
|
/**
|
|
261
261
|
* Disallow confusing usages of jest.setTimeout
|
|
262
262
|
*
|
|
263
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
263
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/no-confusing-set-timeout.md
|
|
264
264
|
*
|
|
265
265
|
* ```md
|
|
266
266
|
* | key | value |
|
|
@@ -276,7 +276,7 @@ namespace NoConfusingSetTimeout {
|
|
|
276
276
|
/**
|
|
277
277
|
* Disallow use of deprecated functions
|
|
278
278
|
*
|
|
279
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
279
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/no-deprecated-functions.md
|
|
280
280
|
*
|
|
281
281
|
* ```md
|
|
282
282
|
* | key | value |
|
|
@@ -293,7 +293,7 @@ namespace NoDeprecatedFunctions {
|
|
|
293
293
|
/**
|
|
294
294
|
* Disallow disabled tests
|
|
295
295
|
*
|
|
296
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
296
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/no-disabled-tests.md
|
|
297
297
|
*
|
|
298
298
|
* ```md
|
|
299
299
|
* | key | value |
|
|
@@ -309,7 +309,7 @@ namespace NoDisabledTests {
|
|
|
309
309
|
/**
|
|
310
310
|
* Disallow using a callback in asynchronous tests and hooks
|
|
311
311
|
*
|
|
312
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
312
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/no-done-callback.md
|
|
313
313
|
*
|
|
314
314
|
* ```md
|
|
315
315
|
* | key | value |
|
|
@@ -326,7 +326,7 @@ namespace NoDoneCallback {
|
|
|
326
326
|
/**
|
|
327
327
|
* Disallow duplicate setup and teardown hooks
|
|
328
328
|
*
|
|
329
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
329
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/no-duplicate-hooks.md
|
|
330
330
|
*
|
|
331
331
|
* ```md
|
|
332
332
|
* | key | value |
|
|
@@ -342,7 +342,7 @@ namespace NoDuplicateHooks {
|
|
|
342
342
|
/**
|
|
343
343
|
* Disallow using `exports` in files containing tests
|
|
344
344
|
*
|
|
345
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
345
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/no-export.md
|
|
346
346
|
*
|
|
347
347
|
* ```md
|
|
348
348
|
* | key | value |
|
|
@@ -358,7 +358,7 @@ namespace NoExport {
|
|
|
358
358
|
/**
|
|
359
359
|
* Disallow focused tests
|
|
360
360
|
*
|
|
361
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
361
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/no-focused-tests.md
|
|
362
362
|
*
|
|
363
363
|
* ```md
|
|
364
364
|
* | key | value |
|
|
@@ -375,7 +375,7 @@ namespace NoFocusedTests {
|
|
|
375
375
|
/**
|
|
376
376
|
* Disallow setup and teardown hooks
|
|
377
377
|
*
|
|
378
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
378
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/no-hooks.md
|
|
379
379
|
*
|
|
380
380
|
* ```md
|
|
381
381
|
* | key | value |
|
|
@@ -421,7 +421,7 @@ namespace NoHooks {
|
|
|
421
421
|
/**
|
|
422
422
|
* Disallow identical titles
|
|
423
423
|
*
|
|
424
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
424
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/no-identical-title.md
|
|
425
425
|
*
|
|
426
426
|
* ```md
|
|
427
427
|
* | key | value |
|
|
@@ -437,7 +437,7 @@ namespace NoIdenticalTitle {
|
|
|
437
437
|
/**
|
|
438
438
|
* Disallow string interpolation inside snapshots
|
|
439
439
|
*
|
|
440
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
440
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/no-interpolation-in-snapshots.md
|
|
441
441
|
*
|
|
442
442
|
* ```md
|
|
443
443
|
* | key | value |
|
|
@@ -453,7 +453,7 @@ namespace NoInterpolationInSnapshots {
|
|
|
453
453
|
/**
|
|
454
454
|
* Disallow Jasmine globals
|
|
455
455
|
*
|
|
456
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
456
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/no-jasmine-globals.md
|
|
457
457
|
*
|
|
458
458
|
* ```md
|
|
459
459
|
* | key | value |
|
|
@@ -470,7 +470,7 @@ namespace NoJasmineGlobals {
|
|
|
470
470
|
/**
|
|
471
471
|
* Disallow large snapshots
|
|
472
472
|
*
|
|
473
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
473
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/no-large-snapshots.md
|
|
474
474
|
*
|
|
475
475
|
* ```md
|
|
476
476
|
* | key | value |
|
|
@@ -521,7 +521,7 @@ namespace NoLargeSnapshots {
|
|
|
521
521
|
/**
|
|
522
522
|
* Disallow manually importing from `__mocks__`
|
|
523
523
|
*
|
|
524
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
524
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/no-mocks-import.md
|
|
525
525
|
*
|
|
526
526
|
* ```md
|
|
527
527
|
* | key | value |
|
|
@@ -537,7 +537,7 @@ namespace NoMocksImport {
|
|
|
537
537
|
/**
|
|
538
538
|
* Disallow specific `jest.` methods
|
|
539
539
|
*
|
|
540
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
540
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/no-restricted-jest-methods.md
|
|
541
541
|
*
|
|
542
542
|
* ```md
|
|
543
543
|
* | key | value |
|
|
@@ -575,7 +575,7 @@ namespace NoRestrictedJestMethods {
|
|
|
575
575
|
/**
|
|
576
576
|
* Disallow specific matchers & modifiers
|
|
577
577
|
*
|
|
578
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
578
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/no-restricted-matchers.md
|
|
579
579
|
*
|
|
580
580
|
* ```md
|
|
581
581
|
* | key | value |
|
|
@@ -613,7 +613,7 @@ namespace NoRestrictedMatchers {
|
|
|
613
613
|
/**
|
|
614
614
|
* Disallow using `expect` outside of `it` or `test` blocks
|
|
615
615
|
*
|
|
616
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
616
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/no-standalone-expect.md
|
|
617
617
|
*
|
|
618
618
|
* ```md
|
|
619
619
|
* | key | value |
|
|
@@ -656,7 +656,7 @@ namespace NoStandaloneExpect {
|
|
|
656
656
|
/**
|
|
657
657
|
* Require using `.only` and `.skip` over `f` and `x`
|
|
658
658
|
*
|
|
659
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
659
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/no-test-prefixes.md
|
|
660
660
|
*
|
|
661
661
|
* ```md
|
|
662
662
|
* | key | value |
|
|
@@ -673,7 +673,7 @@ namespace NoTestPrefixes {
|
|
|
673
673
|
/**
|
|
674
674
|
* Disallow explicitly returning from tests
|
|
675
675
|
*
|
|
676
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
676
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/no-test-return-statement.md
|
|
677
677
|
*
|
|
678
678
|
* ```md
|
|
679
679
|
* | key | value |
|
|
@@ -689,7 +689,7 @@ namespace NoTestReturnStatement {
|
|
|
689
689
|
/**
|
|
690
690
|
* Disallow using `jest.mock()` factories without an explicit type parameter
|
|
691
691
|
*
|
|
692
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
692
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/no-untyped-mock-factory.md
|
|
693
693
|
*
|
|
694
694
|
* ```md
|
|
695
695
|
* | key | value |
|
|
@@ -706,7 +706,7 @@ namespace NoUntypedMockFactory {
|
|
|
706
706
|
/**
|
|
707
707
|
* Enforce padding around `afterAll` blocks
|
|
708
708
|
*
|
|
709
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
709
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/padding-around-after-all-blocks.md
|
|
710
710
|
*
|
|
711
711
|
* ```md
|
|
712
712
|
* | key | value |
|
|
@@ -723,7 +723,7 @@ namespace PaddingAroundAfterAllBlocks {
|
|
|
723
723
|
/**
|
|
724
724
|
* Enforce padding around `afterEach` blocks
|
|
725
725
|
*
|
|
726
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
726
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/padding-around-after-each-blocks.md
|
|
727
727
|
*
|
|
728
728
|
* ```md
|
|
729
729
|
* | key | value |
|
|
@@ -740,7 +740,7 @@ namespace PaddingAroundAfterEachBlocks {
|
|
|
740
740
|
/**
|
|
741
741
|
* Enforce padding around Jest functions
|
|
742
742
|
*
|
|
743
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
743
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/padding-around-all.md
|
|
744
744
|
*
|
|
745
745
|
* ```md
|
|
746
746
|
* | key | value |
|
|
@@ -757,7 +757,7 @@ namespace PaddingAroundAll {
|
|
|
757
757
|
/**
|
|
758
758
|
* Enforce padding around `beforeAll` blocks
|
|
759
759
|
*
|
|
760
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
760
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/padding-around-before-all-blocks.md
|
|
761
761
|
*
|
|
762
762
|
* ```md
|
|
763
763
|
* | key | value |
|
|
@@ -774,7 +774,7 @@ namespace PaddingAroundBeforeAllBlocks {
|
|
|
774
774
|
/**
|
|
775
775
|
* Enforce padding around `beforeEach` blocks
|
|
776
776
|
*
|
|
777
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
777
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/padding-around-before-each-blocks.md
|
|
778
778
|
*
|
|
779
779
|
* ```md
|
|
780
780
|
* | key | value |
|
|
@@ -791,7 +791,7 @@ namespace PaddingAroundBeforeEachBlocks {
|
|
|
791
791
|
/**
|
|
792
792
|
* Enforce padding around `describe` blocks
|
|
793
793
|
*
|
|
794
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
794
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/padding-around-describe-blocks.md
|
|
795
795
|
*
|
|
796
796
|
* ```md
|
|
797
797
|
* | key | value |
|
|
@@ -808,7 +808,7 @@ namespace PaddingAroundDescribeBlocks {
|
|
|
808
808
|
/**
|
|
809
809
|
* Enforce padding around `expect` groups
|
|
810
810
|
*
|
|
811
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
811
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/padding-around-expect-groups.md
|
|
812
812
|
*
|
|
813
813
|
* ```md
|
|
814
814
|
* | key | value |
|
|
@@ -825,7 +825,7 @@ namespace PaddingAroundExpectGroups {
|
|
|
825
825
|
/**
|
|
826
826
|
* Enforce padding around `test` and `it` blocks
|
|
827
827
|
*
|
|
828
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
828
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/padding-around-test-blocks.md
|
|
829
829
|
*
|
|
830
830
|
* ```md
|
|
831
831
|
* | key | value |
|
|
@@ -842,7 +842,7 @@ namespace PaddingAroundTestBlocks {
|
|
|
842
842
|
/**
|
|
843
843
|
* Suggest using `toBeCalledWith()` or `toHaveBeenCalledWith()`
|
|
844
844
|
*
|
|
845
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
845
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/prefer-called-with.md
|
|
846
846
|
*
|
|
847
847
|
* ```md
|
|
848
848
|
* | key | value |
|
|
@@ -858,7 +858,7 @@ namespace PreferCalledWith {
|
|
|
858
858
|
/**
|
|
859
859
|
* Suggest using the built-in comparison matchers
|
|
860
860
|
*
|
|
861
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
861
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/prefer-comparison-matcher.md
|
|
862
862
|
*
|
|
863
863
|
* ```md
|
|
864
864
|
* | key | value |
|
|
@@ -875,7 +875,7 @@ namespace PreferComparisonMatcher {
|
|
|
875
875
|
/**
|
|
876
876
|
* Prefer using `.each` rather than manual loops
|
|
877
877
|
*
|
|
878
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
878
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/prefer-each.md
|
|
879
879
|
*
|
|
880
880
|
* ```md
|
|
881
881
|
* | key | value |
|
|
@@ -891,7 +891,7 @@ namespace PreferEach {
|
|
|
891
891
|
/**
|
|
892
892
|
* Prefer having the last statement in a test be an assertion
|
|
893
893
|
*
|
|
894
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
894
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/prefer-ending-with-an-expect.md
|
|
895
895
|
*
|
|
896
896
|
* ```md
|
|
897
897
|
* | key | value |
|
|
@@ -941,7 +941,7 @@ namespace PreferEndingWithAnExpect {
|
|
|
941
941
|
/**
|
|
942
942
|
* Suggest using the built-in equality matchers
|
|
943
943
|
*
|
|
944
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
944
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/prefer-equality-matcher.md
|
|
945
945
|
*
|
|
946
946
|
* ```md
|
|
947
947
|
* | key | value |
|
|
@@ -958,7 +958,7 @@ namespace PreferEqualityMatcher {
|
|
|
958
958
|
/**
|
|
959
959
|
* Suggest using `expect.assertions()` OR `expect.hasAssertions()`
|
|
960
960
|
*
|
|
961
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
961
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/prefer-expect-assertions.md
|
|
962
962
|
*
|
|
963
963
|
* ```md
|
|
964
964
|
* | key | value |
|
|
@@ -1007,7 +1007,7 @@ namespace PreferExpectAssertions {
|
|
|
1007
1007
|
/**
|
|
1008
1008
|
* Prefer `await expect(...).resolves` over `expect(await ...)` syntax
|
|
1009
1009
|
*
|
|
1010
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
1010
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/prefer-expect-resolves.md
|
|
1011
1011
|
*
|
|
1012
1012
|
* ```md
|
|
1013
1013
|
* | key | value |
|
|
@@ -1024,7 +1024,7 @@ namespace PreferExpectResolves {
|
|
|
1024
1024
|
/**
|
|
1025
1025
|
* Prefer having hooks in a consistent order
|
|
1026
1026
|
*
|
|
1027
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
1027
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/prefer-hooks-in-order.md
|
|
1028
1028
|
*
|
|
1029
1029
|
* ```md
|
|
1030
1030
|
* | key | value |
|
|
@@ -1040,7 +1040,7 @@ namespace PreferHooksInOrder {
|
|
|
1040
1040
|
/**
|
|
1041
1041
|
* Suggest having hooks before any test cases
|
|
1042
1042
|
*
|
|
1043
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
1043
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/prefer-hooks-on-top.md
|
|
1044
1044
|
*
|
|
1045
1045
|
* ```md
|
|
1046
1046
|
* | key | value |
|
|
@@ -1056,7 +1056,7 @@ namespace PreferHooksOnTop {
|
|
|
1056
1056
|
/**
|
|
1057
1057
|
* Prefer importing Jest globals
|
|
1058
1058
|
*
|
|
1059
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
1059
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/prefer-importing-jest-globals.md
|
|
1060
1060
|
*
|
|
1061
1061
|
* ```md
|
|
1062
1062
|
* | key | value |
|
|
@@ -1115,7 +1115,7 @@ namespace PreferImportingJestGlobals {
|
|
|
1115
1115
|
/**
|
|
1116
1116
|
* Prefer `jest.mocked()` over `fn as jest.Mock`
|
|
1117
1117
|
*
|
|
1118
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
1118
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/prefer-jest-mocked.md
|
|
1119
1119
|
*
|
|
1120
1120
|
* ```md
|
|
1121
1121
|
* | key | value |
|
|
@@ -1132,7 +1132,7 @@ namespace PreferJestMocked {
|
|
|
1132
1132
|
/**
|
|
1133
1133
|
* Enforce lowercase test names
|
|
1134
1134
|
*
|
|
1135
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
1135
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/prefer-lowercase-title.md
|
|
1136
1136
|
*
|
|
1137
1137
|
* ```md
|
|
1138
1138
|
* | key | value |
|
|
@@ -1202,7 +1202,7 @@ namespace PreferLowercaseTitle {
|
|
|
1202
1202
|
/**
|
|
1203
1203
|
* Prefer mock resolved/rejected shorthands for promises
|
|
1204
1204
|
*
|
|
1205
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
1205
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/prefer-mock-promise-shorthand.md
|
|
1206
1206
|
*
|
|
1207
1207
|
* ```md
|
|
1208
1208
|
* | key | value |
|
|
@@ -1219,7 +1219,7 @@ namespace PreferMockPromiseShorthand {
|
|
|
1219
1219
|
/**
|
|
1220
1220
|
* Prefer including a hint with external snapshots
|
|
1221
1221
|
*
|
|
1222
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
1222
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/prefer-snapshot-hint.md
|
|
1223
1223
|
*
|
|
1224
1224
|
* ```md
|
|
1225
1225
|
* | key | value |
|
|
@@ -1255,7 +1255,7 @@ namespace PreferSnapshotHint {
|
|
|
1255
1255
|
/**
|
|
1256
1256
|
* Suggest using `jest.spyOn()`
|
|
1257
1257
|
*
|
|
1258
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
1258
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/prefer-spy-on.md
|
|
1259
1259
|
*
|
|
1260
1260
|
* ```md
|
|
1261
1261
|
* | key | value |
|
|
@@ -1272,7 +1272,7 @@ namespace PreferSpyOn {
|
|
|
1272
1272
|
/**
|
|
1273
1273
|
* Suggest using `toStrictEqual()`
|
|
1274
1274
|
*
|
|
1275
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
1275
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/prefer-strict-equal.md
|
|
1276
1276
|
*
|
|
1277
1277
|
* ```md
|
|
1278
1278
|
* | key | value |
|
|
@@ -1289,7 +1289,7 @@ namespace PreferStrictEqual {
|
|
|
1289
1289
|
/**
|
|
1290
1290
|
* Suggest using `toBe()` for primitive literals
|
|
1291
1291
|
*
|
|
1292
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
1292
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/prefer-to-be.md
|
|
1293
1293
|
*
|
|
1294
1294
|
* ```md
|
|
1295
1295
|
* | key | value |
|
|
@@ -1306,7 +1306,7 @@ namespace PreferToBe {
|
|
|
1306
1306
|
/**
|
|
1307
1307
|
* Suggest using `toContain()`
|
|
1308
1308
|
*
|
|
1309
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
1309
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/prefer-to-contain.md
|
|
1310
1310
|
*
|
|
1311
1311
|
* ```md
|
|
1312
1312
|
* | key | value |
|
|
@@ -1323,7 +1323,7 @@ namespace PreferToContain {
|
|
|
1323
1323
|
/**
|
|
1324
1324
|
* Suggest using `toHaveLength()`
|
|
1325
1325
|
*
|
|
1326
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
1326
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/prefer-to-have-length.md
|
|
1327
1327
|
*
|
|
1328
1328
|
* ```md
|
|
1329
1329
|
* | key | value |
|
|
@@ -1340,7 +1340,7 @@ namespace PreferToHaveLength {
|
|
|
1340
1340
|
/**
|
|
1341
1341
|
* Suggest using `test.todo`
|
|
1342
1342
|
*
|
|
1343
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
1343
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/prefer-todo.md
|
|
1344
1344
|
*
|
|
1345
1345
|
* ```md
|
|
1346
1346
|
* | key | value |
|
|
@@ -1357,7 +1357,7 @@ namespace PreferTodo {
|
|
|
1357
1357
|
/**
|
|
1358
1358
|
* Require setup and teardown code to be within a hook
|
|
1359
1359
|
*
|
|
1360
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
1360
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/require-hook.md
|
|
1361
1361
|
*
|
|
1362
1362
|
* ```md
|
|
1363
1363
|
* | key | value |
|
|
@@ -1400,7 +1400,7 @@ namespace RequireHook {
|
|
|
1400
1400
|
/**
|
|
1401
1401
|
* Require a message for `toThrow()`
|
|
1402
1402
|
*
|
|
1403
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
1403
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/require-to-throw-message.md
|
|
1404
1404
|
*
|
|
1405
1405
|
* ```md
|
|
1406
1406
|
* | key | value |
|
|
@@ -1416,7 +1416,7 @@ namespace RequireToThrowMessage {
|
|
|
1416
1416
|
/**
|
|
1417
1417
|
* Require test cases and hooks to be inside a `describe` block
|
|
1418
1418
|
*
|
|
1419
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
1419
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/require-top-level-describe.md
|
|
1420
1420
|
*
|
|
1421
1421
|
* ```md
|
|
1422
1422
|
* | key | value |
|
|
@@ -1457,7 +1457,7 @@ namespace RequireTopLevelDescribe {
|
|
|
1457
1457
|
/**
|
|
1458
1458
|
* Enforce unbound methods are called with their expected scope
|
|
1459
1459
|
*
|
|
1460
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
1460
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/unbound-method.md
|
|
1461
1461
|
*
|
|
1462
1462
|
* ```md
|
|
1463
1463
|
* | key | value |
|
|
@@ -1501,7 +1501,7 @@ namespace UnboundMethod {
|
|
|
1501
1501
|
/**
|
|
1502
1502
|
* Enforce valid `describe()` callback
|
|
1503
1503
|
*
|
|
1504
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
1504
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/valid-describe-callback.md
|
|
1505
1505
|
*
|
|
1506
1506
|
* ```md
|
|
1507
1507
|
* | key | value |
|
|
@@ -1517,7 +1517,7 @@ namespace ValidDescribeCallback {
|
|
|
1517
1517
|
/**
|
|
1518
1518
|
* Require promises that have expectations in their chain to be valid
|
|
1519
1519
|
*
|
|
1520
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
1520
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/valid-expect-in-promise.md
|
|
1521
1521
|
*
|
|
1522
1522
|
* ```md
|
|
1523
1523
|
* | key | value |
|
|
@@ -1533,7 +1533,7 @@ namespace ValidExpectInPromise {
|
|
|
1533
1533
|
/**
|
|
1534
1534
|
* Enforce valid `expect()` usage
|
|
1535
1535
|
*
|
|
1536
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
1536
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/valid-expect.md
|
|
1537
1537
|
*
|
|
1538
1538
|
* ```md
|
|
1539
1539
|
* | key | value |
|
|
@@ -1590,10 +1590,54 @@ namespace ValidExpect {
|
|
|
1590
1590
|
| SpreadOptionsIfIsArray<readonly [Linter.StringSeverity, Options]>;
|
|
1591
1591
|
}
|
|
1592
1592
|
|
|
1593
|
+
/**
|
|
1594
|
+
* Disallow mocking of non-existing module paths
|
|
1595
|
+
*
|
|
1596
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/valid-mock-module-path.md
|
|
1597
|
+
*
|
|
1598
|
+
* ```md
|
|
1599
|
+
* | key | value |
|
|
1600
|
+
* | :--------- | :------ |
|
|
1601
|
+
* | type | problem |
|
|
1602
|
+
* | deprecated | false |
|
|
1603
|
+
* ```
|
|
1604
|
+
*/
|
|
1605
|
+
namespace ValidMockModulePath {
|
|
1606
|
+
/**
|
|
1607
|
+
* ### schema
|
|
1608
|
+
*
|
|
1609
|
+
* ```json
|
|
1610
|
+
* [
|
|
1611
|
+
* {
|
|
1612
|
+
* "type": "object",
|
|
1613
|
+
* "properties": {
|
|
1614
|
+
* "moduleFileExtensions": {
|
|
1615
|
+
* "type": "array",
|
|
1616
|
+
* "items": {
|
|
1617
|
+
* "type": "string"
|
|
1618
|
+
* },
|
|
1619
|
+
* "additionalItems": false
|
|
1620
|
+
* }
|
|
1621
|
+
* },
|
|
1622
|
+
* "additionalProperties": false
|
|
1623
|
+
* }
|
|
1624
|
+
* ]
|
|
1625
|
+
* ```
|
|
1626
|
+
*/
|
|
1627
|
+
export type Options = Readonly<{
|
|
1628
|
+
moduleFileExtensions?: readonly string[];
|
|
1629
|
+
}>;
|
|
1630
|
+
|
|
1631
|
+
export type RuleEntry =
|
|
1632
|
+
| 'off'
|
|
1633
|
+
| Linter.Severity
|
|
1634
|
+
| SpreadOptionsIfIsArray<readonly [Linter.StringSeverity, Options]>;
|
|
1635
|
+
}
|
|
1636
|
+
|
|
1593
1637
|
/**
|
|
1594
1638
|
* Enforce valid titles
|
|
1595
1639
|
*
|
|
1596
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.1
|
|
1640
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.2.1/docs/rules/valid-title.md
|
|
1597
1641
|
*
|
|
1598
1642
|
* ```md
|
|
1599
1643
|
* | key | value |
|
|
@@ -1774,6 +1818,7 @@ export type EslintJestRules = Readonly<{
|
|
|
1774
1818
|
'jest/valid-describe-callback': ValidDescribeCallback.RuleEntry;
|
|
1775
1819
|
'jest/valid-expect-in-promise': ValidExpectInPromise.RuleEntry;
|
|
1776
1820
|
'jest/valid-expect': ValidExpect.RuleEntry;
|
|
1821
|
+
'jest/valid-mock-module-path': ValidMockModulePath.RuleEntry;
|
|
1777
1822
|
'jest/valid-title': ValidTitle.RuleEntry;
|
|
1778
1823
|
}>;
|
|
1779
1824
|
|
|
@@ -1796,5 +1841,6 @@ export type EslintJestRulesOption = Readonly<{
|
|
|
1796
1841
|
'jest/require-top-level-describe': RequireTopLevelDescribe.Options;
|
|
1797
1842
|
'jest/unbound-method': UnboundMethod.Options;
|
|
1798
1843
|
'jest/valid-expect': ValidExpect.Options;
|
|
1844
|
+
'jest/valid-mock-module-path': ValidMockModulePath.Options;
|
|
1799
1845
|
'jest/valid-title': ValidTitle.Options;
|
|
1800
1846
|
}>;
|
|
@@ -8439,7 +8439,6 @@ namespace NoRestrictedGlobals {
|
|
|
8439
8439
|
message?: string;
|
|
8440
8440
|
}>
|
|
8441
8441
|
)[]
|
|
8442
|
-
| readonly []
|
|
8443
8442
|
| readonly [
|
|
8444
8443
|
Readonly<{
|
|
8445
8444
|
/** @minItems 0 */
|
|
@@ -8704,7 +8703,6 @@ namespace NoRestrictedImports {
|
|
|
8704
8703
|
allowTypeImports?: boolean;
|
|
8705
8704
|
}>
|
|
8706
8705
|
)[]
|
|
8707
|
-
| readonly []
|
|
8708
8706
|
| readonly [
|
|
8709
8707
|
Readonly<{
|
|
8710
8708
|
paths?: readonly (
|
|
@@ -11019,14 +11017,12 @@ namespace ObjectShorthand {
|
|
|
11019
11017
|
| 'consistent'
|
|
11020
11018
|
| 'consistent-as-needed',
|
|
11021
11019
|
]
|
|
11022
|
-
| readonly ['always' | 'methods' | 'properties']
|
|
11023
11020
|
| readonly [
|
|
11024
11021
|
'always' | 'methods' | 'properties',
|
|
11025
11022
|
Readonly<{
|
|
11026
11023
|
avoidQuotes?: boolean;
|
|
11027
11024
|
}>,
|
|
11028
11025
|
]
|
|
11029
|
-
| readonly ['always' | 'methods']
|
|
11030
11026
|
| readonly [
|
|
11031
11027
|
'always' | 'methods',
|
|
11032
11028
|
Readonly<{
|