@w5s/eslint-config 2.4.4 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/dist/index.cjs +4199 -0
  2. package/dist/index.cjs.map +1 -0
  3. package/dist/index.d.cts +8054 -0
  4. package/dist/index.d.ts +8054 -3
  5. package/dist/index.js +4171 -22
  6. package/dist/index.js.map +1 -0
  7. package/package.json +26 -17
  8. package/src/config/createRules.ts +5 -0
  9. package/src/config/es.ts +58 -0
  10. package/src/config/ignores.ts +84 -0
  11. package/src/config/imports.ts +32 -0
  12. package/src/config/jsdoc.ts +53 -0
  13. package/src/config/jsonc.ts +237 -0
  14. package/src/config/node.ts +42 -0
  15. package/src/config/stylistic.ts +50 -0
  16. package/src/config/test.ts +44 -0
  17. package/src/config/ts.ts +97 -0
  18. package/src/config/unicorn.ts +68 -0
  19. package/src/config/yml.ts +70 -0
  20. package/src/config.ts +11 -0
  21. package/src/defineConfig.ts +62 -0
  22. package/src/index.ts +3 -31
  23. package/src/type/Config.ts +5 -0
  24. package/src/type/PluginOptionsBase.ts +14 -0
  25. package/src/type/StylisticConfig.ts +39 -0
  26. package/src/type.ts +3 -0
  27. package/src/typegen/.keep +0 -0
  28. package/src/typegen/import.d.ts +501 -0
  29. package/src/typegen/jsdoc.d.ts +1155 -0
  30. package/src/typegen/jsonc.d.ts +500 -0
  31. package/src/typegen/node.d.ts +529 -0
  32. package/src/typegen/style.d.ts +1637 -0
  33. package/src/typegen/test.d.ts +430 -0
  34. package/src/typegen/ts.d.ts +1872 -0
  35. package/src/typegen/unicorn.d.ts +913 -0
  36. package/src/typegen/yml.d.ts +363 -0
  37. package/dist/es.d.ts +0 -3
  38. package/dist/es.js +0 -10
  39. package/dist/jest.d.ts +0 -3
  40. package/dist/jest.js +0 -20
  41. package/dist/json.d.ts +0 -3
  42. package/dist/json.js +0 -14
  43. package/dist/rules/es/base.d.ts +0 -4
  44. package/dist/rules/es/base.js +0 -71
  45. package/dist/rules/es/import.d.ts +0 -3
  46. package/dist/rules/es/import.js +0 -74
  47. package/dist/rules/es/jsdoc.d.ts +0 -3
  48. package/dist/rules/es/jsdoc.js +0 -21
  49. package/dist/rules/es/node.d.ts +0 -3
  50. package/dist/rules/es/node.js +0 -20
  51. package/dist/rules/es/promise.d.ts +0 -3
  52. package/dist/rules/es/promise.js +0 -11
  53. package/dist/rules/es/unicorn.d.ts +0 -3
  54. package/dist/rules/es/unicorn.js +0 -72
  55. package/dist/rules/es.d.ts +0 -3
  56. package/dist/rules/es.js +0 -14
  57. package/dist/rules/ignore.d.ts +0 -3
  58. package/dist/rules/ignore.js +0 -54
  59. package/dist/rules/jest.d.ts +0 -3
  60. package/dist/rules/jest.js +0 -64
  61. package/dist/rules/jsonc.d.ts +0 -3
  62. package/dist/rules/jsonc.js +0 -183
  63. package/dist/rules/prettier.d.ts +0 -3
  64. package/dist/rules/prettier.js +0 -13
  65. package/dist/rules/typescript.d.ts +0 -3
  66. package/dist/rules/typescript.js +0 -249
  67. package/dist/rules/yml.d.ts +0 -3
  68. package/dist/rules/yml.js +0 -21
  69. package/dist/tsconfig.build.tsbuildinfo +0 -1
  70. package/dist/typescript.d.ts +0 -3
  71. package/dist/typescript.js +0 -21
  72. package/dist/yml.d.ts +0 -3
  73. package/dist/yml.js +0 -19
  74. package/src/es.ts +0 -12
  75. package/src/jest.ts +0 -18
  76. package/src/json.ts +0 -12
  77. package/src/rules/es/base.ts +0 -83
  78. package/src/rules/es/import.ts +0 -81
  79. package/src/rules/es/jsdoc.ts +0 -23
  80. package/src/rules/es/node.ts +0 -21
  81. package/src/rules/es/promise.ts +0 -12
  82. package/src/rules/es/unicorn.ts +0 -74
  83. package/src/rules/es.ts +0 -21
  84. package/src/rules/ignore.ts +0 -54
  85. package/src/rules/jest.ts +0 -68
  86. package/src/rules/jsonc.ts +0 -187
  87. package/src/rules/prettier.ts +0 -11
  88. package/src/rules/typescript.ts +0 -255
  89. package/src/rules/yml.ts +0 -22
  90. package/src/typescript.ts +0 -24
  91. package/src/yml.ts +0 -18
@@ -0,0 +1,430 @@
1
+ /* eslint-disable unicorn/no-abusive-eslint-disable */
2
+ /* eslint-disable */
3
+ /* prettier-ignore */
4
+ import type { Linter } from 'eslint'
5
+
6
+ declare module 'eslint' {
7
+ namespace Linter {
8
+ interface RulesRecord extends RuleOptions {}
9
+ }
10
+ }
11
+
12
+ export interface RuleOptions {
13
+ /**
14
+ * require .spec test file pattern
15
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/consistent-test-filename.md
16
+ */
17
+ 'test/consistent-test-filename'?: Linter.RuleEntry<TestConsistentTestFilename>
18
+ /**
19
+ * enforce using test or it but not both
20
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/consistent-test-it.md
21
+ */
22
+ 'test/consistent-test-it'?: Linter.RuleEntry<TestConsistentTestIt>
23
+ /**
24
+ * enforce having expectation in test body
25
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/expect-expect.md
26
+ */
27
+ 'test/expect-expect'?: Linter.RuleEntry<TestExpectExpect>
28
+ /**
29
+ * enforce a maximum number of expect per test
30
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/max-expects.md
31
+ */
32
+ 'test/max-expects'?: Linter.RuleEntry<TestMaxExpects>
33
+ /**
34
+ * require describe block to be less than set max value or default value
35
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/max-nested-describe.md
36
+ */
37
+ 'test/max-nested-describe'?: Linter.RuleEntry<TestMaxNestedDescribe>
38
+ /**
39
+ * disallow alias methods
40
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-alias-methods.md
41
+ */
42
+ 'test/no-alias-methods'?: Linter.RuleEntry<[]>
43
+ /**
44
+ * disallow commented out tests
45
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-commented-out-tests.md
46
+ */
47
+ 'test/no-commented-out-tests'?: Linter.RuleEntry<[]>
48
+ /**
49
+ * disallow conditional expects
50
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-conditional-expect.md
51
+ */
52
+ 'test/no-conditional-expect'?: Linter.RuleEntry<[]>
53
+ /**
54
+ * disallow conditional tests
55
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-conditional-in-test.md
56
+ */
57
+ 'test/no-conditional-in-test'?: Linter.RuleEntry<[]>
58
+ /**
59
+ * disallow conditional tests
60
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-conditional-tests.md
61
+ */
62
+ 'test/no-conditional-tests'?: Linter.RuleEntry<[]>
63
+ /**
64
+ * disallow disabled tests
65
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-disabled-tests.md
66
+ */
67
+ 'test/no-disabled-tests'?: Linter.RuleEntry<[]>
68
+ /**
69
+ * disallow using a callback in asynchronous tests and hooks
70
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-done-callback.md
71
+ * @deprecated
72
+ */
73
+ 'test/no-done-callback'?: Linter.RuleEntry<[]>
74
+ /**
75
+ * disallow duplicate hooks and teardown hooks
76
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-duplicate-hooks.md
77
+ */
78
+ 'test/no-duplicate-hooks'?: Linter.RuleEntry<[]>
79
+ /**
80
+ * disallow focused tests
81
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-focused-tests.md
82
+ */
83
+ 'test/no-focused-tests'?: Linter.RuleEntry<TestNoFocusedTests>
84
+ /**
85
+ * disallow setup and teardown hooks
86
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-hooks.md
87
+ */
88
+ 'test/no-hooks'?: Linter.RuleEntry<TestNoHooks>
89
+ /**
90
+ * disallow identical titles
91
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-identical-title.md
92
+ */
93
+ 'test/no-identical-title'?: Linter.RuleEntry<[]>
94
+ /**
95
+ * disallow importing `node:test`
96
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-import-node-test.md
97
+ */
98
+ 'test/no-import-node-test'?: Linter.RuleEntry<[]>
99
+ /**
100
+ * disallow string interpolation in snapshots
101
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-interpolation-in-snapshots.md
102
+ */
103
+ 'test/no-interpolation-in-snapshots'?: Linter.RuleEntry<[]>
104
+ /**
105
+ * disallow large snapshots
106
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-large-snapshots.md
107
+ */
108
+ 'test/no-large-snapshots'?: Linter.RuleEntry<TestNoLargeSnapshots>
109
+ /**
110
+ * disallow importing from __mocks__ directory
111
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-mocks-import.md
112
+ */
113
+ 'test/no-mocks-import'?: Linter.RuleEntry<[]>
114
+ /**
115
+ * disallow the use of certain matchers
116
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-restricted-matchers.md
117
+ */
118
+ 'test/no-restricted-matchers'?: Linter.RuleEntry<TestNoRestrictedMatchers>
119
+ /**
120
+ * disallow specific `vi.` methods
121
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-restricted-vi-methods.md
122
+ */
123
+ 'test/no-restricted-vi-methods'?: Linter.RuleEntry<TestNoRestrictedViMethods>
124
+ /**
125
+ * disallow using `expect` outside of `it` or `test` blocks
126
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-standalone-expect.md
127
+ */
128
+ 'test/no-standalone-expect'?: Linter.RuleEntry<TestNoStandaloneExpect>
129
+ /**
130
+ * disallow using `test` as a prefix
131
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-test-prefixes.md
132
+ */
133
+ 'test/no-test-prefixes'?: Linter.RuleEntry<[]>
134
+ /**
135
+ * disallow return statements in tests
136
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-test-return-statement.md
137
+ */
138
+ 'test/no-test-return-statement'?: Linter.RuleEntry<[]>
139
+ /**
140
+ * Enforce padding around `afterAll` blocks
141
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/padding-around-after-all-blocks.md
142
+ */
143
+ 'test/padding-around-after-all-blocks'?: Linter.RuleEntry<[]>
144
+ /**
145
+ * Enforce padding around `afterEach` blocks
146
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/padding-around-after-each-blocks.md
147
+ */
148
+ 'test/padding-around-after-each-blocks'?: Linter.RuleEntry<[]>
149
+ /**
150
+ * Enforce padding around vitest functions
151
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/padding-around-all.md
152
+ */
153
+ 'test/padding-around-all'?: Linter.RuleEntry<[]>
154
+ /**
155
+ * Enforce padding around `beforeAll` blocks
156
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/padding-around-before-all-blocks.md
157
+ */
158
+ 'test/padding-around-before-all-blocks'?: Linter.RuleEntry<[]>
159
+ /**
160
+ * Enforce padding around `beforeEach` blocks
161
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/padding-around-before-each-blocks.md
162
+ */
163
+ 'test/padding-around-before-each-blocks'?: Linter.RuleEntry<[]>
164
+ /**
165
+ * Enforce padding around `describe` blocks
166
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/padding-around-describe-blocks.md
167
+ */
168
+ 'test/padding-around-describe-blocks'?: Linter.RuleEntry<[]>
169
+ /**
170
+ * Enforce padding around `expect` groups
171
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/padding-around-expect-groups.md
172
+ */
173
+ 'test/padding-around-expect-groups'?: Linter.RuleEntry<[]>
174
+ /**
175
+ * Enforce padding around `test` blocks
176
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/padding-around-test-blocks.md
177
+ */
178
+ 'test/padding-around-test-blocks'?: Linter.RuleEntry<[]>
179
+ /**
180
+ * enforce using `toBeCalledWith()` or `toHaveBeenCalledWith()`
181
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-called-with.md
182
+ */
183
+ 'test/prefer-called-with'?: Linter.RuleEntry<[]>
184
+ /**
185
+ * enforce using the built-in comparison matchers
186
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-comparison-matcher.md
187
+ */
188
+ 'test/prefer-comparison-matcher'?: Linter.RuleEntry<[]>
189
+ /**
190
+ * enforce using `each` rather than manual loops
191
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-each.md
192
+ */
193
+ 'test/prefer-each'?: Linter.RuleEntry<[]>
194
+ /**
195
+ * enforce using the built-in quality matchers
196
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-equality-matcher.md
197
+ */
198
+ 'test/prefer-equality-matcher'?: Linter.RuleEntry<[]>
199
+ /**
200
+ * enforce using expect assertions instead of callbacks
201
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-expect-assertions.md
202
+ */
203
+ 'test/prefer-expect-assertions'?: Linter.RuleEntry<TestPreferExpectAssertions>
204
+ /**
205
+ * enforce using `expect().resolves` over `expect(await ...)` syntax
206
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-expect-resolves.md
207
+ */
208
+ 'test/prefer-expect-resolves'?: Linter.RuleEntry<[]>
209
+ /**
210
+ * enforce having hooks in consistent order
211
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-hooks-in-order.md
212
+ */
213
+ 'test/prefer-hooks-in-order'?: Linter.RuleEntry<[]>
214
+ /**
215
+ * enforce having hooks before any test cases
216
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-hooks-on-top.md
217
+ */
218
+ 'test/prefer-hooks-on-top'?: Linter.RuleEntry<[]>
219
+ /**
220
+ * enforce lowercase titles
221
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-lowercase-title.md
222
+ */
223
+ 'test/prefer-lowercase-title'?: Linter.RuleEntry<TestPreferLowercaseTitle>
224
+ /**
225
+ * enforce mock resolved/rejected shorthands for promises
226
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-mock-promise-shorthand.md
227
+ */
228
+ 'test/prefer-mock-promise-shorthand'?: Linter.RuleEntry<[]>
229
+ /**
230
+ * enforce including a hint with external snapshots
231
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-snapshot-hint.md
232
+ */
233
+ 'test/prefer-snapshot-hint'?: Linter.RuleEntry<TestPreferSnapshotHint>
234
+ /**
235
+ * enforce using `vi.spyOn`
236
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-spy-on.md
237
+ */
238
+ 'test/prefer-spy-on'?: Linter.RuleEntry<[]>
239
+ /**
240
+ * enforce using `toBe(true)` and `toBe(false)` over matchers that coerce types to boolean
241
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-strict-boolean-matchers.md
242
+ */
243
+ 'test/prefer-strict-boolean-matchers'?: Linter.RuleEntry<[]>
244
+ /**
245
+ * enforce strict equal over equal
246
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-strict-equal.md
247
+ */
248
+ 'test/prefer-strict-equal'?: Linter.RuleEntry<[]>
249
+ /**
250
+ * enforce using toBe()
251
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-be.md
252
+ */
253
+ 'test/prefer-to-be'?: Linter.RuleEntry<[]>
254
+ /**
255
+ * enforce using toBeFalsy()
256
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-be-falsy.md
257
+ */
258
+ 'test/prefer-to-be-falsy'?: Linter.RuleEntry<[]>
259
+ /**
260
+ * enforce using toBeObject()
261
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-be-object.md
262
+ */
263
+ 'test/prefer-to-be-object'?: Linter.RuleEntry<[]>
264
+ /**
265
+ * enforce using `toBeTruthy`
266
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-be-truthy.md
267
+ */
268
+ 'test/prefer-to-be-truthy'?: Linter.RuleEntry<[]>
269
+ /**
270
+ * enforce using toContain()
271
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-contain.md
272
+ */
273
+ 'test/prefer-to-contain'?: Linter.RuleEntry<[]>
274
+ /**
275
+ * enforce using toHaveLength()
276
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-have-length.md
277
+ */
278
+ 'test/prefer-to-have-length'?: Linter.RuleEntry<[]>
279
+ /**
280
+ * enforce using `test.todo`
281
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-todo.md
282
+ */
283
+ 'test/prefer-todo'?: Linter.RuleEntry<[]>
284
+ /**
285
+ * require `vi.mocked()` over `fn as Mock`
286
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-vi-mocked.md
287
+ */
288
+ 'test/prefer-vi-mocked'?: Linter.RuleEntry<[]>
289
+ /**
290
+ * require setup and teardown to be within a hook
291
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-hook.md
292
+ */
293
+ 'test/require-hook'?: Linter.RuleEntry<TestRequireHook>
294
+ /**
295
+ * require local Test Context for concurrent snapshot tests
296
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-local-test-context-for-concurrent-snapshots.md
297
+ */
298
+ 'test/require-local-test-context-for-concurrent-snapshots'?: Linter.RuleEntry<[]>
299
+ /**
300
+ * enforce using type parameters with vitest mock functions
301
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-mock-type-parameters.md
302
+ */
303
+ 'test/require-mock-type-parameters'?: Linter.RuleEntry<TestRequireMockTypeParameters>
304
+ /**
305
+ * require toThrow() to be called with an error message
306
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-to-throw-message.md
307
+ */
308
+ 'test/require-to-throw-message'?: Linter.RuleEntry<[]>
309
+ /**
310
+ * enforce that all tests are in a top-level describe
311
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-top-level-describe.md
312
+ */
313
+ 'test/require-top-level-describe'?: Linter.RuleEntry<TestRequireTopLevelDescribe>
314
+ /**
315
+ * enforce valid describe callback
316
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/valid-describe-callback.md
317
+ */
318
+ 'test/valid-describe-callback'?: Linter.RuleEntry<[]>
319
+ /**
320
+ * enforce valid `expect()` usage
321
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/valid-expect.md
322
+ */
323
+ 'test/valid-expect'?: Linter.RuleEntry<TestValidExpect>
324
+ /**
325
+ * require promises that have expectations in their chain to be valid
326
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/valid-expect-in-promise.md
327
+ */
328
+ 'test/valid-expect-in-promise'?: Linter.RuleEntry<[]>
329
+ /**
330
+ * enforce valid titles
331
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/valid-title.md
332
+ */
333
+ 'test/valid-title'?: Linter.RuleEntry<TestValidTitle>
334
+ }
335
+
336
+ /* ======= Declarations ======= */
337
+ // ----- test/consistent-test-filename -----
338
+ type TestConsistentTestFilename = []|[{
339
+ pattern?: string
340
+ allTestPattern?: string
341
+ }]
342
+ // ----- test/consistent-test-it -----
343
+ type TestConsistentTestIt = []|[{
344
+ fn?: ("test" | "it")
345
+ withinDescribe?: ("test" | "it")
346
+ }]
347
+ // ----- test/expect-expect -----
348
+ type TestExpectExpect = []|[{
349
+ assertFunctionNames?: string[]
350
+ additionalTestBlockFunctions?: string[]
351
+ }]
352
+ // ----- test/max-expects -----
353
+ type TestMaxExpects = []|[{
354
+ max?: number
355
+ }]
356
+ // ----- test/max-nested-describe -----
357
+ type TestMaxNestedDescribe = []|[{
358
+ max?: number
359
+ }]
360
+ // ----- test/no-focused-tests -----
361
+ type TestNoFocusedTests = []|[{
362
+ fixable?: boolean
363
+ }]
364
+ // ----- test/no-hooks -----
365
+ type TestNoHooks = []|[{
366
+ allow?: unknown[]
367
+ }]
368
+ // ----- test/no-large-snapshots -----
369
+ type TestNoLargeSnapshots = []|[{
370
+ maxSize?: number
371
+ inlineMaxSize?: number
372
+ allowedSnapshots?: {
373
+ [k: string]: unknown[] | undefined
374
+ }
375
+ }]
376
+ // ----- test/no-restricted-matchers -----
377
+ type TestNoRestrictedMatchers = []|[{
378
+ [k: string]: (string | null) | undefined
379
+ }]
380
+ // ----- test/no-restricted-vi-methods -----
381
+ type TestNoRestrictedViMethods = []|[{
382
+ [k: string]: (string | null) | undefined
383
+ }]
384
+ // ----- test/no-standalone-expect -----
385
+ type TestNoStandaloneExpect = []|[{
386
+ additionalTestBlockFunctions?: string[]
387
+ }]
388
+ // ----- test/prefer-expect-assertions -----
389
+ type TestPreferExpectAssertions = []|[{
390
+ onlyFunctionsWithAsyncKeyword?: boolean
391
+ onlyFunctionsWithExpectInLoop?: boolean
392
+ onlyFunctionsWithExpectInCallback?: boolean
393
+ }]
394
+ // ----- test/prefer-lowercase-title -----
395
+ type TestPreferLowercaseTitle = []|[{
396
+ ignore?: ("describe" | "test" | "it")[]
397
+ allowedPrefixes?: string[]
398
+ ignoreTopLevelDescribe?: boolean
399
+ lowercaseFirstCharacterOnly?: boolean
400
+ }]
401
+ // ----- test/prefer-snapshot-hint -----
402
+ type TestPreferSnapshotHint = []|[("always" | "multi")]
403
+ // ----- test/require-hook -----
404
+ type TestRequireHook = []|[{
405
+ allowedFunctionCalls?: string[]
406
+ }]
407
+ // ----- test/require-mock-type-parameters -----
408
+ type TestRequireMockTypeParameters = []|[{
409
+ checkImportFunctions?: boolean
410
+ }]
411
+ // ----- test/require-top-level-describe -----
412
+ type TestRequireTopLevelDescribe = []|[{
413
+ maxNumberOfTopLevelDescribes?: number
414
+ }]
415
+ // ----- test/valid-expect -----
416
+ type TestValidExpect = []|[{
417
+ alwaysAwait?: boolean
418
+ asyncMatchers?: string[]
419
+ minArgs?: number
420
+ maxArgs?: number
421
+ }]
422
+ // ----- test/valid-title -----
423
+ type TestValidTitle = []|[{
424
+ ignoreTypeOfDescribeName?: boolean
425
+ allowArguments?: boolean
426
+ disallowedWords?: string[]
427
+ [k: string]: (string | [string]|[string, string] | {
428
+ [k: string]: (string | [string]|[string, string]) | undefined
429
+ })
430
+ }]