vize 0.747.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,338 @@
1
+ /// JSON Schema for the typescript-eslint type-aware rule options (prefer-promise-reject-errors through unbound-method).
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.TypeAwareRuleOptionsPToU
7
+
8
+ import "@json_schema/JsonSchema.pkl"
9
+
10
+ preferPromiseRejectErrorsDef: JsonSchema = new JsonSchema {
11
+ type = "object"
12
+ properties {
13
+ ["allow"] = new JsonSchema {
14
+ description = "Type specifiers that can be used as Promise rejection reasons."
15
+ type = "array"
16
+ items = new JsonSchema {
17
+ oneOf = new Listing {
18
+ new JsonSchema {
19
+ type = "string"
20
+ }
21
+ new JsonSchema {
22
+ type = "object"
23
+ properties {
24
+ ["from"] = new JsonSchema {
25
+ type = "string"
26
+ enum = new Listing { "file" }
27
+ }
28
+ ["name"] = new JsonSchema {
29
+ oneOf = new Listing {
30
+ new JsonSchema {
31
+ type = "string"
32
+ }
33
+ new JsonSchema {
34
+ type = "array"
35
+ items = new JsonSchema {
36
+ type = "string"
37
+ }
38
+ minItems = 1
39
+ uniqueItems = true
40
+ }
41
+ }
42
+ }
43
+ ["path"] = new JsonSchema {
44
+ type = "string"
45
+ }
46
+ }
47
+ required = new Listing { "from"; "name" }
48
+ additionalProperties = false
49
+ }
50
+ new JsonSchema {
51
+ type = "object"
52
+ properties {
53
+ ["from"] = new JsonSchema {
54
+ type = "string"
55
+ enum = new Listing { "lib" }
56
+ }
57
+ ["name"] = new JsonSchema {
58
+ oneOf = new Listing {
59
+ new JsonSchema {
60
+ type = "string"
61
+ }
62
+ new JsonSchema {
63
+ type = "array"
64
+ items = new JsonSchema {
65
+ type = "string"
66
+ }
67
+ minItems = 1
68
+ uniqueItems = true
69
+ }
70
+ }
71
+ }
72
+ }
73
+ required = new Listing { "from"; "name" }
74
+ additionalProperties = false
75
+ }
76
+ new JsonSchema {
77
+ type = "object"
78
+ properties {
79
+ ["from"] = new JsonSchema {
80
+ type = "string"
81
+ enum = new Listing { "package" }
82
+ }
83
+ ["name"] = new JsonSchema {
84
+ oneOf = new Listing {
85
+ new JsonSchema {
86
+ type = "string"
87
+ }
88
+ new JsonSchema {
89
+ type = "array"
90
+ items = new JsonSchema {
91
+ type = "string"
92
+ }
93
+ minItems = 1
94
+ uniqueItems = true
95
+ }
96
+ }
97
+ }
98
+ ["package"] = new JsonSchema {
99
+ type = "string"
100
+ }
101
+ }
102
+ required = new Listing { "from"; "name"; "package" }
103
+ additionalProperties = false
104
+ }
105
+ }
106
+ }
107
+ default = new Listing { }
108
+ }
109
+ ["allowEmptyReject"] = new JsonSchema {
110
+ description = "Whether to allow calls to `Promise.reject()` with no arguments."
111
+ type = "boolean"
112
+ default = false
113
+ }
114
+ ["allowThrowingAny"] = new JsonSchema {
115
+ description = "Whether to always allow throwing values typed as `any`."
116
+ type = "boolean"
117
+ default = false
118
+ }
119
+ ["allowThrowingUnknown"] = new JsonSchema {
120
+ description = "Whether to always allow throwing values typed as `unknown`."
121
+ type = "boolean"
122
+ default = false
123
+ }
124
+ }
125
+ additionalProperties = false
126
+ }
127
+
128
+ restrictPlusOperandsDef: JsonSchema = new JsonSchema {
129
+ type = "object"
130
+ properties {
131
+ ["allowAny"] = new JsonSchema {
132
+ description = "Whether to allow `any` typed values."
133
+ type = "boolean"
134
+ default = true
135
+ }
136
+ ["allowBoolean"] = new JsonSchema {
137
+ description = "Whether to allow `boolean` typed values."
138
+ type = "boolean"
139
+ default = true
140
+ }
141
+ ["allowNullish"] = new JsonSchema {
142
+ description = "Whether to allow potentially `null` or `undefined` typed values."
143
+ type = "boolean"
144
+ default = true
145
+ }
146
+ ["allowNumberAndString"] = new JsonSchema {
147
+ description = "Whether to allow `bigint`/`number` typed values and `string` typed values to be added together."
148
+ type = "boolean"
149
+ default = true
150
+ }
151
+ ["allowRegExp"] = new JsonSchema {
152
+ description = "Whether to allow `regexp` typed values."
153
+ type = "boolean"
154
+ default = true
155
+ }
156
+ ["skipCompoundAssignments"] = new JsonSchema {
157
+ description = "Whether to skip compound assignments such as `+=`."
158
+ type = "boolean"
159
+ default = false
160
+ }
161
+ }
162
+ additionalProperties = false
163
+ }
164
+
165
+ restrictTemplateExpressionsDef: JsonSchema = new JsonSchema {
166
+ type = "object"
167
+ properties {
168
+ ["allowAny"] = new JsonSchema {
169
+ description = "Whether to allow `any` typed values in template expressions."
170
+ type = "boolean"
171
+ default = true
172
+ }
173
+ ["allowArray"] = new JsonSchema {
174
+ description = "Whether to allow `array` typed values in template expressions."
175
+ type = "boolean"
176
+ }
177
+ ["allowBoolean"] = new JsonSchema {
178
+ description = "Whether to allow `boolean` typed values in template expressions."
179
+ type = "boolean"
180
+ default = true
181
+ }
182
+ ["allowNullish"] = new JsonSchema {
183
+ description = "Whether to allow `nullish` typed values in template expressions."
184
+ type = "boolean"
185
+ default = true
186
+ }
187
+ ["allowNumber"] = new JsonSchema {
188
+ description = "Whether to allow `number` typed values in template expressions."
189
+ type = "boolean"
190
+ default = true
191
+ }
192
+ ["allowRegExp"] = new JsonSchema {
193
+ description = "Whether to allow `regexp` typed values in template expressions."
194
+ type = "boolean"
195
+ default = true
196
+ }
197
+ ["allowNever"] = new JsonSchema {
198
+ description = "Whether to allow `never` typed values in template expressions."
199
+ type = "boolean"
200
+ }
201
+ ["allow"] = new JsonSchema {
202
+ description = "Types to allow in template expressions."
203
+ type = "array"
204
+ items = new JsonSchema {
205
+ oneOf = new Listing {
206
+ new JsonSchema {
207
+ type = "string"
208
+ }
209
+ new JsonSchema {
210
+ type = "object"
211
+ properties {
212
+ ["from"] = new JsonSchema {
213
+ type = "string"
214
+ enum = new Listing { "file" }
215
+ }
216
+ ["name"] = new JsonSchema {
217
+ oneOf = new Listing {
218
+ new JsonSchema {
219
+ type = "string"
220
+ }
221
+ new JsonSchema {
222
+ type = "array"
223
+ items = new JsonSchema {
224
+ type = "string"
225
+ }
226
+ minItems = 1
227
+ uniqueItems = true
228
+ }
229
+ }
230
+ }
231
+ ["path"] = new JsonSchema {
232
+ type = "string"
233
+ }
234
+ }
235
+ required = new Listing { "from"; "name" }
236
+ additionalProperties = false
237
+ }
238
+ new JsonSchema {
239
+ type = "object"
240
+ properties {
241
+ ["from"] = new JsonSchema {
242
+ type = "string"
243
+ enum = new Listing { "lib" }
244
+ }
245
+ ["name"] = new JsonSchema {
246
+ oneOf = new Listing {
247
+ new JsonSchema {
248
+ type = "string"
249
+ }
250
+ new JsonSchema {
251
+ type = "array"
252
+ items = new JsonSchema {
253
+ type = "string"
254
+ }
255
+ minItems = 1
256
+ uniqueItems = true
257
+ }
258
+ }
259
+ }
260
+ }
261
+ required = new Listing { "from"; "name" }
262
+ additionalProperties = false
263
+ }
264
+ new JsonSchema {
265
+ type = "object"
266
+ properties {
267
+ ["from"] = new JsonSchema {
268
+ type = "string"
269
+ enum = new Listing { "package" }
270
+ }
271
+ ["name"] = new JsonSchema {
272
+ oneOf = new Listing {
273
+ new JsonSchema {
274
+ type = "string"
275
+ }
276
+ new JsonSchema {
277
+ type = "array"
278
+ items = new JsonSchema {
279
+ type = "string"
280
+ }
281
+ minItems = 1
282
+ uniqueItems = true
283
+ }
284
+ }
285
+ }
286
+ ["package"] = new JsonSchema {
287
+ type = "string"
288
+ }
289
+ }
290
+ required = new Listing { "from"; "name"; "package" }
291
+ additionalProperties = false
292
+ }
293
+ }
294
+ }
295
+ default = new Listing { new Dynamic { name = new Listing { "Error"; "URL"; "URLSearchParams" }; from = "lib" } }
296
+ }
297
+ }
298
+ additionalProperties = false
299
+ }
300
+
301
+ returnAwaitDef: JsonSchema = new JsonSchema {
302
+ type = "string"
303
+ oneOf = new Listing {
304
+ new JsonSchema {
305
+ description = "Requires that all returned promises be awaited."
306
+ type = "string"
307
+ enum = new Listing { "always" }
308
+ }
309
+ new JsonSchema {
310
+ description = "In error-handling contexts, the rule enforces that returned promises must be awaited. In ordinary contexts, the rule does not enforce any particular behavior around whether returned promises are awaited."
311
+ type = "string"
312
+ enum = new Listing { "error-handling-correctness-only" }
313
+ }
314
+ new JsonSchema {
315
+ description = "In error-handling contexts, the rule enforces that returned promises must be awaited. In ordinary contexts, the rule enforces that returned promises _must not_ be awaited."
316
+ type = "string"
317
+ enum = new Listing { "in-try-catch" }
318
+ }
319
+ new JsonSchema {
320
+ description = "Disallows awaiting any returned promises."
321
+ type = "string"
322
+ enum = new Listing { "never" }
323
+ }
324
+ }
325
+ default = "in-try-catch"
326
+ }
327
+
328
+ unboundMethodDef: JsonSchema = new JsonSchema {
329
+ type = "object"
330
+ properties {
331
+ ["ignoreStatic"] = new JsonSchema {
332
+ description = "Whether to skip checking whether `static` methods are correctly bound."
333
+ type = "boolean"
334
+ default = false
335
+ }
336
+ }
337
+ additionalProperties = false
338
+ }
package/pkl/vize.pkl CHANGED
@@ -17,21 +17,9 @@ typealias JsxCompat = "native" | "babel"
17
17
  typealias ScriptExt = "ts" | "js"
18
18
  typealias RuleSeverity = "off" | "warn" | "error"
19
19
  typealias LintPreset =
20
- "general-recommended"
21
- | "general_recommended"
22
- | "generalRecommended"
23
- | "happy-path"
24
- | "happy_path"
25
- | "happy"
26
- | "default"
27
- | "recommended"
28
- | "opinionated"
29
- | "strict"
30
- | "all"
31
- | "essential"
32
- | "incremental"
33
- | "ecosystem"
34
- | "nuxt"
20
+ "general-recommended" | "general_recommended" | "generalRecommended"
21
+ | "happy-path" | "happy_path" | "happy" | "default" | "recommended" | "opinionated"
22
+ | "strict" | "all" | "essential" | "incremental" | "ecosystem" | "nuxt"
35
23
  typealias TemplateComponentNameCasing = "PascalCase" | "kebab-case"
36
24
  typealias CustomEventNameCasing = "lowercase" | "camelCase" | "kebab-case"
37
25
  typealias PropNameCasingStyle = "camelCase" | "snake_case"
@@ -276,6 +264,25 @@ class LintRuleOptions {
276
264
  `vue/no-restricted-static-attribute`: LintRuleOptionTypes.RestrictedNames? = null
277
265
  `vue/no-restricted-v-on`: LintRuleOptionTypes.RestrictedNames? = null
278
266
  `vue/no-unsupported-features`: LintRuleOptionTypes.UnsupportedFeaturesOptions? = null
267
+ `type/await-thenable`: LintRuleOptionTypes.AwaitThenableOptions? = null
268
+ `type/no-base-to-string`: LintRuleOptionTypes.NoBaseToStringOptions? = null
269
+ `type/no-confusing-void-expression`: LintRuleOptionTypes.NoConfusingVoidExpressionOptions? = null
270
+ `type/no-deprecated`: LintRuleOptionTypes.AllowListOptions? = null
271
+ `type/no-duplicate-type-constituents`: LintRuleOptionTypes.NoDuplicateTypeConstituentsOptions? = null
272
+ `type/no-floating-promises`: LintRuleOptionTypes.NoFloatingPromisesOptions? = null
273
+ `type/no-meaningless-void-operator`: LintRuleOptionTypes.NoMeaninglessVoidOperatorOptions? = null
274
+ `type/no-misused-promises`: LintRuleOptionTypes.NoMisusedPromisesOptions? = null
275
+ `type/no-misused-spread`: LintRuleOptionTypes.AllowListOptions? = null
276
+ `type/no-unnecessary-boolean-literal-compare`: LintRuleOptionTypes.NoUnnecessaryBooleanLiteralCompareOptions? = null
277
+ `type/no-unnecessary-condition`: LintRuleOptionTypes.NoUnnecessaryConditionOptions? = null
278
+ `type/no-unnecessary-type-assertion`: LintRuleOptionTypes.NoUnnecessaryTypeAssertionOptions? = null
279
+ `type/no-unsafe-member-access`: LintRuleOptionTypes.NoUnsafeMemberAccessOptions? = null
280
+ `type/only-throw-error`: LintRuleOptionTypes.OnlyThrowErrorOptions? = null
281
+ `type/prefer-promise-reject-errors`: LintRuleOptionTypes.PreferPromiseRejectErrorsOptions? = null
282
+ `type/restrict-plus-operands`: LintRuleOptionTypes.RestrictPlusOperandsOptions? = null
283
+ `type/restrict-template-expressions`: LintRuleOptionTypes.RestrictTemplateExpressionsOptions? = null
284
+ `type/return-await`: LintRuleOptionTypes.ReturnAwaitOption? = null
285
+ `type/unbound-method`: LintRuleOptionTypes.UnboundMethodOptions? = null
279
286
  `vue/no-unused-script-vars`: LintRuleOptionTypes.NoUnusedScriptVarsOptions? = null
280
287
  `vue/prefer-const`: LintRuleOptionTypes.PreferConstOptions? = null
281
288
  `vue/enforce-style-attribute`: EnforceStyleAttributeOptions? = null