eslint-config-typed 4.2.1 → 4.3.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/README.md +4 -0
- package/dist/configs/immer.d.mts +3 -0
- package/dist/configs/immer.d.mts.map +1 -0
- package/dist/configs/immer.mjs +11 -0
- package/dist/configs/immer.mjs.map +1 -0
- package/dist/configs/index.d.mts +2 -0
- package/dist/configs/index.d.mts.map +1 -1
- package/dist/configs/index.mjs +2 -0
- package/dist/configs/index.mjs.map +1 -1
- package/dist/configs/plugins.d.mts +1 -1
- package/dist/configs/plugins.d.mts.map +1 -1
- package/dist/configs/plugins.mjs +2 -0
- package/dist/configs/plugins.mjs.map +1 -1
- package/dist/configs/ts-data-forge.d.mts +3 -0
- package/dist/configs/ts-data-forge.d.mts.map +1 -0
- package/dist/configs/ts-data-forge.mjs +11 -0
- package/dist/configs/ts-data-forge.mjs.map +1 -0
- package/dist/configs/typescript.d.mts.map +1 -1
- package/dist/configs/typescript.mjs +0 -2
- package/dist/configs/typescript.mjs.map +1 -1
- package/dist/entry-point.mjs +4 -0
- package/dist/entry-point.mjs.map +1 -1
- package/dist/index.mjs +4 -0
- package/dist/index.mjs.map +1 -1
- package/dist/plugins/index.d.mts +1 -0
- package/dist/plugins/index.d.mts.map +1 -1
- package/dist/plugins/index.mjs +1 -0
- package/dist/plugins/index.mjs.map +1 -1
- package/dist/plugins/ts-data-forge/index.d.mts +2 -0
- package/dist/plugins/ts-data-forge/index.d.mts.map +1 -0
- package/dist/plugins/ts-data-forge/index.mjs +2 -0
- package/dist/plugins/ts-data-forge/index.mjs.map +1 -0
- package/dist/plugins/ts-data-forge/plugin.d.mts +3 -0
- package/dist/plugins/ts-data-forge/plugin.d.mts.map +1 -0
- package/dist/plugins/ts-data-forge/plugin.mjs +8 -0
- package/dist/plugins/ts-data-forge/plugin.mjs.map +1 -0
- package/dist/plugins/ts-data-forge/rules/branded-number-types.d.mts +5 -0
- package/dist/plugins/ts-data-forge/rules/branded-number-types.d.mts.map +1 -0
- package/dist/plugins/ts-data-forge/rules/branded-number-types.mjs +35 -0
- package/dist/plugins/ts-data-forge/rules/branded-number-types.mjs.map +1 -0
- package/dist/plugins/ts-data-forge/rules/constants.d.mts +2 -0
- package/dist/plugins/ts-data-forge/rules/constants.d.mts.map +1 -0
- package/dist/plugins/ts-data-forge/rules/constants.mjs +4 -0
- package/dist/plugins/ts-data-forge/rules/constants.mjs.map +1 -0
- package/dist/plugins/ts-data-forge/rules/import-utils.d.mts +5 -0
- package/dist/plugins/ts-data-forge/rules/import-utils.d.mts.map +1 -0
- package/dist/plugins/ts-data-forge/rules/import-utils.mjs +31 -0
- package/dist/plugins/ts-data-forge/rules/import-utils.mjs.map +1 -0
- package/dist/plugins/ts-data-forge/rules/index.d.mts +2 -0
- package/dist/plugins/ts-data-forge/rules/index.d.mts.map +1 -0
- package/dist/plugins/ts-data-forge/rules/index.mjs +2 -0
- package/dist/plugins/ts-data-forge/rules/index.mjs.map +1 -0
- package/dist/plugins/ts-data-forge/rules/prefer-arr-is-array-at-least-length.d.mts +6 -0
- package/dist/plugins/ts-data-forge/rules/prefer-arr-is-array-at-least-length.d.mts.map +1 -0
- package/dist/plugins/ts-data-forge/rules/prefer-arr-is-array-at-least-length.mjs +94 -0
- package/dist/plugins/ts-data-forge/rules/prefer-arr-is-array-at-least-length.mjs.map +1 -0
- package/dist/plugins/ts-data-forge/rules/prefer-arr-is-array-of-length.d.mts +6 -0
- package/dist/plugins/ts-data-forge/rules/prefer-arr-is-array-of-length.d.mts.map +1 -0
- package/dist/plugins/ts-data-forge/rules/prefer-arr-is-array-of-length.mjs +95 -0
- package/dist/plugins/ts-data-forge/rules/prefer-arr-is-array-of-length.mjs.map +1 -0
- package/dist/plugins/ts-data-forge/rules/prefer-arr-is-array.d.mts +6 -0
- package/dist/plugins/ts-data-forge/rules/prefer-arr-is-array.d.mts.map +1 -0
- package/dist/plugins/ts-data-forge/rules/prefer-arr-is-array.mjs +72 -0
- package/dist/plugins/ts-data-forge/rules/prefer-arr-is-array.mjs.map +1 -0
- package/dist/plugins/ts-data-forge/rules/prefer-arr-is-non-empty.d.mts +6 -0
- package/dist/plugins/ts-data-forge/rules/prefer-arr-is-non-empty.d.mts.map +1 -0
- package/dist/plugins/ts-data-forge/rules/prefer-arr-is-non-empty.mjs +71 -0
- package/dist/plugins/ts-data-forge/rules/prefer-arr-is-non-empty.mjs.map +1 -0
- package/dist/plugins/ts-data-forge/rules/prefer-arr-sum.d.mts +6 -0
- package/dist/plugins/ts-data-forge/rules/prefer-arr-sum.d.mts.map +1 -0
- package/dist/plugins/ts-data-forge/rules/prefer-arr-sum.mjs +183 -0
- package/dist/plugins/ts-data-forge/rules/prefer-arr-sum.mjs.map +1 -0
- package/dist/plugins/ts-data-forge/rules/prefer-as-int.d.mts +6 -0
- package/dist/plugins/ts-data-forge/rules/prefer-as-int.d.mts.map +1 -0
- package/dist/plugins/ts-data-forge/rules/prefer-as-int.mjs +86 -0
- package/dist/plugins/ts-data-forge/rules/prefer-as-int.mjs.map +1 -0
- package/dist/plugins/ts-data-forge/rules/prefer-is-non-null-object.d.mts +6 -0
- package/dist/plugins/ts-data-forge/rules/prefer-is-non-null-object.d.mts.map +1 -0
- package/dist/plugins/ts-data-forge/rules/prefer-is-non-null-object.mjs +103 -0
- package/dist/plugins/ts-data-forge/rules/prefer-is-non-null-object.mjs.map +1 -0
- package/dist/plugins/ts-data-forge/rules/prefer-is-record-and-has-key.d.mts +6 -0
- package/dist/plugins/ts-data-forge/rules/prefer-is-record-and-has-key.d.mts.map +1 -0
- package/dist/plugins/ts-data-forge/rules/prefer-is-record-and-has-key.mjs +105 -0
- package/dist/plugins/ts-data-forge/rules/prefer-is-record-and-has-key.mjs.map +1 -0
- package/dist/plugins/ts-data-forge/rules/prefer-range-for-loop.d.mts +6 -0
- package/dist/plugins/ts-data-forge/rules/prefer-range-for-loop.d.mts.map +1 -0
- package/dist/plugins/ts-data-forge/rules/prefer-range-for-loop.mjs +130 -0
- package/dist/plugins/ts-data-forge/rules/prefer-range-for-loop.mjs.map +1 -0
- package/dist/plugins/ts-data-forge/rules/rules.d.mts +12 -0
- package/dist/plugins/ts-data-forge/rules/rules.d.mts.map +1 -0
- package/dist/plugins/ts-data-forge/rules/rules.mjs +24 -0
- package/dist/plugins/ts-data-forge/rules/rules.mjs.map +1 -0
- package/dist/plugins/ts-restrictions/rules/check-destructuring-completeness.d.mts.map +1 -1
- package/dist/plugins/ts-restrictions/rules/check-destructuring-completeness.mjs +6 -8
- package/dist/plugins/ts-restrictions/rules/check-destructuring-completeness.mjs.map +1 -1
- package/dist/plugins/ts-restrictions/rules/no-restricted-cast-name.d.mts.map +1 -1
- package/dist/plugins/ts-restrictions/rules/no-restricted-cast-name.mjs +11 -15
- package/dist/plugins/ts-restrictions/rules/no-restricted-cast-name.mjs.map +1 -1
- package/dist/rules/eslint-jest-rules.d.mts +3 -0
- package/dist/rules/eslint-jest-rules.d.mts.map +1 -1
- package/dist/rules/eslint-jest-rules.mjs +3 -0
- package/dist/rules/eslint-jest-rules.mjs.map +1 -1
- package/dist/rules/eslint-ts-data-forge-rules.d.mts +12 -0
- package/dist/rules/eslint-ts-data-forge-rules.d.mts.map +1 -0
- package/dist/rules/eslint-ts-data-forge-rules.mjs +14 -0
- package/dist/rules/eslint-ts-data-forge-rules.mjs.map +1 -0
- package/dist/rules/eslint-vitest-rules.d.mts +2 -2
- package/dist/rules/eslint-vitest-rules.mjs +2 -2
- package/dist/rules/eslint-vitest-rules.mjs.map +1 -1
- package/dist/rules/index.d.mts +1 -0
- package/dist/rules/index.d.mts.map +1 -1
- package/dist/rules/index.mjs +1 -0
- package/dist/rules/index.mjs.map +1 -1
- package/dist/types/define-known-rules.d.mts +2 -2
- package/dist/types/define-known-rules.d.mts.map +1 -1
- package/dist/types/define-known-rules.mjs.map +1 -1
- package/dist/types/rules/eslint-jest-rules.d.mts +119 -67
- package/dist/types/rules/eslint-jest-rules.d.mts.map +1 -1
- package/dist/types/rules/eslint-ts-data-forge-rules.d.mts +147 -0
- package/dist/types/rules/eslint-ts-data-forge-rules.d.mts.map +1 -0
- package/dist/types/rules/eslint-ts-data-forge-rules.mjs +2 -0
- package/dist/types/rules/eslint-ts-data-forge-rules.mjs.map +1 -0
- package/dist/types/rules/eslint-vitest-rules.d.mts +41 -20
- package/dist/types/rules/eslint-vitest-rules.d.mts.map +1 -1
- package/dist/types/rules/index.d.mts +1 -0
- package/dist/types/rules/index.d.mts.map +1 -1
- package/package.json +15 -15
- package/src/configs/immer.mts +9 -0
- package/src/configs/index.mts +2 -0
- package/src/configs/plugins.mts +3 -0
- package/src/configs/ts-data-forge.mts +11 -0
- package/src/configs/typescript.mts +0 -2
- package/src/plugins/index.mts +1 -0
- package/src/plugins/strict-dependencies/rules/resolve-import-path.test.mts +7 -9
- package/src/plugins/ts-data-forge/index.mts +1 -0
- package/src/plugins/ts-data-forge/plugin.mts +6 -0
- package/src/plugins/ts-data-forge/rules/branded-number-types.mts +36 -0
- package/src/plugins/ts-data-forge/rules/constants.mts +1 -0
- package/src/plugins/ts-data-forge/rules/import-utils.mts +56 -0
- package/src/plugins/ts-data-forge/rules/index.mts +1 -0
- package/src/plugins/ts-data-forge/rules/prefer-arr-is-array-at-least-length.mts +140 -0
- package/src/plugins/ts-data-forge/rules/prefer-arr-is-array-at-least-length.test.mts +175 -0
- package/src/plugins/ts-data-forge/rules/prefer-arr-is-array-of-length.mts +144 -0
- package/src/plugins/ts-data-forge/rules/prefer-arr-is-array-of-length.test.mts +183 -0
- package/src/plugins/ts-data-forge/rules/prefer-arr-is-array.mts +97 -0
- package/src/plugins/ts-data-forge/rules/prefer-arr-is-array.test.mts +62 -0
- package/src/plugins/ts-data-forge/rules/prefer-arr-is-non-empty.mts +106 -0
- package/src/plugins/ts-data-forge/rules/prefer-arr-is-non-empty.test.mts +83 -0
- package/src/plugins/ts-data-forge/rules/prefer-arr-sum.mts +269 -0
- package/src/plugins/ts-data-forge/rules/prefer-arr-sum.test.mts +171 -0
- package/src/plugins/ts-data-forge/rules/prefer-as-int.mts +130 -0
- package/src/plugins/ts-data-forge/rules/prefer-as-int.test.mts +267 -0
- package/src/plugins/ts-data-forge/rules/prefer-is-non-null-object.mts +144 -0
- package/src/plugins/ts-data-forge/rules/prefer-is-non-null-object.test.mts +156 -0
- package/src/plugins/ts-data-forge/rules/prefer-is-record-and-has-key.mts +158 -0
- package/src/plugins/ts-data-forge/rules/prefer-is-record-and-has-key.test.mts +191 -0
- package/src/plugins/ts-data-forge/rules/prefer-range-for-loop.mts +181 -0
- package/src/plugins/ts-data-forge/rules/prefer-range-for-loop.test.mts +156 -0
- package/src/plugins/ts-data-forge/rules/rules.mts +22 -0
- package/src/plugins/ts-restrictions/rules/check-destructuring-completeness.mts +6 -8
- package/src/plugins/ts-restrictions/rules/no-restricted-cast-name.mts +11 -15
- package/src/rules/eslint-jest-rules.mts +3 -0
- package/src/rules/eslint-ts-data-forge-rules.mts +13 -0
- package/src/rules/eslint-vitest-rules.mts +2 -2
- package/src/rules/index.mts +1 -0
- package/src/types/define-known-rules.mts +2 -0
- package/src/types/rules/eslint-jest-rules.mts +122 -67
- package/src/types/rules/eslint-ts-data-forge-rules.mts +156 -0
- package/src/types/rules/eslint-vitest-rules.mts +46 -21
- package/src/types/rules/index.mts +1 -0
|
@@ -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.
|
|
13
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.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.
|
|
66
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.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.
|
|
116
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.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.
|
|
157
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.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.
|
|
198
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.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.
|
|
215
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.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.
|
|
231
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.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.
|
|
247
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.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.
|
|
263
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.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.
|
|
279
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.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.
|
|
296
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.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.
|
|
312
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.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.
|
|
329
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.1/docs/rules/no-duplicate-hooks.md
|
|
330
330
|
*
|
|
331
331
|
* ```md
|
|
332
332
|
* | key | value |
|
|
@@ -339,10 +339,27 @@ namespace NoDuplicateHooks {
|
|
|
339
339
|
export type RuleEntry = Linter.StringSeverity;
|
|
340
340
|
}
|
|
341
341
|
|
|
342
|
+
/**
|
|
343
|
+
* Disallow using equality matchers on error types
|
|
344
|
+
*
|
|
345
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.1/docs/rules/no-error-equal.md
|
|
346
|
+
*
|
|
347
|
+
* ```md
|
|
348
|
+
* | key | value |
|
|
349
|
+
* | :------------------- | :--------- |
|
|
350
|
+
* | type | suggestion |
|
|
351
|
+
* | deprecated | false |
|
|
352
|
+
* | requiresTypeChecking | true |
|
|
353
|
+
* ```
|
|
354
|
+
*/
|
|
355
|
+
namespace NoErrorEqual {
|
|
356
|
+
export type RuleEntry = Linter.StringSeverity;
|
|
357
|
+
}
|
|
358
|
+
|
|
342
359
|
/**
|
|
343
360
|
* Disallow using `exports` in files containing tests
|
|
344
361
|
*
|
|
345
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
362
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.1/docs/rules/no-export.md
|
|
346
363
|
*
|
|
347
364
|
* ```md
|
|
348
365
|
* | key | value |
|
|
@@ -358,7 +375,7 @@ namespace NoExport {
|
|
|
358
375
|
/**
|
|
359
376
|
* Disallow focused tests
|
|
360
377
|
*
|
|
361
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
378
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.1/docs/rules/no-focused-tests.md
|
|
362
379
|
*
|
|
363
380
|
* ```md
|
|
364
381
|
* | key | value |
|
|
@@ -375,7 +392,7 @@ namespace NoFocusedTests {
|
|
|
375
392
|
/**
|
|
376
393
|
* Disallow setup and teardown hooks
|
|
377
394
|
*
|
|
378
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
395
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.1/docs/rules/no-hooks.md
|
|
379
396
|
*
|
|
380
397
|
* ```md
|
|
381
398
|
* | key | value |
|
|
@@ -421,7 +438,7 @@ namespace NoHooks {
|
|
|
421
438
|
/**
|
|
422
439
|
* Disallow identical titles
|
|
423
440
|
*
|
|
424
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
441
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.1/docs/rules/no-identical-title.md
|
|
425
442
|
*
|
|
426
443
|
* ```md
|
|
427
444
|
* | key | value |
|
|
@@ -437,7 +454,7 @@ namespace NoIdenticalTitle {
|
|
|
437
454
|
/**
|
|
438
455
|
* Disallow string interpolation inside snapshots
|
|
439
456
|
*
|
|
440
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
457
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.1/docs/rules/no-interpolation-in-snapshots.md
|
|
441
458
|
*
|
|
442
459
|
* ```md
|
|
443
460
|
* | key | value |
|
|
@@ -453,7 +470,7 @@ namespace NoInterpolationInSnapshots {
|
|
|
453
470
|
/**
|
|
454
471
|
* Disallow Jasmine globals
|
|
455
472
|
*
|
|
456
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
473
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.1/docs/rules/no-jasmine-globals.md
|
|
457
474
|
*
|
|
458
475
|
* ```md
|
|
459
476
|
* | key | value |
|
|
@@ -470,7 +487,7 @@ namespace NoJasmineGlobals {
|
|
|
470
487
|
/**
|
|
471
488
|
* Disallow large snapshots
|
|
472
489
|
*
|
|
473
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
490
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.1/docs/rules/no-large-snapshots.md
|
|
474
491
|
*
|
|
475
492
|
* ```md
|
|
476
493
|
* | key | value |
|
|
@@ -521,7 +538,7 @@ namespace NoLargeSnapshots {
|
|
|
521
538
|
/**
|
|
522
539
|
* Disallow manually importing from `__mocks__`
|
|
523
540
|
*
|
|
524
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
541
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.1/docs/rules/no-mocks-import.md
|
|
525
542
|
*
|
|
526
543
|
* ```md
|
|
527
544
|
* | key | value |
|
|
@@ -537,7 +554,7 @@ namespace NoMocksImport {
|
|
|
537
554
|
/**
|
|
538
555
|
* Disallow specific `jest.` methods
|
|
539
556
|
*
|
|
540
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
557
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.1/docs/rules/no-restricted-jest-methods.md
|
|
541
558
|
*
|
|
542
559
|
* ```md
|
|
543
560
|
* | key | value |
|
|
@@ -575,7 +592,7 @@ namespace NoRestrictedJestMethods {
|
|
|
575
592
|
/**
|
|
576
593
|
* Disallow specific matchers & modifiers
|
|
577
594
|
*
|
|
578
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
595
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.1/docs/rules/no-restricted-matchers.md
|
|
579
596
|
*
|
|
580
597
|
* ```md
|
|
581
598
|
* | key | value |
|
|
@@ -613,7 +630,7 @@ namespace NoRestrictedMatchers {
|
|
|
613
630
|
/**
|
|
614
631
|
* Disallow using `expect` outside of `it` or `test` blocks
|
|
615
632
|
*
|
|
616
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
633
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.1/docs/rules/no-standalone-expect.md
|
|
617
634
|
*
|
|
618
635
|
* ```md
|
|
619
636
|
* | key | value |
|
|
@@ -656,7 +673,7 @@ namespace NoStandaloneExpect {
|
|
|
656
673
|
/**
|
|
657
674
|
* Require using `.only` and `.skip` over `f` and `x`
|
|
658
675
|
*
|
|
659
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
676
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.1/docs/rules/no-test-prefixes.md
|
|
660
677
|
*
|
|
661
678
|
* ```md
|
|
662
679
|
* | key | value |
|
|
@@ -673,7 +690,7 @@ namespace NoTestPrefixes {
|
|
|
673
690
|
/**
|
|
674
691
|
* Disallow explicitly returning from tests
|
|
675
692
|
*
|
|
676
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
693
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.1/docs/rules/no-test-return-statement.md
|
|
677
694
|
*
|
|
678
695
|
* ```md
|
|
679
696
|
* | key | value |
|
|
@@ -686,10 +703,27 @@ namespace NoTestReturnStatement {
|
|
|
686
703
|
export type RuleEntry = Linter.StringSeverity;
|
|
687
704
|
}
|
|
688
705
|
|
|
706
|
+
/**
|
|
707
|
+
* Disallow unnecessary assertions based on types
|
|
708
|
+
*
|
|
709
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.1/docs/rules/no-unnecessary-assertion.md
|
|
710
|
+
*
|
|
711
|
+
* ```md
|
|
712
|
+
* | key | value |
|
|
713
|
+
* | :------------------- | :--------- |
|
|
714
|
+
* | type | suggestion |
|
|
715
|
+
* | deprecated | false |
|
|
716
|
+
* | requiresTypeChecking | true |
|
|
717
|
+
* ```
|
|
718
|
+
*/
|
|
719
|
+
namespace NoUnnecessaryAssertion {
|
|
720
|
+
export type RuleEntry = Linter.StringSeverity;
|
|
721
|
+
}
|
|
722
|
+
|
|
689
723
|
/**
|
|
690
724
|
* Disallow unnecessary async function wrapper for expected promises
|
|
691
725
|
*
|
|
692
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
726
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.1/docs/rules/no-unneeded-async-expect-function.md
|
|
693
727
|
*
|
|
694
728
|
* ```md
|
|
695
729
|
* | key | value |
|
|
@@ -706,7 +740,7 @@ namespace NoUnneededAsyncExpectFunction {
|
|
|
706
740
|
/**
|
|
707
741
|
* Disallow using `jest.mock()` factories without an explicit type parameter
|
|
708
742
|
*
|
|
709
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
743
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.1/docs/rules/no-untyped-mock-factory.md
|
|
710
744
|
*
|
|
711
745
|
* ```md
|
|
712
746
|
* | key | value |
|
|
@@ -723,7 +757,7 @@ namespace NoUntypedMockFactory {
|
|
|
723
757
|
/**
|
|
724
758
|
* Enforce padding around `afterAll` blocks
|
|
725
759
|
*
|
|
726
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
760
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.1/docs/rules/padding-around-after-all-blocks.md
|
|
727
761
|
*
|
|
728
762
|
* ```md
|
|
729
763
|
* | key | value |
|
|
@@ -740,7 +774,7 @@ namespace PaddingAroundAfterAllBlocks {
|
|
|
740
774
|
/**
|
|
741
775
|
* Enforce padding around `afterEach` blocks
|
|
742
776
|
*
|
|
743
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
777
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.1/docs/rules/padding-around-after-each-blocks.md
|
|
744
778
|
*
|
|
745
779
|
* ```md
|
|
746
780
|
* | key | value |
|
|
@@ -757,7 +791,7 @@ namespace PaddingAroundAfterEachBlocks {
|
|
|
757
791
|
/**
|
|
758
792
|
* Enforce padding around Jest functions
|
|
759
793
|
*
|
|
760
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
794
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.1/docs/rules/padding-around-all.md
|
|
761
795
|
*
|
|
762
796
|
* ```md
|
|
763
797
|
* | key | value |
|
|
@@ -774,7 +808,7 @@ namespace PaddingAroundAll {
|
|
|
774
808
|
/**
|
|
775
809
|
* Enforce padding around `beforeAll` blocks
|
|
776
810
|
*
|
|
777
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
811
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.1/docs/rules/padding-around-before-all-blocks.md
|
|
778
812
|
*
|
|
779
813
|
* ```md
|
|
780
814
|
* | key | value |
|
|
@@ -791,7 +825,7 @@ namespace PaddingAroundBeforeAllBlocks {
|
|
|
791
825
|
/**
|
|
792
826
|
* Enforce padding around `beforeEach` blocks
|
|
793
827
|
*
|
|
794
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
828
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.1/docs/rules/padding-around-before-each-blocks.md
|
|
795
829
|
*
|
|
796
830
|
* ```md
|
|
797
831
|
* | key | value |
|
|
@@ -808,7 +842,7 @@ namespace PaddingAroundBeforeEachBlocks {
|
|
|
808
842
|
/**
|
|
809
843
|
* Enforce padding around `describe` blocks
|
|
810
844
|
*
|
|
811
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
845
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.1/docs/rules/padding-around-describe-blocks.md
|
|
812
846
|
*
|
|
813
847
|
* ```md
|
|
814
848
|
* | key | value |
|
|
@@ -825,7 +859,7 @@ namespace PaddingAroundDescribeBlocks {
|
|
|
825
859
|
/**
|
|
826
860
|
* Enforce padding around `expect` groups
|
|
827
861
|
*
|
|
828
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
862
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.1/docs/rules/padding-around-expect-groups.md
|
|
829
863
|
*
|
|
830
864
|
* ```md
|
|
831
865
|
* | key | value |
|
|
@@ -842,7 +876,7 @@ namespace PaddingAroundExpectGroups {
|
|
|
842
876
|
/**
|
|
843
877
|
* Enforce padding around `test` and `it` blocks
|
|
844
878
|
*
|
|
845
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
879
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.1/docs/rules/padding-around-test-blocks.md
|
|
846
880
|
*
|
|
847
881
|
* ```md
|
|
848
882
|
* | key | value |
|
|
@@ -859,7 +893,7 @@ namespace PaddingAroundTestBlocks {
|
|
|
859
893
|
/**
|
|
860
894
|
* Suggest using `toHaveBeenCalledWith()`
|
|
861
895
|
*
|
|
862
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
896
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.1/docs/rules/prefer-called-with.md
|
|
863
897
|
*
|
|
864
898
|
* ```md
|
|
865
899
|
* | key | value |
|
|
@@ -875,7 +909,7 @@ namespace PreferCalledWith {
|
|
|
875
909
|
/**
|
|
876
910
|
* Suggest using the built-in comparison matchers
|
|
877
911
|
*
|
|
878
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
912
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.1/docs/rules/prefer-comparison-matcher.md
|
|
879
913
|
*
|
|
880
914
|
* ```md
|
|
881
915
|
* | key | value |
|
|
@@ -892,7 +926,7 @@ namespace PreferComparisonMatcher {
|
|
|
892
926
|
/**
|
|
893
927
|
* Prefer using `.each` rather than manual loops
|
|
894
928
|
*
|
|
895
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
929
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.1/docs/rules/prefer-each.md
|
|
896
930
|
*
|
|
897
931
|
* ```md
|
|
898
932
|
* | key | value |
|
|
@@ -908,7 +942,7 @@ namespace PreferEach {
|
|
|
908
942
|
/**
|
|
909
943
|
* Prefer having the last statement in a test be an assertion
|
|
910
944
|
*
|
|
911
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
945
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.1/docs/rules/prefer-ending-with-an-expect.md
|
|
912
946
|
*
|
|
913
947
|
* ```md
|
|
914
948
|
* | key | value |
|
|
@@ -958,7 +992,7 @@ namespace PreferEndingWithAnExpect {
|
|
|
958
992
|
/**
|
|
959
993
|
* Suggest using the built-in equality matchers
|
|
960
994
|
*
|
|
961
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
995
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.1/docs/rules/prefer-equality-matcher.md
|
|
962
996
|
*
|
|
963
997
|
* ```md
|
|
964
998
|
* | key | value |
|
|
@@ -975,7 +1009,7 @@ namespace PreferEqualityMatcher {
|
|
|
975
1009
|
/**
|
|
976
1010
|
* Suggest using `expect.assertions()` OR `expect.hasAssertions()`
|
|
977
1011
|
*
|
|
978
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
1012
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.1/docs/rules/prefer-expect-assertions.md
|
|
979
1013
|
*
|
|
980
1014
|
* ```md
|
|
981
1015
|
* | key | value |
|
|
@@ -1024,7 +1058,7 @@ namespace PreferExpectAssertions {
|
|
|
1024
1058
|
/**
|
|
1025
1059
|
* Prefer `await expect(...).resolves` over `expect(await ...)` syntax
|
|
1026
1060
|
*
|
|
1027
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
1061
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.1/docs/rules/prefer-expect-resolves.md
|
|
1028
1062
|
*
|
|
1029
1063
|
* ```md
|
|
1030
1064
|
* | key | value |
|
|
@@ -1041,7 +1075,7 @@ namespace PreferExpectResolves {
|
|
|
1041
1075
|
/**
|
|
1042
1076
|
* Prefer having hooks in a consistent order
|
|
1043
1077
|
*
|
|
1044
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
1078
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.1/docs/rules/prefer-hooks-in-order.md
|
|
1045
1079
|
*
|
|
1046
1080
|
* ```md
|
|
1047
1081
|
* | key | value |
|
|
@@ -1057,7 +1091,7 @@ namespace PreferHooksInOrder {
|
|
|
1057
1091
|
/**
|
|
1058
1092
|
* Suggest having hooks before any test cases
|
|
1059
1093
|
*
|
|
1060
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
1094
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.1/docs/rules/prefer-hooks-on-top.md
|
|
1061
1095
|
*
|
|
1062
1096
|
* ```md
|
|
1063
1097
|
* | key | value |
|
|
@@ -1073,7 +1107,7 @@ namespace PreferHooksOnTop {
|
|
|
1073
1107
|
/**
|
|
1074
1108
|
* Prefer importing Jest globals
|
|
1075
1109
|
*
|
|
1076
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
1110
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.1/docs/rules/prefer-importing-jest-globals.md
|
|
1077
1111
|
*
|
|
1078
1112
|
* ```md
|
|
1079
1113
|
* | key | value |
|
|
@@ -1132,7 +1166,7 @@ namespace PreferImportingJestGlobals {
|
|
|
1132
1166
|
/**
|
|
1133
1167
|
* Prefer `jest.mocked()` over `fn as jest.Mock`
|
|
1134
1168
|
*
|
|
1135
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
1169
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.1/docs/rules/prefer-jest-mocked.md
|
|
1136
1170
|
*
|
|
1137
1171
|
* ```md
|
|
1138
1172
|
* | key | value |
|
|
@@ -1149,7 +1183,7 @@ namespace PreferJestMocked {
|
|
|
1149
1183
|
/**
|
|
1150
1184
|
* Enforce lowercase test names
|
|
1151
1185
|
*
|
|
1152
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
1186
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.1/docs/rules/prefer-lowercase-title.md
|
|
1153
1187
|
*
|
|
1154
1188
|
* ```md
|
|
1155
1189
|
* | key | value |
|
|
@@ -1219,7 +1253,7 @@ namespace PreferLowercaseTitle {
|
|
|
1219
1253
|
/**
|
|
1220
1254
|
* Prefer mock resolved/rejected shorthands for promises
|
|
1221
1255
|
*
|
|
1222
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
1256
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.1/docs/rules/prefer-mock-promise-shorthand.md
|
|
1223
1257
|
*
|
|
1224
1258
|
* ```md
|
|
1225
1259
|
* | key | value |
|
|
@@ -1236,7 +1270,7 @@ namespace PreferMockPromiseShorthand {
|
|
|
1236
1270
|
/**
|
|
1237
1271
|
* Prefer including a hint with external snapshots
|
|
1238
1272
|
*
|
|
1239
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
1273
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.1/docs/rules/prefer-snapshot-hint.md
|
|
1240
1274
|
*
|
|
1241
1275
|
* ```md
|
|
1242
1276
|
* | key | value |
|
|
@@ -1272,7 +1306,7 @@ namespace PreferSnapshotHint {
|
|
|
1272
1306
|
/**
|
|
1273
1307
|
* Suggest using `jest.spyOn()`
|
|
1274
1308
|
*
|
|
1275
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
1309
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.1/docs/rules/prefer-spy-on.md
|
|
1276
1310
|
*
|
|
1277
1311
|
* ```md
|
|
1278
1312
|
* | key | value |
|
|
@@ -1289,7 +1323,7 @@ namespace PreferSpyOn {
|
|
|
1289
1323
|
/**
|
|
1290
1324
|
* Suggest using `toStrictEqual()`
|
|
1291
1325
|
*
|
|
1292
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
1326
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.1/docs/rules/prefer-strict-equal.md
|
|
1293
1327
|
*
|
|
1294
1328
|
* ```md
|
|
1295
1329
|
* | key | value |
|
|
@@ -1306,7 +1340,7 @@ namespace PreferStrictEqual {
|
|
|
1306
1340
|
/**
|
|
1307
1341
|
* Suggest using `toBe()` for primitive literals
|
|
1308
1342
|
*
|
|
1309
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
1343
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.1/docs/rules/prefer-to-be.md
|
|
1310
1344
|
*
|
|
1311
1345
|
* ```md
|
|
1312
1346
|
* | key | value |
|
|
@@ -1323,7 +1357,7 @@ namespace PreferToBe {
|
|
|
1323
1357
|
/**
|
|
1324
1358
|
* Suggest using `toContain()`
|
|
1325
1359
|
*
|
|
1326
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
1360
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.1/docs/rules/prefer-to-contain.md
|
|
1327
1361
|
*
|
|
1328
1362
|
* ```md
|
|
1329
1363
|
* | key | value |
|
|
@@ -1340,7 +1374,7 @@ namespace PreferToContain {
|
|
|
1340
1374
|
/**
|
|
1341
1375
|
* Suggest using `toHaveBeenCalledTimes()`
|
|
1342
1376
|
*
|
|
1343
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
1377
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.1/docs/rules/prefer-to-have-been-called-times.md
|
|
1344
1378
|
*
|
|
1345
1379
|
* ```md
|
|
1346
1380
|
* | key | value |
|
|
@@ -1357,7 +1391,7 @@ namespace PreferToHaveBeenCalledTimes {
|
|
|
1357
1391
|
/**
|
|
1358
1392
|
* Suggest using `toHaveBeenCalled`
|
|
1359
1393
|
*
|
|
1360
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
1394
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.1/docs/rules/prefer-to-have-been-called.md
|
|
1361
1395
|
*
|
|
1362
1396
|
* ```md
|
|
1363
1397
|
* | key | value |
|
|
@@ -1374,7 +1408,7 @@ namespace PreferToHaveBeenCalled {
|
|
|
1374
1408
|
/**
|
|
1375
1409
|
* Suggest using `toHaveLength()`
|
|
1376
1410
|
*
|
|
1377
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
1411
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.1/docs/rules/prefer-to-have-length.md
|
|
1378
1412
|
*
|
|
1379
1413
|
* ```md
|
|
1380
1414
|
* | key | value |
|
|
@@ -1391,7 +1425,7 @@ namespace PreferToHaveLength {
|
|
|
1391
1425
|
/**
|
|
1392
1426
|
* Suggest using `test.todo`
|
|
1393
1427
|
*
|
|
1394
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
1428
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.1/docs/rules/prefer-todo.md
|
|
1395
1429
|
*
|
|
1396
1430
|
* ```md
|
|
1397
1431
|
* | key | value |
|
|
@@ -1408,7 +1442,7 @@ namespace PreferTodo {
|
|
|
1408
1442
|
/**
|
|
1409
1443
|
* Require setup and teardown code to be within a hook
|
|
1410
1444
|
*
|
|
1411
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
1445
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.1/docs/rules/require-hook.md
|
|
1412
1446
|
*
|
|
1413
1447
|
* ```md
|
|
1414
1448
|
* | key | value |
|
|
@@ -1451,7 +1485,7 @@ namespace RequireHook {
|
|
|
1451
1485
|
/**
|
|
1452
1486
|
* Require a message for `toThrow()`
|
|
1453
1487
|
*
|
|
1454
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
1488
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.1/docs/rules/require-to-throw-message.md
|
|
1455
1489
|
*
|
|
1456
1490
|
* ```md
|
|
1457
1491
|
* | key | value |
|
|
@@ -1467,7 +1501,7 @@ namespace RequireToThrowMessage {
|
|
|
1467
1501
|
/**
|
|
1468
1502
|
* Require test cases and hooks to be inside a `describe` block
|
|
1469
1503
|
*
|
|
1470
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
1504
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.1/docs/rules/require-top-level-describe.md
|
|
1471
1505
|
*
|
|
1472
1506
|
* ```md
|
|
1473
1507
|
* | key | value |
|
|
@@ -1508,7 +1542,7 @@ namespace RequireTopLevelDescribe {
|
|
|
1508
1542
|
/**
|
|
1509
1543
|
* Enforce unbound methods are called with their expected scope
|
|
1510
1544
|
*
|
|
1511
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
1545
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.1/docs/rules/unbound-method.md
|
|
1512
1546
|
*
|
|
1513
1547
|
* ```md
|
|
1514
1548
|
* | key | value |
|
|
@@ -1552,7 +1586,7 @@ namespace UnboundMethod {
|
|
|
1552
1586
|
/**
|
|
1553
1587
|
* Enforce valid `describe()` callback
|
|
1554
1588
|
*
|
|
1555
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
1589
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.1/docs/rules/valid-describe-callback.md
|
|
1556
1590
|
*
|
|
1557
1591
|
* ```md
|
|
1558
1592
|
* | key | value |
|
|
@@ -1568,7 +1602,7 @@ namespace ValidDescribeCallback {
|
|
|
1568
1602
|
/**
|
|
1569
1603
|
* Require promises that have expectations in their chain to be valid
|
|
1570
1604
|
*
|
|
1571
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
1605
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.1/docs/rules/valid-expect-in-promise.md
|
|
1572
1606
|
*
|
|
1573
1607
|
* ```md
|
|
1574
1608
|
* | key | value |
|
|
@@ -1581,10 +1615,28 @@ namespace ValidExpectInPromise {
|
|
|
1581
1615
|
export type RuleEntry = Linter.StringSeverity;
|
|
1582
1616
|
}
|
|
1583
1617
|
|
|
1618
|
+
/**
|
|
1619
|
+
* Require that `resolve` and `reject` modifiers are present (and only) for
|
|
1620
|
+
* promise-like types
|
|
1621
|
+
*
|
|
1622
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.1/docs/rules/valid-expect-with-promise.md
|
|
1623
|
+
*
|
|
1624
|
+
* ```md
|
|
1625
|
+
* | key | value |
|
|
1626
|
+
* | :------------------- | :--------- |
|
|
1627
|
+
* | type | suggestion |
|
|
1628
|
+
* | deprecated | false |
|
|
1629
|
+
* | requiresTypeChecking | true |
|
|
1630
|
+
* ```
|
|
1631
|
+
*/
|
|
1632
|
+
namespace ValidExpectWithPromise {
|
|
1633
|
+
export type RuleEntry = Linter.StringSeverity;
|
|
1634
|
+
}
|
|
1635
|
+
|
|
1584
1636
|
/**
|
|
1585
1637
|
* Enforce valid `expect()` usage
|
|
1586
1638
|
*
|
|
1587
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
1639
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.1/docs/rules/valid-expect.md
|
|
1588
1640
|
*
|
|
1589
1641
|
* ```md
|
|
1590
1642
|
* | key | value |
|
|
@@ -1644,7 +1696,7 @@ namespace ValidExpect {
|
|
|
1644
1696
|
/**
|
|
1645
1697
|
* Disallow mocking of non-existing module paths
|
|
1646
1698
|
*
|
|
1647
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
1699
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.1/docs/rules/valid-mock-module-path.md
|
|
1648
1700
|
*
|
|
1649
1701
|
* ```md
|
|
1650
1702
|
* | key | value |
|
|
@@ -1688,7 +1740,7 @@ namespace ValidMockModulePath {
|
|
|
1688
1740
|
/**
|
|
1689
1741
|
* Enforce valid titles
|
|
1690
1742
|
*
|
|
1691
|
-
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.
|
|
1743
|
+
* @link https://github.com/jest-community/eslint-plugin-jest/blob/v29.10.1/docs/rules/valid-title.md
|
|
1692
1744
|
*
|
|
1693
1745
|
* ```md
|
|
1694
1746
|
* | key | value |
|
|
@@ -1822,6 +1874,7 @@ export type EslintJestRules = Readonly<{
|
|
|
1822
1874
|
'jest/no-disabled-tests': NoDisabledTests.RuleEntry;
|
|
1823
1875
|
'jest/no-done-callback': NoDoneCallback.RuleEntry;
|
|
1824
1876
|
'jest/no-duplicate-hooks': NoDuplicateHooks.RuleEntry;
|
|
1877
|
+
'jest/no-error-equal': NoErrorEqual.RuleEntry;
|
|
1825
1878
|
'jest/no-export': NoExport.RuleEntry;
|
|
1826
1879
|
'jest/no-focused-tests': NoFocusedTests.RuleEntry;
|
|
1827
1880
|
'jest/no-hooks': NoHooks.RuleEntry;
|
|
@@ -1835,6 +1888,7 @@ export type EslintJestRules = Readonly<{
|
|
|
1835
1888
|
'jest/no-standalone-expect': NoStandaloneExpect.RuleEntry;
|
|
1836
1889
|
'jest/no-test-prefixes': NoTestPrefixes.RuleEntry;
|
|
1837
1890
|
'jest/no-test-return-statement': NoTestReturnStatement.RuleEntry;
|
|
1891
|
+
'jest/no-unnecessary-assertion': NoUnnecessaryAssertion.RuleEntry;
|
|
1838
1892
|
'jest/no-unneeded-async-expect-function': NoUnneededAsyncExpectFunction.RuleEntry;
|
|
1839
1893
|
'jest/no-untyped-mock-factory': NoUntypedMockFactory.RuleEntry;
|
|
1840
1894
|
'jest/padding-around-after-all-blocks': PaddingAroundAfterAllBlocks.RuleEntry;
|
|
@@ -1873,6 +1927,7 @@ export type EslintJestRules = Readonly<{
|
|
|
1873
1927
|
'jest/unbound-method': UnboundMethod.RuleEntry;
|
|
1874
1928
|
'jest/valid-describe-callback': ValidDescribeCallback.RuleEntry;
|
|
1875
1929
|
'jest/valid-expect-in-promise': ValidExpectInPromise.RuleEntry;
|
|
1930
|
+
'jest/valid-expect-with-promise': ValidExpectWithPromise.RuleEntry;
|
|
1876
1931
|
'jest/valid-expect': ValidExpect.RuleEntry;
|
|
1877
1932
|
'jest/valid-mock-module-path': ValidMockModulePath.RuleEntry;
|
|
1878
1933
|
'jest/valid-title': ValidTitle.RuleEntry;
|