@neralabs/rerail-pack-javascript 0.1.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/LICENSE +202 -0
- package/NOTICE +7 -0
- package/README.md +37 -0
- package/licenses/eslint/LICENSE +19 -0
- package/licenses/eslint/UPSTREAM.md +10363 -0
- package/licenses/eslint-plugin-unicorn/LICENSE +9 -0
- package/licenses/eslint-plugin-unicorn/UPSTREAM.md +297 -0
- package/pack.json +499 -0
- package/package.json +30 -0
- package/rules/eslint-arrow-body-style.json +1 -0
- package/rules/eslint-capitalized-comments.json +1 -0
- package/rules/eslint-default-case-last.json +52 -0
- package/rules/eslint-default-case.json +1 -0
- package/rules/eslint-eqeqeq.json +608 -0
- package/rules/eslint-func-style.json +1 -0
- package/rules/eslint-guard-for-in.json +144 -0
- package/rules/eslint-no-bitwise.json +1 -0
- package/rules/eslint-no-caller.json +63 -0
- package/rules/eslint-no-case-declarations.json +101 -0
- package/rules/eslint-no-compare-neg-zero.json +109 -0
- package/rules/eslint-no-cond-assign.json +1 -0
- package/rules/eslint-no-console.json +1 -0
- package/rules/eslint-no-continue.json +48 -0
- package/rules/eslint-no-debugger.json +55 -0
- package/rules/eslint-no-delete-var.json +63 -0
- package/rules/eslint-no-div-regex.json +1 -0
- package/rules/eslint-no-dupe-keys.json +295 -0
- package/rules/eslint-no-duplicate-case.json +160 -0
- package/rules/eslint-no-empty-pattern.json +1 -0
- package/rules/eslint-no-empty-static-block.json +64 -0
- package/rules/eslint-no-empty.json +187 -0
- package/rules/eslint-no-eq-null.json +65 -0
- package/rules/eslint-no-extend-native.json +1 -0
- package/rules/eslint-no-inline-comments.json +1 -0
- package/rules/eslint-no-iterator.json +1 -0
- package/rules/eslint-no-loss-of-precision.json +1 -0
- package/rules/eslint-no-multi-str.json +61 -0
- package/rules/eslint-no-negated-condition.json +114 -0
- package/rules/eslint-no-nested-ternary.json +76 -0
- package/rules/eslint-no-new-wrappers.json +89 -0
- package/rules/eslint-no-new.json +56 -0
- package/rules/eslint-no-nonoctal-decimal-escape.json +54 -0
- package/rules/eslint-no-octal-escape.json +1 -0
- package/rules/eslint-no-octal.json +15 -0
- package/rules/eslint-no-plusplus.json +1 -0
- package/rules/eslint-no-proto.json +1 -0
- package/rules/eslint-no-prototype-builtins.json +143 -0
- package/rules/eslint-no-return-assign.json +1 -0
- package/rules/eslint-no-script-url.json +81 -0
- package/rules/eslint-no-self-compare.json +121 -0
- package/rules/eslint-no-setter-return.json +1 -0
- package/rules/eslint-no-sparse-arrays.json +59 -0
- package/rules/eslint-no-template-curly-in-string.json +58 -0
- package/rules/eslint-no-ternary.json +48 -0
- package/rules/eslint-no-unneeded-ternary.json +1 -0
- package/rules/eslint-no-unsafe-finally.json +570 -0
- package/rules/eslint-no-unsafe-negation.json +1 -0
- package/rules/eslint-no-useless-call.json +1 -0
- package/rules/eslint-no-useless-catch.json +239 -0
- package/rules/eslint-no-useless-concat.json +1 -0
- package/rules/eslint-no-void.json +1 -0
- package/rules/eslint-no-warning-comments.json +1 -0
- package/rules/eslint-no-with.json +51 -0
- package/rules/eslint-operator-assignment.json +1 -0
- package/rules/eslint-prefer-numeric-literals.json +1 -0
- package/rules/eslint-prefer-spread.json +1 -0
- package/rules/eslint-prefer-template.json +187 -0
- package/rules/eslint-radix.json +533 -0
- package/rules/eslint-sort-imports.json +1 -0
- package/rules/eslint-sort-keys.json +1 -0
- package/rules/eslint-sort-vars.json +1 -0
- package/rules/eslint-use-isnan.json +400 -0
- package/rules/eslint-valid-typeof.json +1 -0
- package/rules/eslint-yoda.json +1 -0
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
{
|
|
2
|
+
"format": "rerail.policy/v1",
|
|
3
|
+
"id": "eslint-use-isnan",
|
|
4
|
+
"revision": 4,
|
|
5
|
+
"mode": "steer",
|
|
6
|
+
"description": "ESLint 10.11.0 use-isnan, default options. Port of ESLint's `use-isnan` rule (https://eslint.org/docs/latest/rules/use-isnan). Flags comparisons with NaN and, by default, `switch(NaN)` / `case NaN`. NaN and Number are resolved with `resolves` so a shadowing binding does not fire. Default options: enforceForSwitchCase true, enforceForIndexOf false. Options are declared in the `options` define (the rule's defaults); a variant is a config patch.",
|
|
7
|
+
"scope": {
|
|
8
|
+
"include": [
|
|
9
|
+
"**/*.ts",
|
|
10
|
+
"**/*.tsx",
|
|
11
|
+
"**/*.mts",
|
|
12
|
+
"**/*.cts",
|
|
13
|
+
"**/*.js",
|
|
14
|
+
"**/*.jsx",
|
|
15
|
+
"**/*.mjs",
|
|
16
|
+
"**/*.cjs"
|
|
17
|
+
],
|
|
18
|
+
"exclude": []
|
|
19
|
+
},
|
|
20
|
+
"clauses": [
|
|
21
|
+
{
|
|
22
|
+
"id": "options",
|
|
23
|
+
"define": {
|
|
24
|
+
"options": {
|
|
25
|
+
"enforceForIndexOf": {
|
|
26
|
+
"type": "boolean",
|
|
27
|
+
"nullable": true,
|
|
28
|
+
"default": null
|
|
29
|
+
},
|
|
30
|
+
"enforceForSwitchCase": {
|
|
31
|
+
"type": "boolean",
|
|
32
|
+
"nullable": true,
|
|
33
|
+
"default": null
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"id": "shared",
|
|
40
|
+
"define": {
|
|
41
|
+
"language": "typescript",
|
|
42
|
+
"utils": {
|
|
43
|
+
"nan": {
|
|
44
|
+
"any": [
|
|
45
|
+
{
|
|
46
|
+
"kind": "identifier",
|
|
47
|
+
"resolves": {
|
|
48
|
+
"global": [
|
|
49
|
+
"NaN"
|
|
50
|
+
],
|
|
51
|
+
"directives": "eslint"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"kind": "member_expression",
|
|
56
|
+
"all": [
|
|
57
|
+
{
|
|
58
|
+
"has": {
|
|
59
|
+
"kind": "property_identifier",
|
|
60
|
+
"regex": "^NaN$"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"matches": "r1"
|
|
65
|
+
}
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"kind": "subscript_expression",
|
|
70
|
+
"all": [
|
|
71
|
+
{
|
|
72
|
+
"has": {
|
|
73
|
+
"any": [
|
|
74
|
+
{
|
|
75
|
+
"kind": "string"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"matches": "r2"
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
"has": {
|
|
82
|
+
"kind": "string_fragment",
|
|
83
|
+
"regex": "^NaN$"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"matches": "r1"
|
|
89
|
+
}
|
|
90
|
+
]
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"kind": "parenthesized_expression",
|
|
94
|
+
"has": {
|
|
95
|
+
"matches": "nan"
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"kind": "sequence_expression",
|
|
100
|
+
"has": {
|
|
101
|
+
"matches": "nan",
|
|
102
|
+
"not": {
|
|
103
|
+
"precedes": {
|
|
104
|
+
"regex": "[\\s\\S]"
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
]
|
|
110
|
+
},
|
|
111
|
+
"r1": {
|
|
112
|
+
"has": {
|
|
113
|
+
"any": [
|
|
114
|
+
{
|
|
115
|
+
"kind": "identifier"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"kind": "parenthesized_expression"
|
|
119
|
+
}
|
|
120
|
+
],
|
|
121
|
+
"resolves": {
|
|
122
|
+
"directives": "eslint",
|
|
123
|
+
"global": [
|
|
124
|
+
"Number"
|
|
125
|
+
]
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"r2": {
|
|
130
|
+
"kind": "template_string",
|
|
131
|
+
"not": {
|
|
132
|
+
"has": {
|
|
133
|
+
"kind": "template_substitution"
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"id": "comparison-with-nan",
|
|
142
|
+
"forbid": {
|
|
143
|
+
"ast": {
|
|
144
|
+
"language": "typescript",
|
|
145
|
+
"languageOptions": {},
|
|
146
|
+
"rule": {
|
|
147
|
+
"kind": "binary_expression",
|
|
148
|
+
"all": [
|
|
149
|
+
{
|
|
150
|
+
"has": {
|
|
151
|
+
"regex": "^(<|>|<=|>=|==|!=|===|!==)$"
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"has": {
|
|
156
|
+
"matches": "nan"
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
]
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
"violation": {
|
|
164
|
+
"anchor": "witness.span",
|
|
165
|
+
"code": "use-isnan",
|
|
166
|
+
"message": "Use the isNaN function to compare with NaN.",
|
|
167
|
+
"suppress": {
|
|
168
|
+
"eslint": {
|
|
169
|
+
"rules": [
|
|
170
|
+
"use-isnan"
|
|
171
|
+
]
|
|
172
|
+
},
|
|
173
|
+
"oxlint": {
|
|
174
|
+
"rules": [
|
|
175
|
+
"use-isnan"
|
|
176
|
+
]
|
|
177
|
+
},
|
|
178
|
+
"biome": {
|
|
179
|
+
"rules": [
|
|
180
|
+
"lint/correctness/useIsNan"
|
|
181
|
+
]
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"id": "switch-nan",
|
|
188
|
+
"forbid": {
|
|
189
|
+
"ast": {
|
|
190
|
+
"language": "typescript",
|
|
191
|
+
"languageOptions": {},
|
|
192
|
+
"rule": {
|
|
193
|
+
"kind": "switch_statement",
|
|
194
|
+
"has": {
|
|
195
|
+
"kind": "parenthesized_expression",
|
|
196
|
+
"matches": "nan"
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
"when": {
|
|
200
|
+
"option": {
|
|
201
|
+
"enforceForSwitchCase": null
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
"violation": {
|
|
207
|
+
"anchor": "witness.span",
|
|
208
|
+
"code": "use-isnan",
|
|
209
|
+
"message": "'switch(NaN)' can never match a case clause. Use Number.isNaN instead of the switch.",
|
|
210
|
+
"suppress": {
|
|
211
|
+
"eslint": {
|
|
212
|
+
"rules": [
|
|
213
|
+
"use-isnan"
|
|
214
|
+
]
|
|
215
|
+
},
|
|
216
|
+
"oxlint": {
|
|
217
|
+
"rules": [
|
|
218
|
+
"use-isnan"
|
|
219
|
+
]
|
|
220
|
+
},
|
|
221
|
+
"biome": {
|
|
222
|
+
"rules": [
|
|
223
|
+
"lint/correctness/useIsNan"
|
|
224
|
+
]
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
"id": "case-nan",
|
|
231
|
+
"forbid": {
|
|
232
|
+
"ast": {
|
|
233
|
+
"language": "typescript",
|
|
234
|
+
"languageOptions": {},
|
|
235
|
+
"rule": {
|
|
236
|
+
"kind": "switch_case",
|
|
237
|
+
"has": {
|
|
238
|
+
"matches": "nan",
|
|
239
|
+
"follows": {
|
|
240
|
+
"regex": "^case$"
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
"when": {
|
|
245
|
+
"option": {
|
|
246
|
+
"enforceForSwitchCase": null
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
"violation": {
|
|
252
|
+
"anchor": "witness.span",
|
|
253
|
+
"code": "use-isnan",
|
|
254
|
+
"message": "'case NaN' can never match. Use Number.isNaN before the switch.",
|
|
255
|
+
"suppress": {
|
|
256
|
+
"eslint": {
|
|
257
|
+
"rules": [
|
|
258
|
+
"use-isnan"
|
|
259
|
+
]
|
|
260
|
+
},
|
|
261
|
+
"oxlint": {
|
|
262
|
+
"rules": [
|
|
263
|
+
"use-isnan"
|
|
264
|
+
]
|
|
265
|
+
},
|
|
266
|
+
"biome": {
|
|
267
|
+
"rules": [
|
|
268
|
+
"lint/correctness/useIsNan"
|
|
269
|
+
]
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"id": "index-of-nan",
|
|
276
|
+
"forbid": {
|
|
277
|
+
"ast": {
|
|
278
|
+
"language": "typescript",
|
|
279
|
+
"languageOptions": {},
|
|
280
|
+
"rule": {
|
|
281
|
+
"kind": "call_expression",
|
|
282
|
+
"all": [
|
|
283
|
+
{
|
|
284
|
+
"has": {
|
|
285
|
+
"matches": "callee"
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
"has": {
|
|
290
|
+
"kind": "arguments",
|
|
291
|
+
"all": [
|
|
292
|
+
{
|
|
293
|
+
"has": {
|
|
294
|
+
"matches": "nan",
|
|
295
|
+
"follows": {
|
|
296
|
+
"regex": "^\\($"
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
"not": {
|
|
302
|
+
"count": {
|
|
303
|
+
"has": {
|
|
304
|
+
"not": {
|
|
305
|
+
"any": [
|
|
306
|
+
{
|
|
307
|
+
"regex": "^[(),]$"
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
"kind": "comment"
|
|
311
|
+
}
|
|
312
|
+
]
|
|
313
|
+
}
|
|
314
|
+
},
|
|
315
|
+
"min": 3
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
]
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
]
|
|
323
|
+
},
|
|
324
|
+
"utils": {
|
|
325
|
+
"callee": {
|
|
326
|
+
"any": [
|
|
327
|
+
{
|
|
328
|
+
"matches": "callee-plain"
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
"kind": "parenthesized_expression",
|
|
332
|
+
"has": {
|
|
333
|
+
"matches": "callee"
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
]
|
|
337
|
+
},
|
|
338
|
+
"callee-plain": {
|
|
339
|
+
"any": [
|
|
340
|
+
{
|
|
341
|
+
"kind": "member_expression",
|
|
342
|
+
"has": {
|
|
343
|
+
"kind": "property_identifier",
|
|
344
|
+
"regex": "^(indexOf|lastIndexOf)$",
|
|
345
|
+
"pattern": "$M"
|
|
346
|
+
}
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
"kind": "subscript_expression",
|
|
350
|
+
"has": {
|
|
351
|
+
"any": [
|
|
352
|
+
{
|
|
353
|
+
"kind": "string"
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
"matches": "r2"
|
|
357
|
+
}
|
|
358
|
+
],
|
|
359
|
+
"has": {
|
|
360
|
+
"kind": "string_fragment",
|
|
361
|
+
"regex": "^(indexOf|lastIndexOf)$",
|
|
362
|
+
"pattern": "$M"
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
]
|
|
367
|
+
}
|
|
368
|
+
},
|
|
369
|
+
"when": {
|
|
370
|
+
"option": {
|
|
371
|
+
"enforceForIndexOf": true
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
},
|
|
376
|
+
"violation": {
|
|
377
|
+
"anchor": "witness.span",
|
|
378
|
+
"code": "use-isnan",
|
|
379
|
+
"message": "Array prototype method '$M' cannot find NaN.",
|
|
380
|
+
"suppress": {
|
|
381
|
+
"eslint": {
|
|
382
|
+
"rules": [
|
|
383
|
+
"use-isnan"
|
|
384
|
+
]
|
|
385
|
+
},
|
|
386
|
+
"oxlint": {
|
|
387
|
+
"rules": [
|
|
388
|
+
"use-isnan"
|
|
389
|
+
]
|
|
390
|
+
},
|
|
391
|
+
"biome": {
|
|
392
|
+
"rules": [
|
|
393
|
+
"lint/correctness/useIsNan"
|
|
394
|
+
]
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
]
|
|
400
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"format":"rerail.policy/v1","id":"eslint-valid-typeof","revision":4,"mode":"steer","description":"Port of ESLint's `valid-typeof` rule (https://eslint.org/docs/latest/rules/valid-typeof). Flags a literal compared (==, !=, ===, !==) with a `typeof` expression that is not a valid typeof result, and the global `undefined` (resolved with `resolves`) in that position. Default options: requireStringLiterals false. Options are declared in the `options` define (the rule's defaults); a variant is a config patch.","scope":{"include":["**/*"],"exclude":[]},"clauses":[{"id":"options","define":{"options":{"requireStringLiterals":{"type":"boolean","nullable":true,"default":null}}}},{"id":"shared","define":{"language":"typescript","utils":{"in-comparison":{"any":[{"inside":{"kind":"binary_expression","all":[{"has":{"regex":"^(==|!=|===|!==)$"}},{"has":{"matches":"typeof-operand"}}]}},{"inside":{"kind":"parenthesized_expression","matches":"in-comparison"}}]},"typeof-operand":{"any":[{"matches":"r4"},{"kind":"parenthesized_expression","has":{"matches":"typeof-operand"}}]},"r1":{"any":[{"kind":"undefined"},{"kind":"identifier"}],"resolves":{"directives":"eslint","global":["undefined"]}},"r2":{"any":[{"any":[{"kind":"string"},{"kind":"number"},{"kind":"true"},{"kind":"false"},{"kind":"null"},{"kind":"regex"}]},{"kind":"template_string","not":{"has":{"kind":"template_substitution"}}}]},"r3":{"all":[{"matches":"r1"},{"matches":"in-comparison"}]},"r4":{"has":{"regex":"^typeof$"},"kind":"unary_expression"}}}},{"id":"invalid-value","forbid":{"ast":{"language":"typescript","rule":{"all":[{"matches":"r2"},{"not":{"value":{"regex":"^(?:symbol|undefined|object|boolean|number|string|function|bigint)$"}}},{"matches":"in-comparison"}]}}},"violation":{"anchor":"witness.span","code":"valid-typeof","message":"Invalid typeof comparison value.","suppress":{"eslint":{"rules":["valid-typeof"]},"oxlint":{"rules":["valid-typeof"]},"biome":{"rules":["lint/correctness/useValidTypeof"]}}}},{"id":"undefined","forbid":{"ast":{"language":"typescript","rule":{"matches":"r3"},"when":{"option":{"requireStringLiterals":null}}}},"violation":{"anchor":"witness.span","code":"valid-typeof","message":"Invalid typeof comparison value.","suppress":{"eslint":{"rules":["valid-typeof"]},"oxlint":{"rules":["valid-typeof"]},"biome":{"rules":["lint/correctness/useValidTypeof"]}}}},{"id":"not-string","forbid":{"ast":{"language":"typescript","rule":{"any":[{"matches":"r3"},{"all":[{"not":{"matches":"r2"}},{"not":{"regex":"^(==|!=|===|!==|[()])$"}},{"not":{"kind":"comment"}},{"not":{"kind":"parenthesized_expression"}},{"not":{"matches":"typeof-operand"}},{"not":{"matches":"r1"}},{"matches":"in-comparison"},{"not":{"inside":{"matches":"r4"}}}]}]},"when":{"option":{"requireStringLiterals":true}}}},"violation":{"anchor":"witness.span","code":"valid-typeof","message":"Typeof comparisons should be to string literals.","suppress":{"eslint":{"rules":["valid-typeof"]},"oxlint":{"rules":["valid-typeof"]},"biome":{"rules":["lint/correctness/useValidTypeof"]}}}}]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"format":"rerail.policy/v1","id":"eslint-yoda","revision":4,"mode":"steer","description":"Port of ESLint's `yoda` rule (https://eslint.org/docs/latest/rules/yoda) with options [\"never\",{\"default\":true}]. Requires the literal on the right of comparison operators. Literals: string, number/bigint, boolean, null, regex, substitution-free template, negated number; parentheses are transparent. Options are declared in the `options` define (the rule's defaults); a variant is a config patch.","scope":{"include":["**/*"],"exclude":[]},"clauses":[{"id":"options","define":{"options":{"option":{"type":"string","nullable":true,"default":null},"exceptRange":{"type":"boolean","nullable":true,"default":null},"onlyEquality":{"type":"boolean","nullable":true,"default":null}}}},{"id":"shared","define":{"language":"typescript","utils":{"literal":{"any":[{"kind":"string"},{"kind":"number"},{"kind":"true"},{"kind":"false"},{"kind":"null"},{"kind":"regex"},{"kind":"template_string","not":{"has":{"kind":"template_substitution"}}},{"kind":"unary_expression","has":{"regex":"^-$"},"all":[{"has":{"matches":"numeric"}}]},{"kind":"parenthesized_expression","has":{"matches":"literal"}}]},"literal-bounds":{"all":[{"any":[{"matches":"r16"},{"matches":"r17"}]},{"any":[{"not":{"matches":"r16"}},{"not":{"matches":"r17"}},{"compare":{"left":"A","op":"le","right":"B","text":"value"}}]}]},"numeric":{"any":[{"kind":"number"},{"kind":"parenthesized_expression","has":{"matches":"numeric"}}]},"range-test":{"kind":"binary_expression","follows":{"stopBy":"neighbor","regex":"^\\($"},"precedes":{"stopBy":"neighbor","regex":"^\\)$"},"any":[{"all":[{"has":{"stopBy":"neighbor","regex":"^&&$"}},{"has":{"stopBy":"neighbor","not":{"kind":"comment"},"precedes":{"stopBy":"end","regex":"^&&$"},"any":[{"kind":"binary_expression","all":[{"has":{"stopBy":"neighbor","regex":"^<=?$"}},{"matches":"r5"},{"matches":"r6"}]},{"kind":"parenthesized_expression","has":{"stopBy":{"not":{"kind":"parenthesized_expression"}},"not":{"kind":"comment"},"kind":"binary_expression","all":[{"has":{"stopBy":"neighbor","regex":"^<=?$"}},{"matches":"r5"},{"matches":"r6"}]}}]}},{"has":{"stopBy":"neighbor","not":{"kind":"comment"},"follows":{"stopBy":"end","regex":"^&&$"},"any":[{"kind":"binary_expression","all":[{"has":{"stopBy":"neighbor","regex":"^<=?$"}},{"matches":"r3"},{"matches":"r9"}]},{"kind":"parenthesized_expression","has":{"stopBy":{"not":{"kind":"parenthesized_expression"}},"not":{"kind":"comment"},"kind":"binary_expression","all":[{"has":{"stopBy":"neighbor","regex":"^<=?$"}},{"matches":"r3"},{"matches":"r9"}]}}]}},{"matches":"r14"},{"matches":"literal-bounds"}]},{"all":[{"has":{"stopBy":"neighbor","regex":"^\\|\\|$"}},{"has":{"stopBy":"neighbor","not":{"kind":"comment"},"precedes":{"stopBy":"end","regex":"^\\|\\|$"},"any":[{"kind":"binary_expression","all":[{"has":{"stopBy":"neighbor","regex":"^<=?$"}},{"matches":"r4"},{"matches":"r10"}]},{"kind":"parenthesized_expression","has":{"stopBy":{"not":{"kind":"parenthesized_expression"}},"not":{"kind":"comment"},"kind":"binary_expression","all":[{"has":{"stopBy":"neighbor","regex":"^<=?$"}},{"matches":"r4"},{"matches":"r10"}]}}]}},{"has":{"stopBy":"neighbor","not":{"kind":"comment"},"follows":{"stopBy":"end","regex":"^\\|\\|$"},"any":[{"kind":"binary_expression","all":[{"has":{"stopBy":"neighbor","regex":"^<=?$"}},{"matches":"r7"},{"matches":"r8"}]},{"kind":"parenthesized_expression","has":{"stopBy":{"not":{"kind":"parenthesized_expression"}},"not":{"kind":"comment"},"kind":"binary_expression","all":[{"has":{"stopBy":"neighbor","regex":"^<=?$"}},{"matches":"r7"},{"matches":"r8"}]}}]}},{"matches":"r14"},{"matches":"literal-bounds"}]}]},"r1":{"has":{"not":{"kind":"comment"},"pattern":"$L","precedes":{"regex":"^(===|!==|==|!=|<|>|<=|>=)$","stopBy":"end"}}},"r2":{"has":{"follows":{"regex":"^(===|!==|==|!=|<|>|<=|>=)$","stopBy":"end"},"not":{"kind":"comment"},"pattern":"$R"}},"r3":{"has":{"not":{"kind":"comment"},"pattern":"$X2","precedes":{"regex":"^<=?$","stopBy":"end"},"stopBy":"neighbor"}},"r4":{"has":{"not":{"kind":"comment"},"pattern":"$X1","precedes":{"regex":"^<=?$","stopBy":"end"},"stopBy":"neighbor"}},"r5":{"has":{"not":{"kind":"comment"},"pattern":"$A","precedes":{"regex":"^<=?$","stopBy":"end"},"stopBy":"neighbor"}},"r6":{"has":{"follows":{"regex":"^<=?$","stopBy":"end"},"not":{"kind":"comment"},"pattern":"$X1","stopBy":"neighbor"}},"r7":{"has":{"not":{"kind":"comment"},"pattern":"$B","precedes":{"regex":"^<=?$","stopBy":"end"},"stopBy":"neighbor"}},"r8":{"has":{"follows":{"regex":"^<=?$","stopBy":"end"},"not":{"kind":"comment"},"pattern":"$X2","stopBy":"neighbor"}},"r9":{"has":{"follows":{"regex":"^<=?$","stopBy":"end"},"not":{"kind":"comment"},"pattern":"$B","stopBy":"neighbor"}},"r10":{"has":{"follows":{"regex":"^<=?$","stopBy":"end"},"not":{"kind":"comment"},"pattern":"$A","stopBy":"neighbor"}},"r11":{"has":{"not":{"kind":"comment"},"pattern":"$L","precedes":{"regex":"^(===|==)$","stopBy":"end"}}},"r12":{"has":{"follows":{"regex":"^(===|==)$","stopBy":"end"},"not":{"kind":"comment"},"pattern":"$R"}},"r13":{"not":{"inside":{"matches":"range-test","stopBy":{"not":{"kind":"parenthesized_expression"}}}}},"r14":{"compare":{"left":"X1","op":"eq","right":"X2","text":"reference"}},"r15":{"has":{"pattern":"$$OP","regex":"^(===|!==|==|!=|<|>|<=|>=)$"}},"r16":{"has":{"matches":"literal","pattern":"$A","stopBy":"end"}},"r17":{"has":{"matches":"literal","pattern":"$B","stopBy":"end"}}}}},{"id":"yoda-never","forbid":{"ast":{"language":"typescript","rule":{"kind":"binary_expression","all":[{"$option":"onlyEquality","cases":{"true":[]},"default":[{"matches":"r15"}],"spread":true},{"$option":"onlyEquality","cases":{"true":[]},"default":[{"matches":"r1"}],"spread":true},{"$option":"onlyEquality","cases":{"true":[]},"default":[{"matches":"r2"}],"spread":true},{"$option":"exceptRange","cases":{"true":[{"matches":"r13"}]},"default":[],"spread":true},{"$option":"onlyEquality","cases":{"true":[{"has":{"regex":"^(===|==)$","pattern":"$$OP"}}]},"default":[],"spread":true},{"$option":"onlyEquality","cases":{"true":[{"matches":"r11"}]},"default":[],"spread":true},{"$option":"onlyEquality","cases":{"true":[{"matches":"r12"}]},"default":[],"spread":true}]},"constraints":{"L":{"matches":"literal"},"R":{"not":{"matches":"literal"}}},"when":{"option":{"option":{"in":[null,"never"]}}}}},"violation":{"anchor":"witness.span","code":"yoda","message":"Expected literal to be on the right side of $OP.","suppress":{"eslint":{"rules":["yoda"]},"oxlint":{"rules":["yoda"]},"biome":{"rules":["lint/style/noYodaExpression"]}}}},{"id":"yoda-always","forbid":{"ast":{"language":"typescript","rule":{"kind":"binary_expression","all":[{"$option":"onlyEquality","cases":{"true":[]},"default":[{"matches":"r15"}],"spread":true},{"$option":"onlyEquality","cases":{"true":[]},"default":[{"matches":"r1"}],"spread":true},{"$option":"onlyEquality","cases":{"true":[]},"default":[{"matches":"r2"}],"spread":true},{"$option":"exceptRange","cases":{"true":[{"matches":"r13"}]},"default":[],"spread":true},{"$option":"onlyEquality","cases":{"true":[{"has":{"regex":"^(===|==)$","pattern":"$$OP"}}]},"default":[],"spread":true},{"$option":"onlyEquality","cases":{"true":[{"matches":"r11"}]},"default":[],"spread":true},{"$option":"onlyEquality","cases":{"true":[{"matches":"r12"}]},"default":[],"spread":true}]},"constraints":{"R":{"matches":"literal"},"L":{"not":{"matches":"literal"}}},"when":{"option":{"option":"always"}}}},"violation":{"anchor":"witness.span","code":"yoda","message":"Expected literal to be on the left side of $OP.","suppress":{"eslint":{"rules":["yoda"]},"oxlint":{"rules":["yoda"]},"biome":{"rules":["lint/style/noYodaExpression"]}}}}]}
|