@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,608 @@
|
|
|
1
|
+
{
|
|
2
|
+
"format": "rerail.policy/v1",
|
|
3
|
+
"id": "eslint-eqeqeq",
|
|
4
|
+
"revision": 4,
|
|
5
|
+
"mode": "steer",
|
|
6
|
+
"description": "ESLint 10.11.0 eqeqeq, default options. Port of ESLint's `eqeqeq` rule (https://eslint.org/docs/latest/rules/eqeqeq). Default options (`always`, null `always`): requires === and !==; autofixes only when an operand is typeof or both operands are literals of one type. 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
|
+
"option": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"nullable": true,
|
|
28
|
+
"default": null
|
|
29
|
+
},
|
|
30
|
+
"null": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"nullable": true,
|
|
33
|
+
"default": null
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"id": "shared",
|
|
40
|
+
"define": {
|
|
41
|
+
"language": "typescript",
|
|
42
|
+
"utils": {
|
|
43
|
+
"bigint-lit": {
|
|
44
|
+
"any": [
|
|
45
|
+
{
|
|
46
|
+
"kind": "number",
|
|
47
|
+
"regex": "n$"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"kind": "parenthesized_expression",
|
|
51
|
+
"has": {
|
|
52
|
+
"matches": "bigint-lit",
|
|
53
|
+
"stopBy": "neighbor"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
"boolean-lit": {
|
|
59
|
+
"any": [
|
|
60
|
+
{
|
|
61
|
+
"any": [
|
|
62
|
+
{
|
|
63
|
+
"kind": "true"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"kind": "false"
|
|
67
|
+
}
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"kind": "parenthesized_expression",
|
|
72
|
+
"has": {
|
|
73
|
+
"matches": "boolean-lit",
|
|
74
|
+
"stopBy": "neighbor"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
]
|
|
78
|
+
},
|
|
79
|
+
"fixable": {
|
|
80
|
+
"any": [
|
|
81
|
+
{
|
|
82
|
+
"has": {
|
|
83
|
+
"matches": "typeof-op",
|
|
84
|
+
"stopBy": "neighbor"
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"count": {
|
|
89
|
+
"has": {
|
|
90
|
+
"matches": "string-lit",
|
|
91
|
+
"stopBy": "neighbor"
|
|
92
|
+
},
|
|
93
|
+
"min": 2
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"count": {
|
|
98
|
+
"has": {
|
|
99
|
+
"matches": "number-lit",
|
|
100
|
+
"stopBy": "neighbor"
|
|
101
|
+
},
|
|
102
|
+
"min": 2
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"count": {
|
|
107
|
+
"has": {
|
|
108
|
+
"matches": "bigint-lit",
|
|
109
|
+
"stopBy": "neighbor"
|
|
110
|
+
},
|
|
111
|
+
"min": 2
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"count": {
|
|
116
|
+
"has": {
|
|
117
|
+
"matches": "boolean-lit",
|
|
118
|
+
"stopBy": "neighbor"
|
|
119
|
+
},
|
|
120
|
+
"min": 2
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"count": {
|
|
125
|
+
"has": {
|
|
126
|
+
"matches": "object-lit",
|
|
127
|
+
"stopBy": "neighbor"
|
|
128
|
+
},
|
|
129
|
+
"min": 2
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
]
|
|
133
|
+
},
|
|
134
|
+
"null-check": {
|
|
135
|
+
"has": {
|
|
136
|
+
"matches": "null-lit",
|
|
137
|
+
"stopBy": "neighbor"
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"null-lit": {
|
|
141
|
+
"any": [
|
|
142
|
+
{
|
|
143
|
+
"kind": "null"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"kind": "parenthesized_expression",
|
|
147
|
+
"has": {
|
|
148
|
+
"matches": "null-lit",
|
|
149
|
+
"stopBy": "neighbor"
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
]
|
|
153
|
+
},
|
|
154
|
+
"number-lit": {
|
|
155
|
+
"any": [
|
|
156
|
+
{
|
|
157
|
+
"kind": "number",
|
|
158
|
+
"not": {
|
|
159
|
+
"regex": "n$"
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"kind": "parenthesized_expression",
|
|
164
|
+
"has": {
|
|
165
|
+
"matches": "number-lit",
|
|
166
|
+
"stopBy": "neighbor"
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
]
|
|
170
|
+
},
|
|
171
|
+
"object-lit": {
|
|
172
|
+
"any": [
|
|
173
|
+
{
|
|
174
|
+
"any": [
|
|
175
|
+
{
|
|
176
|
+
"kind": "null"
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"kind": "regex"
|
|
180
|
+
}
|
|
181
|
+
]
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"kind": "parenthesized_expression",
|
|
185
|
+
"has": {
|
|
186
|
+
"matches": "object-lit",
|
|
187
|
+
"stopBy": "neighbor"
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
]
|
|
191
|
+
},
|
|
192
|
+
"string-lit": {
|
|
193
|
+
"any": [
|
|
194
|
+
{
|
|
195
|
+
"any": [
|
|
196
|
+
{
|
|
197
|
+
"kind": "string"
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"kind": "template_string",
|
|
201
|
+
"not": {
|
|
202
|
+
"has": {
|
|
203
|
+
"kind": "template_substitution",
|
|
204
|
+
"stopBy": "neighbor"
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
]
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"kind": "parenthesized_expression",
|
|
212
|
+
"has": {
|
|
213
|
+
"matches": "string-lit",
|
|
214
|
+
"stopBy": "neighbor"
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
]
|
|
218
|
+
},
|
|
219
|
+
"typeof-op": {
|
|
220
|
+
"any": [
|
|
221
|
+
{
|
|
222
|
+
"kind": "unary_expression",
|
|
223
|
+
"has": {
|
|
224
|
+
"regex": "^typeof$",
|
|
225
|
+
"stopBy": "neighbor"
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
"kind": "parenthesized_expression",
|
|
230
|
+
"has": {
|
|
231
|
+
"matches": "typeof-op",
|
|
232
|
+
"stopBy": "neighbor"
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
]
|
|
236
|
+
},
|
|
237
|
+
"r1": {
|
|
238
|
+
"all": [
|
|
239
|
+
{
|
|
240
|
+
"matches": "null-check"
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"not": {
|
|
244
|
+
"matches": "fixable"
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
],
|
|
248
|
+
"kind": "binary_expression"
|
|
249
|
+
},
|
|
250
|
+
"r2": {
|
|
251
|
+
"all": [
|
|
252
|
+
{
|
|
253
|
+
"matches": "null-check"
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"matches": "fixable"
|
|
257
|
+
}
|
|
258
|
+
],
|
|
259
|
+
"kind": "binary_expression"
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"id": "fix-loose",
|
|
266
|
+
"forbid": {
|
|
267
|
+
"ast": {
|
|
268
|
+
"language": "typescript",
|
|
269
|
+
"rule": {
|
|
270
|
+
"regex": "^(?:==|!=)$",
|
|
271
|
+
"pattern": "$$OP",
|
|
272
|
+
"inside": {
|
|
273
|
+
"kind": "binary_expression",
|
|
274
|
+
"stopBy": "neighbor",
|
|
275
|
+
"all": [
|
|
276
|
+
{
|
|
277
|
+
"$option": "null",
|
|
278
|
+
"cases": {
|
|
279
|
+
"ignore": [
|
|
280
|
+
{
|
|
281
|
+
"not": {
|
|
282
|
+
"matches": "null-check"
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
],
|
|
286
|
+
"never": [
|
|
287
|
+
{
|
|
288
|
+
"not": {
|
|
289
|
+
"matches": "null-check"
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
]
|
|
293
|
+
},
|
|
294
|
+
"default": {
|
|
295
|
+
"$option": "option",
|
|
296
|
+
"cases": {
|
|
297
|
+
"allow-null": [
|
|
298
|
+
{
|
|
299
|
+
"not": {
|
|
300
|
+
"matches": "null-check"
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
]
|
|
304
|
+
},
|
|
305
|
+
"default": []
|
|
306
|
+
},
|
|
307
|
+
"spread": true
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
"matches": "fixable"
|
|
311
|
+
}
|
|
312
|
+
]
|
|
313
|
+
}
|
|
314
|
+
},
|
|
315
|
+
"when": {
|
|
316
|
+
"option": {
|
|
317
|
+
"option": {
|
|
318
|
+
"in": [
|
|
319
|
+
null,
|
|
320
|
+
"always",
|
|
321
|
+
"allow-null"
|
|
322
|
+
]
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
},
|
|
328
|
+
"violation": {
|
|
329
|
+
"anchor": "witness.span",
|
|
330
|
+
"code": "eqeqeq",
|
|
331
|
+
"message": "Expected '$OP=' and instead saw '$OP'.",
|
|
332
|
+
"fix": "$OP=",
|
|
333
|
+
"suppress": {
|
|
334
|
+
"eslint": {
|
|
335
|
+
"rules": [
|
|
336
|
+
"eqeqeq"
|
|
337
|
+
]
|
|
338
|
+
},
|
|
339
|
+
"oxlint": {
|
|
340
|
+
"rules": [
|
|
341
|
+
"eqeqeq"
|
|
342
|
+
]
|
|
343
|
+
},
|
|
344
|
+
"biome": {
|
|
345
|
+
"rules": [
|
|
346
|
+
"lint/suspicious/noDoubleEquals"
|
|
347
|
+
]
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
"id": "loose",
|
|
354
|
+
"forbid": {
|
|
355
|
+
"ast": {
|
|
356
|
+
"language": "typescript",
|
|
357
|
+
"rule": {
|
|
358
|
+
"regex": "^(?:==|!=)$",
|
|
359
|
+
"pattern": "$$OP",
|
|
360
|
+
"inside": {
|
|
361
|
+
"kind": "binary_expression",
|
|
362
|
+
"stopBy": "neighbor",
|
|
363
|
+
"all": [
|
|
364
|
+
{
|
|
365
|
+
"$option": "null",
|
|
366
|
+
"cases": {
|
|
367
|
+
"ignore": [
|
|
368
|
+
{
|
|
369
|
+
"not": {
|
|
370
|
+
"matches": "null-check"
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
],
|
|
374
|
+
"never": [
|
|
375
|
+
{
|
|
376
|
+
"not": {
|
|
377
|
+
"matches": "null-check"
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
]
|
|
381
|
+
},
|
|
382
|
+
"default": {
|
|
383
|
+
"$option": "option",
|
|
384
|
+
"cases": {
|
|
385
|
+
"allow-null": [
|
|
386
|
+
{
|
|
387
|
+
"not": {
|
|
388
|
+
"matches": "null-check"
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
],
|
|
392
|
+
"smart": [
|
|
393
|
+
{
|
|
394
|
+
"not": {
|
|
395
|
+
"matches": "null-check"
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
]
|
|
399
|
+
},
|
|
400
|
+
"default": []
|
|
401
|
+
},
|
|
402
|
+
"spread": true
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
"not": {
|
|
406
|
+
"matches": "fixable"
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
]
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
},
|
|
414
|
+
"violation": {
|
|
415
|
+
"anchor": "witness.span",
|
|
416
|
+
"code": "eqeqeq",
|
|
417
|
+
"message": "Expected '$OP=' and instead saw '$OP'.",
|
|
418
|
+
"suppress": {
|
|
419
|
+
"eslint": {
|
|
420
|
+
"rules": [
|
|
421
|
+
"eqeqeq"
|
|
422
|
+
]
|
|
423
|
+
},
|
|
424
|
+
"oxlint": {
|
|
425
|
+
"rules": [
|
|
426
|
+
"eqeqeq"
|
|
427
|
+
]
|
|
428
|
+
},
|
|
429
|
+
"biome": {
|
|
430
|
+
"rules": [
|
|
431
|
+
"lint/suspicious/noDoubleEquals"
|
|
432
|
+
]
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
"id": "fix-seq",
|
|
439
|
+
"forbid": {
|
|
440
|
+
"ast": {
|
|
441
|
+
"language": "typescript",
|
|
442
|
+
"rule": {
|
|
443
|
+
"regex": "^===$",
|
|
444
|
+
"inside": {
|
|
445
|
+
"stopBy": "neighbor",
|
|
446
|
+
"matches": "r2"
|
|
447
|
+
}
|
|
448
|
+
},
|
|
449
|
+
"when": {
|
|
450
|
+
"option": {
|
|
451
|
+
"null": "never"
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
},
|
|
456
|
+
"violation": {
|
|
457
|
+
"anchor": "witness.span",
|
|
458
|
+
"code": "eqeqeq",
|
|
459
|
+
"message": "Expected '==' and instead saw '==='.",
|
|
460
|
+
"fix": "==",
|
|
461
|
+
"suppress": {
|
|
462
|
+
"eslint": {
|
|
463
|
+
"rules": [
|
|
464
|
+
"eqeqeq"
|
|
465
|
+
]
|
|
466
|
+
},
|
|
467
|
+
"oxlint": {
|
|
468
|
+
"rules": [
|
|
469
|
+
"eqeqeq"
|
|
470
|
+
]
|
|
471
|
+
},
|
|
472
|
+
"biome": {
|
|
473
|
+
"rules": [
|
|
474
|
+
"lint/suspicious/noDoubleEquals"
|
|
475
|
+
]
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
},
|
|
480
|
+
{
|
|
481
|
+
"id": "seq",
|
|
482
|
+
"forbid": {
|
|
483
|
+
"ast": {
|
|
484
|
+
"language": "typescript",
|
|
485
|
+
"rule": {
|
|
486
|
+
"regex": "^===$",
|
|
487
|
+
"inside": {
|
|
488
|
+
"stopBy": "neighbor",
|
|
489
|
+
"matches": "r1"
|
|
490
|
+
}
|
|
491
|
+
},
|
|
492
|
+
"when": {
|
|
493
|
+
"option": {
|
|
494
|
+
"null": "never"
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
},
|
|
499
|
+
"violation": {
|
|
500
|
+
"anchor": "witness.span",
|
|
501
|
+
"code": "eqeqeq",
|
|
502
|
+
"message": "Expected '==' and instead saw '==='.",
|
|
503
|
+
"suppress": {
|
|
504
|
+
"eslint": {
|
|
505
|
+
"rules": [
|
|
506
|
+
"eqeqeq"
|
|
507
|
+
]
|
|
508
|
+
},
|
|
509
|
+
"oxlint": {
|
|
510
|
+
"rules": [
|
|
511
|
+
"eqeqeq"
|
|
512
|
+
]
|
|
513
|
+
},
|
|
514
|
+
"biome": {
|
|
515
|
+
"rules": [
|
|
516
|
+
"lint/suspicious/noDoubleEquals"
|
|
517
|
+
]
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
},
|
|
522
|
+
{
|
|
523
|
+
"id": "fix-sne",
|
|
524
|
+
"forbid": {
|
|
525
|
+
"ast": {
|
|
526
|
+
"language": "typescript",
|
|
527
|
+
"rule": {
|
|
528
|
+
"regex": "^!==$",
|
|
529
|
+
"inside": {
|
|
530
|
+
"stopBy": "neighbor",
|
|
531
|
+
"matches": "r2"
|
|
532
|
+
}
|
|
533
|
+
},
|
|
534
|
+
"when": {
|
|
535
|
+
"option": {
|
|
536
|
+
"null": "never"
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
},
|
|
541
|
+
"violation": {
|
|
542
|
+
"anchor": "witness.span",
|
|
543
|
+
"code": "eqeqeq",
|
|
544
|
+
"message": "Expected '!=' and instead saw '!=='.",
|
|
545
|
+
"fix": "!=",
|
|
546
|
+
"suppress": {
|
|
547
|
+
"eslint": {
|
|
548
|
+
"rules": [
|
|
549
|
+
"eqeqeq"
|
|
550
|
+
]
|
|
551
|
+
},
|
|
552
|
+
"oxlint": {
|
|
553
|
+
"rules": [
|
|
554
|
+
"eqeqeq"
|
|
555
|
+
]
|
|
556
|
+
},
|
|
557
|
+
"biome": {
|
|
558
|
+
"rules": [
|
|
559
|
+
"lint/suspicious/noDoubleEquals"
|
|
560
|
+
]
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
},
|
|
565
|
+
{
|
|
566
|
+
"id": "sne",
|
|
567
|
+
"forbid": {
|
|
568
|
+
"ast": {
|
|
569
|
+
"language": "typescript",
|
|
570
|
+
"rule": {
|
|
571
|
+
"regex": "^!==$",
|
|
572
|
+
"inside": {
|
|
573
|
+
"stopBy": "neighbor",
|
|
574
|
+
"matches": "r1"
|
|
575
|
+
}
|
|
576
|
+
},
|
|
577
|
+
"when": {
|
|
578
|
+
"option": {
|
|
579
|
+
"null": "never"
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
},
|
|
584
|
+
"violation": {
|
|
585
|
+
"anchor": "witness.span",
|
|
586
|
+
"code": "eqeqeq",
|
|
587
|
+
"message": "Expected '!=' and instead saw '!=='.",
|
|
588
|
+
"suppress": {
|
|
589
|
+
"eslint": {
|
|
590
|
+
"rules": [
|
|
591
|
+
"eqeqeq"
|
|
592
|
+
]
|
|
593
|
+
},
|
|
594
|
+
"oxlint": {
|
|
595
|
+
"rules": [
|
|
596
|
+
"eqeqeq"
|
|
597
|
+
]
|
|
598
|
+
},
|
|
599
|
+
"biome": {
|
|
600
|
+
"rules": [
|
|
601
|
+
"lint/suspicious/noDoubleEquals"
|
|
602
|
+
]
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
]
|
|
608
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"format":"rerail.policy/v1","id":"eslint-func-style","revision":3,"mode":"steer","description":"Port of ESLint's `func-style` rule (https://eslint.org/docs/latest/rules/func-style). Reports function declarations that are not default exports or TypeScript overload implementations. 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},"overrides.namedExports":{"type":"string","nullable":true,"default":null},"allowArrowFunctions":{"type":"boolean","nullable":true,"default":null},"allowTypeAnnotation":{"type":"boolean","nullable":true,"default":null}}}},{"id":"function-declaration","forbid":{"ast":{"language":"typescript","utils":{"fn-decl":{"any":[{"kind":"function_declaration"},{"kind":"generator_function_declaration"}]},"export-default":{"inside":{"kind":"export_statement","has":{"regex":"^default$","stopBy":"neighbor"},"stopBy":"neighbor"}},"signature-n":{"kind":"function_signature","has":{"kind":"identifier","pattern":"$N","stopBy":"neighbor"}},"overloaded":{"any":[{"precedes":{"stopBy":"end","matches":"signature-n"}},{"follows":{"stopBy":"end","matches":"signature-n"}},{"inside":{"kind":"export_statement","any":[{"precedes":{"stopBy":"end","kind":"export_statement","has":{"matches":"signature-n","stopBy":"neighbor"}}},{"follows":{"stopBy":"end","kind":"export_statement","has":{"matches":"signature-n","stopBy":"neighbor"}}}],"stopBy":"neighbor"}},{"inside":{"kind":"switch_case","inside":{"kind":"switch_body","has":{"kind":"switch_case","has":{"matches":"signature-n","stopBy":"neighbor"},"stopBy":"neighbor"},"stopBy":"neighbor"},"stopBy":"neighbor"}}]},"exported":{"inside":{"kind":"export_statement","stopBy":"neighbor"}}},"rule":{"matches":"fn-decl","all":[{"any":[{"$option":"overrides.namedExports","cases":{"expression":{"$option":"option","cases":{"expression":[]},"default":[{"$option":"option","cases":{"declaration":{"matches":"exported"}},"default":{"all":[{"not":{"matches":"export-default"}},{"$option":"overrides.namedExports","cases":{"declaration":[{"not":{"matches":"exported"}}],"ignore":[{"not":{"matches":"exported"}}]},"default":[],"spread":true}]}}]}},"default":[{"$option":"option","cases":{"declaration":{"matches":"exported"}},"default":{"all":[{"not":{"matches":"export-default"}},{"$option":"overrides.namedExports","cases":{"declaration":[{"not":{"matches":"exported"}}],"ignore":[{"not":{"matches":"exported"}}]},"default":[],"spread":true}]}}],"spread":true},{"$option":"overrides.namedExports","cases":{"expression":{"$option":"option","cases":{"expression":[{"all":[{"not":{"matches":"export-default"}},{"not":{"matches":"exported"}}]}]},"default":[]}},"default":[],"spread":true},{"$option":"overrides.namedExports","cases":{"expression":{"$option":"option","cases":{"expression":[{"matches":"exported"}]},"default":[]}},"default":[],"spread":true}]},{"has":{"kind":"identifier","pattern":"$N","stopBy":"neighbor"}},{"not":{"matches":"overloaded"}}]},"when":{"option":{"$option":"option","cases":{"declaration":{"$option":"overrides.namedExports","cases":{"expression":{"option":{"not":{"in":[]}}}},"default":{"option":{"in":[]}}}},"default":{"option":{"not":{"in":[]}}}}}}},"violation":{"anchor":"witness.span","code":"func-style","message":"Expected a function expression.","suppress":{"eslint":{"rules":["func-style"]},"oxlint":{"rules":["func-style"]}}}},{"id":"function-expression-declarator","forbid":{"ast":{"language":"typescript","utils":{"checked-fn":{"any":[{"kind":"parenthesized_expression","has":{"matches":"checked-fn","stopBy":"neighbor"}},{"kind":"function_expression"},{"kind":"generator_function"}]},"checked-arrow":{"any":[{"kind":"parenthesized_expression","has":{"matches":"checked-arrow","stopBy":"neighbor"}},{"kind":"arrow_function","not":{"has":{"stopBy":{"any":[{"kind":"function_declaration"},{"kind":"generator_function_declaration"},{"kind":"function_expression"},{"kind":"generator_function"},{"kind":"arrow_function"},{"kind":"method_definition"}]},"any":[{"kind":"this"},{"kind":"super"}]}}}]},"declarator-exported":{"inside":{"any":[{"kind":"lexical_declaration"},{"kind":"variable_declaration"}],"inside":{"kind":"export_statement","stopBy":"neighbor"},"stopBy":"neighbor"}}},"rule":{"kind":"variable_declarator","all":[{"$option":"allowArrowFunctions","cases":{"true":{"$option":"overrides.namedExports","cases":{"expression":[],"ignore":[]},"default":[{"any":[{"$option":"overrides.namedExports","cases":{"declaration":{"$option":"option","cases":{"declaration":[]},"default":[{"$option":"overrides.namedExports","cases":{"expression":{"not":{"matches":"declarator-exported"}},"declaration":{"matches":"declarator-exported"},"ignore":{"not":{"matches":"declarator-exported"}}},"default":{"kind":"variable_declarator"}}]}},"default":[{"$option":"overrides.namedExports","cases":{"expression":{"not":{"matches":"declarator-exported"}},"declaration":{"matches":"declarator-exported"},"ignore":{"not":{"matches":"declarator-exported"}}},"default":{"kind":"variable_declarator"}}],"spread":true},{"$option":"overrides.namedExports","cases":{"declaration":{"$option":"option","cases":{"declaration":[{"not":{"matches":"declarator-exported"}}]},"default":[]}},"default":[],"spread":true},{"$option":"overrides.namedExports","cases":{"declaration":{"$option":"option","cases":{"declaration":[{"matches":"declarator-exported"}]},"default":[]}},"default":[],"spread":true}]}]}},"default":[{"any":[{"$option":"overrides.namedExports","cases":{"declaration":{"$option":"option","cases":{"declaration":[]},"default":[{"$option":"overrides.namedExports","cases":{"expression":{"not":{"matches":"declarator-exported"}},"declaration":{"matches":"declarator-exported"},"ignore":{"not":{"matches":"declarator-exported"}}},"default":{"kind":"variable_declarator"}}]}},"default":[{"$option":"overrides.namedExports","cases":{"expression":{"not":{"matches":"declarator-exported"}},"declaration":{"matches":"declarator-exported"},"ignore":{"not":{"matches":"declarator-exported"}}},"default":{"kind":"variable_declarator"}}],"spread":true},{"$option":"overrides.namedExports","cases":{"declaration":{"$option":"option","cases":{"declaration":[{"not":{"matches":"declarator-exported"}}]},"default":[]}},"default":[],"spread":true},{"$option":"overrides.namedExports","cases":{"declaration":{"$option":"option","cases":{"declaration":[{"matches":"declarator-exported"}]},"default":[]}},"default":[],"spread":true}]}],"spread":true},{"$option":"allowArrowFunctions","cases":{"true":{"$option":"overrides.namedExports","cases":{"expression":[],"ignore":[]},"default":[{"has":{"any":[{"matches":"checked-fn"},{"$option":"allowArrowFunctions","cases":{"true":[]},"default":[{"matches":"checked-arrow"}],"spread":true}],"stopBy":"neighbor"}}]}},"default":[{"has":{"any":[{"matches":"checked-fn"},{"$option":"allowArrowFunctions","cases":{"true":[]},"default":[{"matches":"checked-arrow"}],"spread":true}],"stopBy":"neighbor"}}],"spread":true},{"$option":"allowTypeAnnotation","cases":{"true":[{"not":{"has":{"kind":"type_annotation","stopBy":"neighbor"}}}]},"default":[],"spread":true},{"$option":"allowArrowFunctions","cases":{"true":{"$option":"overrides.namedExports","cases":{"expression":[{"any":[{"not":{"matches":"declarator-exported"}}]}],"ignore":[{"any":[{"not":{"matches":"declarator-exported"}}]}]},"default":[]}},"default":[],"spread":true},{"$option":"allowArrowFunctions","cases":{"true":{"$option":"overrides.namedExports","cases":{"expression":[{"has":{"any":[{"matches":"checked-fn"}],"stopBy":"neighbor"}}],"ignore":[{"has":{"any":[{"matches":"checked-fn"}],"stopBy":"neighbor"}}]},"default":[]}},"default":[],"spread":true}]},"when":{"option":{"$option":"overrides.namedExports","cases":{"declaration":{"option":{"not":{"in":[]}}}},"default":{"$option":"option","cases":{"declaration":{"option":{"not":{"in":[]}}}},"default":{"option":{"in":[]}}}}}}},"violation":{"anchor":"witness.span","code":"func-style","message":"Expected a function declaration.","suppress":{"eslint":{"rules":["func-style"]},"oxlint":{"rules":["func-style"]}}}}]}
|