vize 0.746.0 → 0.748.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.
@@ -0,0 +1,400 @@
1
+ /// JSON Schema for the typescript-eslint type-aware rule options (no-meaningless-void-operator through only-throw-error).
2
+ ///
3
+ /// Generated from the rule schemas and defaults of @typescript-eslint/eslint-plugin
4
+ /// 8.72.1; keep it in step with
5
+ /// davinci/vize_l0/src/config/model/linter_rule_options/type_aware.rs.
6
+ module vize.jsonschema.TypeAwareRuleOptionsMToO
7
+
8
+ import "@json_schema/JsonSchema.pkl"
9
+
10
+ noMeaninglessVoidOperatorDef: JsonSchema = new JsonSchema {
11
+ type = "object"
12
+ properties {
13
+ ["checkNever"] = new JsonSchema {
14
+ description = "Whether to suggest removing `void` when a call's return type is `never`."
15
+ type = "boolean"
16
+ default = false
17
+ }
18
+ }
19
+ additionalProperties = false
20
+ }
21
+
22
+ noMisusedPromisesDef: JsonSchema = new JsonSchema {
23
+ type = "object"
24
+ properties {
25
+ ["checksConditionals"] = new JsonSchema {
26
+ description = "Whether to warn when a Promise is provided to conditional statements."
27
+ oneOf = new Listing {
28
+ new JsonSchema {
29
+ description = "Whether to check conditionals."
30
+ type = "boolean"
31
+ }
32
+ new JsonSchema {
33
+ description = "Detailed settings for conditional inspection."
34
+ type = "object"
35
+ properties {
36
+ ["flagUnions"] = new JsonSchema {
37
+ description = "Configures how union types containing Promise-like types are checked."
38
+ type = "string"
39
+ enum = new Listing { "all"; "strict"; "none" }
40
+ }
41
+ }
42
+ additionalProperties = false
43
+ }
44
+ }
45
+ default = true
46
+ }
47
+ ["checksSpreads"] = new JsonSchema {
48
+ description = "Whether to warn when `...` spreading a `Promise`."
49
+ type = "boolean"
50
+ default = true
51
+ }
52
+ ["checksVoidReturn"] = new JsonSchema {
53
+ description = "Whether to warn when a Promise is returned from a function typed as returning `void`."
54
+ oneOf = new Listing {
55
+ new JsonSchema {
56
+ description = "Whether to disable checking all asynchronous functions."
57
+ type = "boolean"
58
+ }
59
+ new JsonSchema {
60
+ description = "Which forms of functions may have checking disabled."
61
+ type = "object"
62
+ properties {
63
+ ["arguments"] = new JsonSchema {
64
+ description = "Disables checking an asynchronous function passed as argument where the parameter type expects a function that returns `void`."
65
+ type = "boolean"
66
+ }
67
+ ["attributes"] = new JsonSchema {
68
+ description = "Disables checking an asynchronous function passed as a JSX attribute expected to be a function that returns `void`."
69
+ type = "boolean"
70
+ }
71
+ ["inheritedMethods"] = new JsonSchema {
72
+ description = "Disables checking an asynchronous method in a type that extends or implements another type expecting that method to return `void`."
73
+ type = "boolean"
74
+ }
75
+ ["properties"] = new JsonSchema {
76
+ description = "Disables checking an asynchronous function passed as an object property expected to be a function that returns `void`."
77
+ type = "boolean"
78
+ }
79
+ ["returns"] = new JsonSchema {
80
+ description = "Disables checking an asynchronous function returned in a function whose return type is a function that returns `void`."
81
+ type = "boolean"
82
+ }
83
+ ["variables"] = new JsonSchema {
84
+ description = "Disables checking an asynchronous function used as a variable whose return type is a function that returns `void`."
85
+ type = "boolean"
86
+ }
87
+ }
88
+ additionalProperties = false
89
+ }
90
+ }
91
+ default = true
92
+ }
93
+ }
94
+ additionalProperties = false
95
+ }
96
+
97
+ noMisusedSpreadDef: JsonSchema = new JsonSchema {
98
+ type = "object"
99
+ properties {
100
+ ["allow"] = new JsonSchema {
101
+ description = "An array of type specifiers that are known to be safe to spread."
102
+ type = "array"
103
+ items = new JsonSchema {
104
+ oneOf = new Listing {
105
+ new JsonSchema {
106
+ type = "string"
107
+ }
108
+ new JsonSchema {
109
+ type = "object"
110
+ properties {
111
+ ["from"] = new JsonSchema {
112
+ type = "string"
113
+ enum = new Listing { "file" }
114
+ }
115
+ ["name"] = new JsonSchema {
116
+ oneOf = new Listing {
117
+ new JsonSchema {
118
+ type = "string"
119
+ }
120
+ new JsonSchema {
121
+ type = "array"
122
+ items = new JsonSchema {
123
+ type = "string"
124
+ }
125
+ minItems = 1
126
+ uniqueItems = true
127
+ }
128
+ }
129
+ }
130
+ ["path"] = new JsonSchema {
131
+ type = "string"
132
+ }
133
+ }
134
+ required = new Listing { "from"; "name" }
135
+ additionalProperties = false
136
+ }
137
+ new JsonSchema {
138
+ type = "object"
139
+ properties {
140
+ ["from"] = new JsonSchema {
141
+ type = "string"
142
+ enum = new Listing { "lib" }
143
+ }
144
+ ["name"] = new JsonSchema {
145
+ oneOf = new Listing {
146
+ new JsonSchema {
147
+ type = "string"
148
+ }
149
+ new JsonSchema {
150
+ type = "array"
151
+ items = new JsonSchema {
152
+ type = "string"
153
+ }
154
+ minItems = 1
155
+ uniqueItems = true
156
+ }
157
+ }
158
+ }
159
+ }
160
+ required = new Listing { "from"; "name" }
161
+ additionalProperties = false
162
+ }
163
+ new JsonSchema {
164
+ type = "object"
165
+ properties {
166
+ ["from"] = new JsonSchema {
167
+ type = "string"
168
+ enum = new Listing { "package" }
169
+ }
170
+ ["name"] = new JsonSchema {
171
+ oneOf = new Listing {
172
+ new JsonSchema {
173
+ type = "string"
174
+ }
175
+ new JsonSchema {
176
+ type = "array"
177
+ items = new JsonSchema {
178
+ type = "string"
179
+ }
180
+ minItems = 1
181
+ uniqueItems = true
182
+ }
183
+ }
184
+ }
185
+ ["package"] = new JsonSchema {
186
+ type = "string"
187
+ }
188
+ }
189
+ required = new Listing { "from"; "name"; "package" }
190
+ additionalProperties = false
191
+ }
192
+ }
193
+ }
194
+ default = new Listing { }
195
+ }
196
+ }
197
+ additionalProperties = false
198
+ }
199
+
200
+ noUnnecessaryBooleanLiteralCompareDef: JsonSchema = new JsonSchema {
201
+ type = "object"
202
+ properties {
203
+ ["allowComparingNullableBooleansToFalse"] = new JsonSchema {
204
+ description = "Whether to allow comparisons between nullable boolean variables and `false`."
205
+ type = "boolean"
206
+ default = true
207
+ }
208
+ ["allowComparingNullableBooleansToTrue"] = new JsonSchema {
209
+ description = "Whether to allow comparisons between nullable boolean variables and `true`."
210
+ type = "boolean"
211
+ default = true
212
+ }
213
+ ["allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing"] = new JsonSchema {
214
+ description = "Unless this is set to `true`, the rule will error on every file whose `tsconfig.json` does _not_ have the `strictNullChecks` compiler option (or `strict`) set to `true`."
215
+ type = "boolean"
216
+ default = false
217
+ }
218
+ }
219
+ additionalProperties = false
220
+ }
221
+
222
+ noUnnecessaryConditionDef: JsonSchema = new JsonSchema {
223
+ type = "object"
224
+ properties {
225
+ ["allowConstantLoopConditions"] = new JsonSchema {
226
+ description = "Whether to ignore constant loop conditions, such as `while (true)`."
227
+ oneOf = new Listing {
228
+ new JsonSchema {
229
+ description = "Always ignore or not ignore the loop conditions"
230
+ type = "boolean"
231
+ }
232
+ new JsonSchema {
233
+ description = "Which situations to ignore constant conditions in."
234
+ type = "string"
235
+ enum = new Listing { "always"; "never"; "only-allowed-literals" }
236
+ }
237
+ }
238
+ default = "never"
239
+ }
240
+ ["allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing"] = new JsonSchema {
241
+ description = "Whether to not error when running with a tsconfig that has strictNullChecks turned."
242
+ type = "boolean"
243
+ default = false
244
+ }
245
+ ["checkTypePredicates"] = new JsonSchema {
246
+ description = "Whether to check the asserted argument of a type predicate function for unnecessary conditions"
247
+ type = "boolean"
248
+ default = false
249
+ }
250
+ }
251
+ additionalProperties = false
252
+ }
253
+
254
+ noUnnecessaryTypeAssertionDef: JsonSchema = new JsonSchema {
255
+ type = "object"
256
+ properties {
257
+ ["checkLiteralConstAssertions"] = new JsonSchema {
258
+ description = "Whether to check literal const assertions."
259
+ type = "boolean"
260
+ }
261
+ ["typesToIgnore"] = new JsonSchema {
262
+ description = "A list of type names to ignore."
263
+ type = "array"
264
+ items = new JsonSchema {
265
+ type = "string"
266
+ }
267
+ }
268
+ }
269
+ additionalProperties = false
270
+ }
271
+
272
+ noUnsafeMemberAccessDef: JsonSchema = new JsonSchema {
273
+ type = "object"
274
+ properties {
275
+ ["allowOptionalChaining"] = new JsonSchema {
276
+ description = "Whether to allow `?.` optional chains on `any` values."
277
+ type = "boolean"
278
+ default = false
279
+ }
280
+ }
281
+ additionalProperties = false
282
+ }
283
+
284
+ onlyThrowErrorDef: JsonSchema = new JsonSchema {
285
+ type = "object"
286
+ properties {
287
+ ["allow"] = new JsonSchema {
288
+ description = "Type specifiers that can be thrown."
289
+ type = "array"
290
+ items = new JsonSchema {
291
+ oneOf = new Listing {
292
+ new JsonSchema {
293
+ type = "string"
294
+ }
295
+ new JsonSchema {
296
+ type = "object"
297
+ properties {
298
+ ["from"] = new JsonSchema {
299
+ type = "string"
300
+ enum = new Listing { "file" }
301
+ }
302
+ ["name"] = new JsonSchema {
303
+ oneOf = new Listing {
304
+ new JsonSchema {
305
+ type = "string"
306
+ }
307
+ new JsonSchema {
308
+ type = "array"
309
+ items = new JsonSchema {
310
+ type = "string"
311
+ }
312
+ minItems = 1
313
+ uniqueItems = true
314
+ }
315
+ }
316
+ }
317
+ ["path"] = new JsonSchema {
318
+ type = "string"
319
+ }
320
+ }
321
+ required = new Listing { "from"; "name" }
322
+ additionalProperties = false
323
+ }
324
+ new JsonSchema {
325
+ type = "object"
326
+ properties {
327
+ ["from"] = new JsonSchema {
328
+ type = "string"
329
+ enum = new Listing { "lib" }
330
+ }
331
+ ["name"] = new JsonSchema {
332
+ oneOf = new Listing {
333
+ new JsonSchema {
334
+ type = "string"
335
+ }
336
+ new JsonSchema {
337
+ type = "array"
338
+ items = new JsonSchema {
339
+ type = "string"
340
+ }
341
+ minItems = 1
342
+ uniqueItems = true
343
+ }
344
+ }
345
+ }
346
+ }
347
+ required = new Listing { "from"; "name" }
348
+ additionalProperties = false
349
+ }
350
+ new JsonSchema {
351
+ type = "object"
352
+ properties {
353
+ ["from"] = new JsonSchema {
354
+ type = "string"
355
+ enum = new Listing { "package" }
356
+ }
357
+ ["name"] = new JsonSchema {
358
+ oneOf = new Listing {
359
+ new JsonSchema {
360
+ type = "string"
361
+ }
362
+ new JsonSchema {
363
+ type = "array"
364
+ items = new JsonSchema {
365
+ type = "string"
366
+ }
367
+ minItems = 1
368
+ uniqueItems = true
369
+ }
370
+ }
371
+ }
372
+ ["package"] = new JsonSchema {
373
+ type = "string"
374
+ }
375
+ }
376
+ required = new Listing { "from"; "name"; "package" }
377
+ additionalProperties = false
378
+ }
379
+ }
380
+ }
381
+ default = new Listing { }
382
+ }
383
+ ["allowRethrowing"] = new JsonSchema {
384
+ description = "Whether to allow rethrowing caught values that are not `Error` objects."
385
+ type = "boolean"
386
+ default = true
387
+ }
388
+ ["allowThrowingAny"] = new JsonSchema {
389
+ description = "Whether to always allow throwing values typed as `any`."
390
+ type = "boolean"
391
+ default = true
392
+ }
393
+ ["allowThrowingUnknown"] = new JsonSchema {
394
+ description = "Whether to always allow throwing values typed as `unknown`."
395
+ type = "boolean"
396
+ default = true
397
+ }
398
+ }
399
+ additionalProperties = false
400
+ }