@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.
Files changed (74) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +7 -0
  3. package/README.md +37 -0
  4. package/licenses/eslint/LICENSE +19 -0
  5. package/licenses/eslint/UPSTREAM.md +10363 -0
  6. package/licenses/eslint-plugin-unicorn/LICENSE +9 -0
  7. package/licenses/eslint-plugin-unicorn/UPSTREAM.md +297 -0
  8. package/pack.json +499 -0
  9. package/package.json +30 -0
  10. package/rules/eslint-arrow-body-style.json +1 -0
  11. package/rules/eslint-capitalized-comments.json +1 -0
  12. package/rules/eslint-default-case-last.json +52 -0
  13. package/rules/eslint-default-case.json +1 -0
  14. package/rules/eslint-eqeqeq.json +608 -0
  15. package/rules/eslint-func-style.json +1 -0
  16. package/rules/eslint-guard-for-in.json +144 -0
  17. package/rules/eslint-no-bitwise.json +1 -0
  18. package/rules/eslint-no-caller.json +63 -0
  19. package/rules/eslint-no-case-declarations.json +101 -0
  20. package/rules/eslint-no-compare-neg-zero.json +109 -0
  21. package/rules/eslint-no-cond-assign.json +1 -0
  22. package/rules/eslint-no-console.json +1 -0
  23. package/rules/eslint-no-continue.json +48 -0
  24. package/rules/eslint-no-debugger.json +55 -0
  25. package/rules/eslint-no-delete-var.json +63 -0
  26. package/rules/eslint-no-div-regex.json +1 -0
  27. package/rules/eslint-no-dupe-keys.json +295 -0
  28. package/rules/eslint-no-duplicate-case.json +160 -0
  29. package/rules/eslint-no-empty-pattern.json +1 -0
  30. package/rules/eslint-no-empty-static-block.json +64 -0
  31. package/rules/eslint-no-empty.json +187 -0
  32. package/rules/eslint-no-eq-null.json +65 -0
  33. package/rules/eslint-no-extend-native.json +1 -0
  34. package/rules/eslint-no-inline-comments.json +1 -0
  35. package/rules/eslint-no-iterator.json +1 -0
  36. package/rules/eslint-no-loss-of-precision.json +1 -0
  37. package/rules/eslint-no-multi-str.json +61 -0
  38. package/rules/eslint-no-negated-condition.json +114 -0
  39. package/rules/eslint-no-nested-ternary.json +76 -0
  40. package/rules/eslint-no-new-wrappers.json +89 -0
  41. package/rules/eslint-no-new.json +56 -0
  42. package/rules/eslint-no-nonoctal-decimal-escape.json +54 -0
  43. package/rules/eslint-no-octal-escape.json +1 -0
  44. package/rules/eslint-no-octal.json +15 -0
  45. package/rules/eslint-no-plusplus.json +1 -0
  46. package/rules/eslint-no-proto.json +1 -0
  47. package/rules/eslint-no-prototype-builtins.json +143 -0
  48. package/rules/eslint-no-return-assign.json +1 -0
  49. package/rules/eslint-no-script-url.json +81 -0
  50. package/rules/eslint-no-self-compare.json +121 -0
  51. package/rules/eslint-no-setter-return.json +1 -0
  52. package/rules/eslint-no-sparse-arrays.json +59 -0
  53. package/rules/eslint-no-template-curly-in-string.json +58 -0
  54. package/rules/eslint-no-ternary.json +48 -0
  55. package/rules/eslint-no-unneeded-ternary.json +1 -0
  56. package/rules/eslint-no-unsafe-finally.json +570 -0
  57. package/rules/eslint-no-unsafe-negation.json +1 -0
  58. package/rules/eslint-no-useless-call.json +1 -0
  59. package/rules/eslint-no-useless-catch.json +239 -0
  60. package/rules/eslint-no-useless-concat.json +1 -0
  61. package/rules/eslint-no-void.json +1 -0
  62. package/rules/eslint-no-warning-comments.json +1 -0
  63. package/rules/eslint-no-with.json +51 -0
  64. package/rules/eslint-operator-assignment.json +1 -0
  65. package/rules/eslint-prefer-numeric-literals.json +1 -0
  66. package/rules/eslint-prefer-spread.json +1 -0
  67. package/rules/eslint-prefer-template.json +187 -0
  68. package/rules/eslint-radix.json +533 -0
  69. package/rules/eslint-sort-imports.json +1 -0
  70. package/rules/eslint-sort-keys.json +1 -0
  71. package/rules/eslint-sort-vars.json +1 -0
  72. package/rules/eslint-use-isnan.json +400 -0
  73. package/rules/eslint-valid-typeof.json +1 -0
  74. package/rules/eslint-yoda.json +1 -0
package/pack.json ADDED
@@ -0,0 +1,499 @@
1
+ {
2
+ "format": "rerail.rule-pack/v1",
3
+ "id": "javascript",
4
+ "name": "JavaScript",
5
+ "category": "language",
6
+ "covers": "65 ESLint core rules ported to Rerail, 22 of them on and 43 off until turned on, each scored against ESLint's own recorded findings on its test cases.",
7
+ "reason": "matches JavaScript",
8
+ "match": {
9
+ "any": [
10
+ {
11
+ "files": [
12
+ "**/*.js",
13
+ "**/*.jsx",
14
+ "**/*.mjs",
15
+ "**/*.cjs"
16
+ ],
17
+ "exclude": [
18
+ "**/test/**",
19
+ "**/tests/**",
20
+ "**/__tests__/**",
21
+ "**/__mocks__/**",
22
+ "**/spec/**",
23
+ "**/e2e/**",
24
+ "**/*.test.*",
25
+ "**/*.spec.*",
26
+ "**/scripts/**",
27
+ "**/*.config.*",
28
+ "**/.*rc.*",
29
+ "**/gulpfile.*",
30
+ "**/Gulpfile.*",
31
+ "**/Gruntfile.*",
32
+ "**/*.min.js"
33
+ ],
34
+ "label": "JavaScript source files"
35
+ },
36
+ {
37
+ "files": [
38
+ "**/*.ts",
39
+ "**/*.tsx",
40
+ "**/*.mts",
41
+ "**/*.cts"
42
+ ],
43
+ "exclude": [
44
+ "**/*.d.ts",
45
+ "**/test/**",
46
+ "**/tests/**",
47
+ "**/__tests__/**",
48
+ "**/__mocks__/**",
49
+ "**/spec/**",
50
+ "**/e2e/**",
51
+ "**/*.test.*",
52
+ "**/*.spec.*",
53
+ "**/scripts/**",
54
+ "**/*.config.*",
55
+ "**/.*rc.*",
56
+ "**/gulpfile.*",
57
+ "**/Gulpfile.*",
58
+ "**/Gruntfile.*"
59
+ ],
60
+ "label": "TypeScript source files"
61
+ }
62
+ ]
63
+ },
64
+ "rules": [
65
+ {
66
+ "id": "eslint-arrow-body-style",
67
+ "document": "rules/eslint-arrow-body-style.json",
68
+ "title": "ESLint arrow-body-style: Require braces around arrow function bodies",
69
+ "group": "ESLint",
70
+ "on": false
71
+ },
72
+ {
73
+ "id": "eslint-capitalized-comments",
74
+ "document": "rules/eslint-capitalized-comments.json",
75
+ "title": "ESLint capitalized-comments: Enforce or disallow capitalization of the first letter of a comment",
76
+ "group": "ESLint",
77
+ "on": false
78
+ },
79
+ {
80
+ "id": "eslint-default-case",
81
+ "document": "rules/eslint-default-case.json",
82
+ "title": "ESLint default-case: Require default cases in switch statements",
83
+ "group": "ESLint",
84
+ "on": false
85
+ },
86
+ {
87
+ "id": "eslint-default-case-last",
88
+ "document": "rules/eslint-default-case-last.json",
89
+ "title": "ESLint default-case-last: Enforce default clauses in switch statements to be last",
90
+ "group": "ESLint",
91
+ "on": false
92
+ },
93
+ {
94
+ "id": "eslint-eqeqeq",
95
+ "document": "rules/eslint-eqeqeq.json",
96
+ "title": "ESLint eqeqeq: Require the use of === and !==",
97
+ "group": "ESLint",
98
+ "on": false
99
+ },
100
+ {
101
+ "id": "eslint-func-style",
102
+ "document": "rules/eslint-func-style.json",
103
+ "title": "ESLint func-style: Enforce the consistent use of either function declarations or expressions assigned to variables",
104
+ "group": "ESLint",
105
+ "on": false
106
+ },
107
+ {
108
+ "id": "eslint-guard-for-in",
109
+ "document": "rules/eslint-guard-for-in.json",
110
+ "title": "ESLint guard-for-in: Require for-in loops to include an if statement",
111
+ "group": "ESLint",
112
+ "on": false
113
+ },
114
+ {
115
+ "id": "eslint-no-bitwise",
116
+ "document": "rules/eslint-no-bitwise.json",
117
+ "title": "ESLint no-bitwise: Disallow bitwise operators",
118
+ "group": "ESLint",
119
+ "on": false
120
+ },
121
+ {
122
+ "id": "eslint-no-caller",
123
+ "document": "rules/eslint-no-caller.json",
124
+ "title": "ESLint no-caller: Disallow the use of arguments.caller or arguments.callee",
125
+ "group": "ESLint",
126
+ "on": false
127
+ },
128
+ {
129
+ "id": "eslint-no-case-declarations",
130
+ "document": "rules/eslint-no-case-declarations.json",
131
+ "title": "ESLint no-case-declarations: Disallow lexical declarations in case clauses",
132
+ "group": "ESLint"
133
+ },
134
+ {
135
+ "id": "eslint-no-compare-neg-zero",
136
+ "document": "rules/eslint-no-compare-neg-zero.json",
137
+ "title": "ESLint no-compare-neg-zero: Disallow comparing against -0",
138
+ "group": "ESLint"
139
+ },
140
+ {
141
+ "id": "eslint-no-cond-assign",
142
+ "document": "rules/eslint-no-cond-assign.json",
143
+ "title": "ESLint no-cond-assign: Disallow assignment operators in conditional expressions",
144
+ "group": "ESLint"
145
+ },
146
+ {
147
+ "id": "eslint-no-console",
148
+ "document": "rules/eslint-no-console.json",
149
+ "title": "ESLint no-console: Disallow the use of console",
150
+ "group": "ESLint",
151
+ "on": false
152
+ },
153
+ {
154
+ "id": "eslint-no-continue",
155
+ "document": "rules/eslint-no-continue.json",
156
+ "title": "ESLint no-continue: Disallow continue statements",
157
+ "group": "ESLint",
158
+ "on": false
159
+ },
160
+ {
161
+ "id": "eslint-no-debugger",
162
+ "document": "rules/eslint-no-debugger.json",
163
+ "title": "ESLint no-debugger: Disallow the use of debugger",
164
+ "group": "ESLint"
165
+ },
166
+ {
167
+ "id": "eslint-no-delete-var",
168
+ "document": "rules/eslint-no-delete-var.json",
169
+ "title": "ESLint no-delete-var: Disallow deleting variables",
170
+ "group": "ESLint"
171
+ },
172
+ {
173
+ "id": "eslint-no-div-regex",
174
+ "document": "rules/eslint-no-div-regex.json",
175
+ "title": "ESLint no-div-regex: Disallow equal signs explicitly at the beginning of regular expressions",
176
+ "group": "ESLint",
177
+ "on": false
178
+ },
179
+ {
180
+ "id": "eslint-no-dupe-keys",
181
+ "document": "rules/eslint-no-dupe-keys.json",
182
+ "title": "ESLint no-dupe-keys: Disallow duplicate keys in object literals",
183
+ "group": "ESLint"
184
+ },
185
+ {
186
+ "id": "eslint-no-duplicate-case",
187
+ "document": "rules/eslint-no-duplicate-case.json",
188
+ "title": "ESLint no-duplicate-case: Disallow duplicate case labels",
189
+ "group": "ESLint"
190
+ },
191
+ {
192
+ "id": "eslint-no-empty",
193
+ "document": "rules/eslint-no-empty.json",
194
+ "title": "ESLint no-empty: Disallow empty block statements",
195
+ "group": "ESLint"
196
+ },
197
+ {
198
+ "id": "eslint-no-empty-pattern",
199
+ "document": "rules/eslint-no-empty-pattern.json",
200
+ "title": "ESLint no-empty-pattern: Disallow empty destructuring patterns",
201
+ "group": "ESLint"
202
+ },
203
+ {
204
+ "id": "eslint-no-empty-static-block",
205
+ "document": "rules/eslint-no-empty-static-block.json",
206
+ "title": "ESLint no-empty-static-block: Disallow empty static blocks",
207
+ "group": "ESLint"
208
+ },
209
+ {
210
+ "id": "eslint-no-eq-null",
211
+ "document": "rules/eslint-no-eq-null.json",
212
+ "title": "ESLint no-eq-null: Disallow null comparisons without type-checking operators",
213
+ "group": "ESLint",
214
+ "on": false
215
+ },
216
+ {
217
+ "id": "eslint-no-extend-native",
218
+ "document": "rules/eslint-no-extend-native.json",
219
+ "title": "ESLint no-extend-native: Disallow extending native types",
220
+ "group": "ESLint",
221
+ "on": false
222
+ },
223
+ {
224
+ "id": "eslint-no-inline-comments",
225
+ "document": "rules/eslint-no-inline-comments.json",
226
+ "title": "ESLint no-inline-comments: Disallow inline comments after code",
227
+ "group": "ESLint",
228
+ "on": false
229
+ },
230
+ {
231
+ "id": "eslint-no-iterator",
232
+ "document": "rules/eslint-no-iterator.json",
233
+ "title": "ESLint no-iterator: Disallow the use of the __iterator__ property",
234
+ "group": "ESLint",
235
+ "on": false
236
+ },
237
+ {
238
+ "id": "eslint-no-loss-of-precision",
239
+ "document": "rules/eslint-no-loss-of-precision.json",
240
+ "title": "ESLint no-loss-of-precision: Disallow literal numbers that lose precision",
241
+ "group": "ESLint"
242
+ },
243
+ {
244
+ "id": "eslint-no-multi-str",
245
+ "document": "rules/eslint-no-multi-str.json",
246
+ "title": "ESLint no-multi-str: Disallow multiline strings",
247
+ "group": "ESLint",
248
+ "on": false
249
+ },
250
+ {
251
+ "id": "eslint-no-negated-condition",
252
+ "document": "rules/eslint-no-negated-condition.json",
253
+ "title": "ESLint no-negated-condition: Disallow negated conditions",
254
+ "group": "ESLint",
255
+ "on": false
256
+ },
257
+ {
258
+ "id": "eslint-no-nested-ternary",
259
+ "document": "rules/eslint-no-nested-ternary.json",
260
+ "title": "ESLint no-nested-ternary: Disallow nested ternary expressions",
261
+ "group": "ESLint",
262
+ "on": false
263
+ },
264
+ {
265
+ "id": "eslint-no-new",
266
+ "document": "rules/eslint-no-new.json",
267
+ "title": "ESLint no-new: Disallow new operators outside of assignments or comparisons",
268
+ "group": "ESLint",
269
+ "on": false
270
+ },
271
+ {
272
+ "id": "eslint-no-new-wrappers",
273
+ "document": "rules/eslint-no-new-wrappers.json",
274
+ "title": "ESLint no-new-wrappers: Disallow new operators with the String, Number, and Boolean objects",
275
+ "group": "ESLint",
276
+ "on": false
277
+ },
278
+ {
279
+ "id": "eslint-no-nonoctal-decimal-escape",
280
+ "document": "rules/eslint-no-nonoctal-decimal-escape.json",
281
+ "title": "ESLint no-nonoctal-decimal-escape: Disallow \\8 and \\9 escape sequences in string literals",
282
+ "group": "ESLint"
283
+ },
284
+ {
285
+ "id": "eslint-no-octal",
286
+ "document": "rules/eslint-no-octal.json",
287
+ "title": "ESLint no-octal: Disallow octal literals",
288
+ "group": "ESLint"
289
+ },
290
+ {
291
+ "id": "eslint-no-octal-escape",
292
+ "document": "rules/eslint-no-octal-escape.json",
293
+ "title": "ESLint no-octal-escape: Disallow octal escape sequences in string literals",
294
+ "group": "ESLint",
295
+ "on": false
296
+ },
297
+ {
298
+ "id": "eslint-no-plusplus",
299
+ "document": "rules/eslint-no-plusplus.json",
300
+ "title": "ESLint no-plusplus: Disallow the unary operators ++ and --",
301
+ "group": "ESLint",
302
+ "on": false
303
+ },
304
+ {
305
+ "id": "eslint-no-proto",
306
+ "document": "rules/eslint-no-proto.json",
307
+ "title": "ESLint no-proto: Disallow the use of the __proto__ property",
308
+ "group": "ESLint",
309
+ "on": false
310
+ },
311
+ {
312
+ "id": "eslint-no-prototype-builtins",
313
+ "document": "rules/eslint-no-prototype-builtins.json",
314
+ "title": "ESLint no-prototype-builtins: Disallow calling some Object.prototype methods directly on objects",
315
+ "group": "ESLint"
316
+ },
317
+ {
318
+ "id": "eslint-no-return-assign",
319
+ "document": "rules/eslint-no-return-assign.json",
320
+ "title": "ESLint no-return-assign: Disallow assignment operators in return statements",
321
+ "group": "ESLint",
322
+ "on": false
323
+ },
324
+ {
325
+ "id": "eslint-no-script-url",
326
+ "document": "rules/eslint-no-script-url.json",
327
+ "title": "ESLint no-script-url: Disallow javascript: URLs",
328
+ "group": "ESLint",
329
+ "on": false
330
+ },
331
+ {
332
+ "id": "eslint-no-self-compare",
333
+ "document": "rules/eslint-no-self-compare.json",
334
+ "title": "ESLint no-self-compare: Disallow comparisons where both sides are exactly the same",
335
+ "group": "ESLint",
336
+ "on": false
337
+ },
338
+ {
339
+ "id": "eslint-no-setter-return",
340
+ "document": "rules/eslint-no-setter-return.json",
341
+ "title": "ESLint no-setter-return: Disallow returning values from setters",
342
+ "group": "ESLint"
343
+ },
344
+ {
345
+ "id": "eslint-no-sparse-arrays",
346
+ "document": "rules/eslint-no-sparse-arrays.json",
347
+ "title": "ESLint no-sparse-arrays: Disallow sparse arrays",
348
+ "group": "ESLint"
349
+ },
350
+ {
351
+ "id": "eslint-no-template-curly-in-string",
352
+ "document": "rules/eslint-no-template-curly-in-string.json",
353
+ "title": "ESLint no-template-curly-in-string: Disallow template literal placeholder syntax in regular strings",
354
+ "group": "ESLint",
355
+ "on": false
356
+ },
357
+ {
358
+ "id": "eslint-no-ternary",
359
+ "document": "rules/eslint-no-ternary.json",
360
+ "title": "ESLint no-ternary: Disallow ternary operators",
361
+ "group": "ESLint",
362
+ "on": false
363
+ },
364
+ {
365
+ "id": "eslint-no-unneeded-ternary",
366
+ "document": "rules/eslint-no-unneeded-ternary.json",
367
+ "title": "ESLint no-unneeded-ternary: Disallow ternary operators when simpler alternatives exist",
368
+ "group": "ESLint",
369
+ "on": false
370
+ },
371
+ {
372
+ "id": "eslint-no-unsafe-finally",
373
+ "document": "rules/eslint-no-unsafe-finally.json",
374
+ "title": "ESLint no-unsafe-finally: Disallow control flow statements in finally blocks",
375
+ "group": "ESLint"
376
+ },
377
+ {
378
+ "id": "eslint-no-unsafe-negation",
379
+ "document": "rules/eslint-no-unsafe-negation.json",
380
+ "title": "ESLint no-unsafe-negation: Disallow negating the left operand of relational operators",
381
+ "group": "ESLint"
382
+ },
383
+ {
384
+ "id": "eslint-no-useless-call",
385
+ "document": "rules/eslint-no-useless-call.json",
386
+ "title": "ESLint no-useless-call: Disallow unnecessary calls to .call() and .apply()",
387
+ "group": "ESLint",
388
+ "on": false
389
+ },
390
+ {
391
+ "id": "eslint-no-useless-catch",
392
+ "document": "rules/eslint-no-useless-catch.json",
393
+ "title": "ESLint no-useless-catch: Disallow unnecessary catch clauses",
394
+ "group": "ESLint"
395
+ },
396
+ {
397
+ "id": "eslint-no-useless-concat",
398
+ "document": "rules/eslint-no-useless-concat.json",
399
+ "title": "ESLint no-useless-concat: Disallow unnecessary concatenation of literals or template literals",
400
+ "group": "ESLint",
401
+ "on": false
402
+ },
403
+ {
404
+ "id": "eslint-no-void",
405
+ "document": "rules/eslint-no-void.json",
406
+ "title": "ESLint no-void: Disallow void operators",
407
+ "group": "ESLint",
408
+ "on": false
409
+ },
410
+ {
411
+ "id": "eslint-no-warning-comments",
412
+ "document": "rules/eslint-no-warning-comments.json",
413
+ "title": "ESLint no-warning-comments: Disallow specified warning terms in comments",
414
+ "group": "ESLint",
415
+ "on": false
416
+ },
417
+ {
418
+ "id": "eslint-no-with",
419
+ "document": "rules/eslint-no-with.json",
420
+ "title": "ESLint no-with: Disallow with statements",
421
+ "group": "ESLint"
422
+ },
423
+ {
424
+ "id": "eslint-operator-assignment",
425
+ "document": "rules/eslint-operator-assignment.json",
426
+ "title": "ESLint operator-assignment: Require or disallow assignment operator shorthand where possible",
427
+ "group": "ESLint",
428
+ "on": false
429
+ },
430
+ {
431
+ "id": "eslint-prefer-numeric-literals",
432
+ "document": "rules/eslint-prefer-numeric-literals.json",
433
+ "title": "ESLint prefer-numeric-literals: Disallow parseInt() and Number.parseInt() in favor of binary, octal, and hexadecimal literals",
434
+ "group": "ESLint",
435
+ "on": false
436
+ },
437
+ {
438
+ "id": "eslint-prefer-spread",
439
+ "document": "rules/eslint-prefer-spread.json",
440
+ "title": "ESLint prefer-spread: Require spread operators instead of .apply()",
441
+ "group": "ESLint",
442
+ "on": false
443
+ },
444
+ {
445
+ "id": "eslint-prefer-template",
446
+ "document": "rules/eslint-prefer-template.json",
447
+ "title": "ESLint prefer-template: Require template literals instead of string concatenation",
448
+ "group": "ESLint",
449
+ "on": false
450
+ },
451
+ {
452
+ "id": "eslint-radix",
453
+ "document": "rules/eslint-radix.json",
454
+ "title": "ESLint radix: Enforce the consistent use of the radix argument when using parseInt()",
455
+ "group": "ESLint",
456
+ "on": false
457
+ },
458
+ {
459
+ "id": "eslint-sort-imports",
460
+ "document": "rules/eslint-sort-imports.json",
461
+ "title": "ESLint sort-imports: Enforce sorted import declarations within modules",
462
+ "group": "ESLint",
463
+ "on": false
464
+ },
465
+ {
466
+ "id": "eslint-sort-keys",
467
+ "document": "rules/eslint-sort-keys.json",
468
+ "title": "ESLint sort-keys: Require object keys to be sorted",
469
+ "group": "ESLint",
470
+ "on": false
471
+ },
472
+ {
473
+ "id": "eslint-sort-vars",
474
+ "document": "rules/eslint-sort-vars.json",
475
+ "title": "ESLint sort-vars: Require variables within the same declaration block to be sorted",
476
+ "group": "ESLint",
477
+ "on": false
478
+ },
479
+ {
480
+ "id": "eslint-use-isnan",
481
+ "document": "rules/eslint-use-isnan.json",
482
+ "title": "ESLint use-isnan: Require calls to isNaN() when checking for NaN",
483
+ "group": "ESLint"
484
+ },
485
+ {
486
+ "id": "eslint-valid-typeof",
487
+ "document": "rules/eslint-valid-typeof.json",
488
+ "title": "ESLint valid-typeof: Enforce comparing typeof expressions against valid strings",
489
+ "group": "ESLint"
490
+ },
491
+ {
492
+ "id": "eslint-yoda",
493
+ "document": "rules/eslint-yoda.json",
494
+ "title": "ESLint yoda: Require or disallow \"Yoda\" conditions",
495
+ "group": "ESLint",
496
+ "on": false
497
+ }
498
+ ]
499
+ }
package/package.json ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "@neralabs/rerail-pack-javascript",
3
+ "version": "0.1.1",
4
+ "description": "Rerail rule pack: ESLint core rules ported to Rerail code rules.",
5
+ "license": "Apache-2.0 AND MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/neralabs/rerail.git",
9
+ "directory": "packs/javascript"
10
+ },
11
+ "files": [
12
+ "pack.json",
13
+ "rules",
14
+ "licenses",
15
+ "LICENSE",
16
+ "NOTICE",
17
+ "README.md"
18
+ ],
19
+ "peerDependencies": {
20
+ "@neralabs/rerail": ">=0.1.0-0 <0.2.0"
21
+ },
22
+ "peerDependenciesMeta": {
23
+ "@neralabs/rerail": {
24
+ "optional": true
25
+ }
26
+ },
27
+ "publishConfig": {
28
+ "access": "restricted"
29
+ }
30
+ }
@@ -0,0 +1 @@
1
+ {"format":"rerail.policy/v1","id":"eslint-arrow-body-style","revision":4,"mode":"steer","description":"Port of ESLint's `arrow-body-style` rule (default options: as-needed). Flags an arrow block body that only returns a value. Fixes when ESLint's comment and ASI guards allow and the rewrite is a template of whole nodes. 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},"requireReturnForObjectLiteral":{"type":"boolean","nullable":true,"default":null}}}},{"id":"shared","define":{"language":"typescript","utils":{"already-parenthesized":{"has":{"stopBy":"neighbor","kind":"return_statement","has":{"stopBy":"neighbor","kind":"parenthesized_expression"}}},"arg":{"has":{"stopBy":"neighbor","kind":"return_statement","has":{"stopBy":"neighbor","matches":"return-value","pattern":"$ARG"}}},"arrow-block":{"kind":"statement_block","inside":{"kind":"arrow_function","stopBy":"neighbor"}},"arrow-expression-body":{"not":{"any":[{"kind":"comment"},{"kind":"statement_block"}]},"follows":{"regex":"^=>$","stopBy":"end"},"inside":{"kind":"arrow_function","stopBy":"neighbor"}},"bare-return":{"has":{"stopBy":"neighbor","kind":"return_statement","not":{"has":{"stopBy":"neighbor","matches":"return-value"}}}},"block-statement":{"all":[{"not":{"kind":"comment"}},{"not":{"regex":"^[{}]$"}}]},"first-child":{"not":{"follows":{"regex":"[\\s\\S]"}}},"for-init":{"inside":{"stopBy":"end","follows":{"regex":"^\\($"},"inside":{"kind":"for_statement","stopBy":"neighbor"}}},"hazard-after":{"any":[{"precedes":{"stopBy":{"not":{"kind":"comment"}},"not":{"kind":"comment"},"regex":"^[(\\[/`+-]"}},{"all":[{"not":{"precedes":{"stopBy":"end","not":{"kind":"comment"}}}},{"inside":{"stopBy":"neighbor","matches":"hazard-after"}}]}]},"leads-with-paren-object":{"any":[{"kind":"parenthesized_expression","has":{"stopBy":"neighbor","follows":{"regex":"^\\($"},"matches":"starts-with-object"}},{"has":{"stopBy":"neighbor","all":[{"matches":"first-child"},{"matches":"leads-with-paren-object"}]}}]},"needs-parens":{"any":[{"matches":"object-first"},{"has":{"stopBy":"neighbor","kind":"return_statement","has":{"stopBy":"neighbor","kind":"sequence_expression"}}},{"all":[{"inside":{"kind":"arrow_function","stopBy":"neighbor","has":{"stopBy":"end","kind":"binary_expression","has":{"stopBy":"neighbor","regex":"^in$"}}}},{"inside":{"kind":"arrow_function","stopBy":"neighbor","matches":"for-init"}}]}]},"no-comments":{"all":[{"not":{"has":{"kind":"comment"}}},{"not":{"has":{"kind":"return_statement","has":{"kind":"comment"}}}}]},"object-first":{"has":{"stopBy":"neighbor","kind":"return_statement","has":{"stopBy":"neighbor","matches":"return-value","regex":"^\\{"}}},"return-value":{"not":{"any":[{"kind":"comment"},{"regex":"^(?:return|;)$"}]}},"single-return":{"all":[{"has":{"stopBy":"neighbor","kind":"return_statement","pattern":"$RET"}},{"not":{"has":{"stopBy":"neighbor","all":[{"matches":"block-statement"},{"not":{"kind":"return_statement"}}]}}},{"not":{"has":{"stopBy":"neighbor","kind":"return_statement","precedes":{"kind":"return_statement","stopBy":"end"}}}}]},"starts-with-object":{"any":[{"kind":"object"},{"has":{"stopBy":"neighbor","all":[{"matches":"first-child"},{"matches":"starts-with-object"}]}}]},"unparen":{"any":[{"not":{"kind":"parenthesized_expression"},"pattern":"$INNER"},{"kind":"parenthesized_expression","has":{"not":{"any":[{"kind":"comment"},{"regex":"^[()]$"}]},"matches":"unparen"}}]},"unparen-object":{"any":[{"kind":"object"},{"kind":"parenthesized_expression","has":{"stopBy":"neighbor","matches":"unparen-object"}}]},"r1":{"not":{"has":{"has":{"matches":"unparen-object","stopBy":"neighbor"},"kind":"return_statement","stopBy":"neighbor"}}},"r2":{"has":{"not":{"any":[{"kind":"comment"},{"regex":"^[()]$"}]},"pattern":"$X","stopBy":"neighbor"},"kind":"parenthesized_expression","regex":"^\\(\\{[\\s\\S]*\\S\\)$"},"r3":{"not":{"all":[{"not":{"matches":"bare-return"}},{"matches":"no-comments"},{"not":{"matches":"hazard-after"}},{"matches":"arg"}]}},"r4":{"any":[{"not":{"matches":"needs-parens"}},{"matches":"already-parenthesized"}]},"r5":{"has":{"matches":"block-statement","stopBy":"neighbor"}}}}},{"id":"unexpectedObjectBlock-fix","forbid":{"ast":{"language":"typescript","rule":{"all":[{"matches":"arrow-block"},{"matches":"single-return"},{"$option":"requireReturnForObjectLiteral","cases":{"true":[{"matches":"r1"}]},"default":[],"spread":true},{"matches":"object-first"},{"not":{"matches":"bare-return"}},{"matches":"no-comments"},{"not":{"matches":"hazard-after"}},{"matches":"arg"},{"matches":"r4"}]},"when":{"option":{"option":{"in":[null,"never","as-needed"]}}}}},"violation":{"anchor":"witness.span","code":"arrow-body-style","message":"Unexpected block statement surrounding arrow body; parenthesize the returned value and move it immediately after the `=>`.","fix":"$ARG","suppress":{"eslint":{"rules":["arrow-body-style"]},"oxlint":{"rules":["arrow-body-style"]},"biome":{"rules":["lint/style/useConsistentArrowReturn"]}}}},{"id":"unexpectedObjectBlock-fix-parens","forbid":{"ast":{"language":"typescript","rule":{"all":[{"matches":"arrow-block"},{"matches":"single-return"},{"$option":"requireReturnForObjectLiteral","cases":{"true":[{"matches":"r1"}]},"default":[],"spread":true},{"matches":"object-first"},{"not":{"matches":"bare-return"}},{"matches":"no-comments"},{"not":{"matches":"hazard-after"}},{"matches":"arg"},{"matches":"needs-parens"},{"not":{"matches":"already-parenthesized"}}]},"when":{"option":{"option":{"in":[null,"never","as-needed"]}}}}},"violation":{"anchor":"witness.span","code":"arrow-body-style","message":"Unexpected block statement surrounding arrow body; parenthesize the returned value and move it immediately after the `=>`.","fix":"($ARG)","suppress":{"eslint":{"rules":["arrow-body-style"]},"oxlint":{"rules":["arrow-body-style"]},"biome":{"rules":["lint/style/useConsistentArrowReturn"]}}}},{"id":"unexpectedObjectBlock-nofix","forbid":{"ast":{"language":"typescript","rule":{"all":[{"matches":"arrow-block"},{"matches":"single-return"},{"$option":"requireReturnForObjectLiteral","cases":{"true":[{"matches":"r1"}]},"default":[],"spread":true},{"matches":"object-first"},{"matches":"r3"}]},"when":{"option":{"option":{"in":[null,"never","as-needed"]}}}}},"violation":{"anchor":"witness.span","code":"arrow-body-style","message":"Unexpected block statement surrounding arrow body; parenthesize the returned value and move it immediately after the `=>`.","suppress":{"eslint":{"rules":["arrow-body-style"]},"oxlint":{"rules":["arrow-body-style"]},"biome":{"rules":["lint/style/useConsistentArrowReturn"]}}}},{"id":"unexpectedSingleBlock-fix","forbid":{"ast":{"language":"typescript","rule":{"all":[{"matches":"arrow-block"},{"matches":"single-return"},{"$option":"requireReturnForObjectLiteral","cases":{"true":[{"matches":"r1"}]},"default":[],"spread":true},{"not":{"matches":"object-first"}},{"not":{"matches":"bare-return"}},{"matches":"no-comments"},{"not":{"matches":"hazard-after"}},{"matches":"arg"},{"matches":"r4"}]},"when":{"option":{"option":{"in":[null,"never","as-needed"]}}}}},"violation":{"anchor":"witness.span","code":"arrow-body-style","message":"Unexpected block statement surrounding arrow body; move the returned value immediately after the `=>`.","fix":"$ARG","suppress":{"eslint":{"rules":["arrow-body-style"]},"oxlint":{"rules":["arrow-body-style"]},"biome":{"rules":["lint/style/useConsistentArrowReturn"]}}}},{"id":"unexpectedSingleBlock-fix-parens","forbid":{"ast":{"language":"typescript","rule":{"all":[{"matches":"arrow-block"},{"matches":"single-return"},{"$option":"requireReturnForObjectLiteral","cases":{"true":[{"matches":"r1"}]},"default":[],"spread":true},{"not":{"matches":"object-first"}},{"not":{"matches":"bare-return"}},{"matches":"no-comments"},{"not":{"matches":"hazard-after"}},{"matches":"arg"},{"matches":"needs-parens"},{"not":{"matches":"already-parenthesized"}}]},"when":{"option":{"option":{"in":[null,"never","as-needed"]}}}}},"violation":{"anchor":"witness.span","code":"arrow-body-style","message":"Unexpected block statement surrounding arrow body; move the returned value immediately after the `=>`.","fix":"($ARG)","suppress":{"eslint":{"rules":["arrow-body-style"]},"oxlint":{"rules":["arrow-body-style"]},"biome":{"rules":["lint/style/useConsistentArrowReturn"]}}}},{"id":"unexpectedSingleBlock-nofix","forbid":{"ast":{"language":"typescript","rule":{"all":[{"matches":"arrow-block"},{"matches":"single-return"},{"$option":"requireReturnForObjectLiteral","cases":{"true":[{"matches":"r1"}]},"default":[],"spread":true},{"not":{"matches":"object-first"}},{"matches":"r3"}]},"when":{"option":{"option":{"in":[null,"never","as-needed"]}}}}},"violation":{"anchor":"witness.span","code":"arrow-body-style","message":"Unexpected block statement surrounding arrow body; move the returned value immediately after the `=>`.","suppress":{"eslint":{"rules":["arrow-body-style"]},"oxlint":{"rules":["arrow-body-style"]},"biome":{"rules":["lint/style/useConsistentArrowReturn"]}}}},{"id":"expectedBlock-fix","forbid":{"ast":{"language":"typescript","rule":{"all":[{"matches":"arrow-expression-body"},{"$option":"option","cases":{"as-needed":[{"matches":"unparen-object"}]},"default":[],"spread":true},{"not":{"matches":"leads-with-paren-object"}},{"matches":"unparen"},{"pattern":"$B"}]},"when":{"option":{"option":{"in":["always","as-needed"]}}}}},"violation":{"anchor":"capture.INNER","code":"arrow-body-style","message":"Expected block statement surrounding arrow body.","fix":"{return $B}","suppress":{"eslint":{"rules":["arrow-body-style"]},"oxlint":{"rules":["arrow-body-style"]},"biome":{"rules":["lint/style/useConsistentArrowReturn"]}}}},{"id":"expectedBlock-fix-object","forbid":{"ast":{"language":"typescript","rule":{"all":[{"matches":"arrow-expression-body"},{"$option":"option","cases":{"as-needed":[{"matches":"unparen-object"}]},"default":[],"spread":true},{"matches":"r2"},{"matches":"unparen"}]},"when":{"option":{"option":{"in":["always","as-needed"]}}}}},"violation":{"anchor":"capture.INNER","code":"arrow-body-style","message":"Expected block statement surrounding arrow body.","fix":"{return $X}","suppress":{"eslint":{"rules":["arrow-body-style"]},"oxlint":{"rules":["arrow-body-style"]},"biome":{"rules":["lint/style/useConsistentArrowReturn"]}}}},{"id":"expectedBlock-nofix","forbid":{"ast":{"language":"typescript","rule":{"all":[{"matches":"arrow-expression-body"},{"$option":"option","cases":{"as-needed":[{"matches":"unparen-object"}]},"default":[],"spread":true},{"matches":"leads-with-paren-object"},{"not":{"matches":"r2"}},{"matches":"unparen"}]},"when":{"option":{"option":{"in":["always","as-needed"]}}}}},"violation":{"anchor":"capture.INNER","code":"arrow-body-style","message":"Expected block statement surrounding arrow body.","suppress":{"eslint":{"rules":["arrow-body-style"]},"oxlint":{"rules":["arrow-body-style"]},"biome":{"rules":["lint/style/useConsistentArrowReturn"]}}}},{"id":"unexpectedEmptyBlock","forbid":{"ast":{"language":"typescript","rule":{"all":[{"matches":"arrow-block"},{"not":{"matches":"r5"}}]},"when":{"option":{"option":"never"}}}},"violation":{"anchor":"witness.span","code":"arrow-body-style","message":"Unexpected block statement surrounding arrow body; put a value of `undefined` immediately after the `=>`.","suppress":{"eslint":{"rules":["arrow-body-style"]},"oxlint":{"rules":["arrow-body-style"]},"biome":{"rules":["lint/style/useConsistentArrowReturn"]}}}},{"id":"unexpectedOtherBlock","forbid":{"ast":{"language":"typescript","rule":{"all":[{"matches":"arrow-block"},{"matches":"r5"},{"not":{"matches":"single-return"}}]},"when":{"option":{"option":"never"}}}},"violation":{"anchor":"witness.span","code":"arrow-body-style","message":"Unexpected block statement surrounding arrow body.","suppress":{"eslint":{"rules":["arrow-body-style"]},"oxlint":{"rules":["arrow-body-style"]},"biome":{"rules":["lint/style/useConsistentArrowReturn"]}}}}]}
@@ -0,0 +1 @@
1
+ {"format":"rerail.policy/v1","id":"eslint-capitalized-comments","revision":5,"mode":"steer","description":"Port of ESLint's `capitalized-comments` rule (default options: always). Tests the first non-whitespace, non-asterisk character of each comment for letter case (Unicode Ll/Lu), skipping directive comments and URLs. Fixes as ESLint does: the first letter's case converted (`transform` `convert` of the regex group `L`, written over it with `fix.range`). 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},"ignoreInlineComments":{"type":"boolean","nullable":true,"default":null},"ignoreConsecutiveComments":{"type":"boolean","nullable":true,"default":null},"ignorePattern":{"type":"string","nullable":true,"default":null},"block.ignorePattern":{"type":"string","nullable":true,"default":null},"line.ignorePattern":{"type":"string","nullable":true,"default":null}}}},{"id":"shared","define":{"language":"typescript","utils":{"r1":{"all":[{"layout":{"before":{"breaks":{"eq":0},"comments":true,"to":"token"}}},{"layout":{"after":{"breaks":{"eq":0},"comments":true,"to":"token"}}}]}}}},{"id":"comment-case","forbid":{"ast":{"language":"typescript","rule":{"all":[{"kind":"comment"},{"regex":{"$option":"option","cases":{"never":"^(?://|/\\*)[\\s*]*(?<L>\\p{Lu})"},"default":"^(?://|/\\*)[\\s*]*(?<L>\\p{Ll})"}},{"not":{"regex":"^(?://|/\\*)\\s*(?:eslint|jshint\\s+|jslint\\s+|istanbul\\s+|globals?\\s+|exported\\s+|jscs)"}},{"not":{"regex":"^(?://|/\\*)[\\s*]*(?:[^:/?#\\s*]\\**)+:\\**/\\**/\\**[^?#*]"}},{"$option":"ignorePattern","cases":{"match":[],"Match":[],"foo|bar":[],"Foo|Bar":[],"ignored?":[]},"default":{"$option":"ignoreInlineComments","cases":{"true":[{"not":{"$option":"ignoreInlineComments","cases":{"true":{"matches":"r1"}},"default":{"follows":{"kind":"comment"}}}}]},"default":{"$option":"ignoreConsecutiveComments","cases":{"true":[{"not":{"$option":"ignoreInlineComments","cases":{"true":{"matches":"r1"}},"default":{"follows":{"kind":"comment"}}}}]},"default":[]}},"spread":true},{"$option":"ignorePattern","cases":{"match":[{"not":{"all":[{"regex":"^//"},{"regex":"^(?://|/\\*)[\\s*]*(?:match)"}]}}]},"default":[],"spread":true},{"$option":"ignorePattern","cases":{"match":[{"not":{"all":[{"regex":"^/\\*"},{"regex":"^(?://|/\\*)[\\s*]*(?:match)"}]}}]},"default":[],"spread":true},{"$option":"ignorePattern","cases":{"Match":[{"not":{"all":[{"regex":"^//"},{"regex":"^(?://|/\\*)[\\s*]*(?:Match)"}]}}]},"default":[],"spread":true},{"$option":"ignorePattern","cases":{"Match":[{"not":{"all":[{"regex":"^/\\*"},{"regex":"^(?://|/\\*)[\\s*]*(?:Match)"}]}}]},"default":[],"spread":true},{"$option":"ignorePattern","cases":{"foo|bar":[{"not":{"all":[{"regex":"^//"},{"regex":"^(?://|/\\*)[\\s*]*(?:foo|bar)"}]}}]},"default":[],"spread":true},{"$option":"ignorePattern","cases":{"foo|bar":[{"not":{"all":[{"regex":"^/\\*"},{"regex":"^(?://|/\\*)[\\s*]*(?:foo|bar)"}]}}]},"default":[],"spread":true},{"$option":"ignorePattern","cases":{"Foo|Bar":[{"not":{"all":[{"regex":"^//"},{"regex":"^(?://|/\\*)[\\s*]*(?:Foo|Bar)"}]}}]},"default":[],"spread":true},{"$option":"ignorePattern","cases":{"Foo|Bar":[{"not":{"all":[{"regex":"^/\\*"},{"regex":"^(?://|/\\*)[\\s*]*(?:Foo|Bar)"}]}}]},"default":[],"spread":true},{"$option":"ignorePattern","cases":{"ignored?":[{"not":{"all":[{"regex":"^//"},{"regex":"^(?://|/\\*)[\\s*]*(?:ignored?)"}]}}]},"default":[],"spread":true},{"$option":"ignorePattern","cases":{"ignored?":[{"not":{"all":[{"regex":"^/\\*"},{"regex":"^(?://|/\\*)[\\s*]*(?:ignored?)"}]}}]},"default":[],"spread":true},{"$option":"block.ignorePattern","cases":{"blockCommentIgnorePattern":[{"not":{"all":[{"regex":"^//"},{"regex":"^(?://|/\\*)[\\s*]*(?:lineCommentIgnorePattern)"}]}}]},"default":[],"spread":true},{"$option":"block.ignorePattern","cases":{"blockCommentIgnorePattern":[{"not":{"all":[{"regex":"^/\\*"},{"regex":"^(?://|/\\*)[\\s*]*(?:blockCommentIgnorePattern)"}]}}]},"default":[],"spread":true}]},"transform":{"C":{"convert":{"source":"$L","toCase":{"$option":"option","cases":{"never":"lowerCase"},"default":"upperCase"}}}}}},"violation":{"anchor":"witness.span","code":"capitalized-comments","message":{"$option":"option","cases":{"never":"Comments should not begin with an uppercase character."},"default":"Comments should not begin with a lowercase character."},"fix":{"template":"$C","range":"capture.L"},"suppress":{"eslint":{"rules":["capitalized-comments"]},"oxlint":{"rules":["capitalized-comments"]}}}}]}
@@ -0,0 +1,52 @@
1
+ {
2
+ "format": "rerail.policy/v1",
3
+ "id": "eslint-default-case-last",
4
+ "revision": 3,
5
+ "mode": "steer",
6
+ "description": "Port of ESLint's `default-case-last` (https://eslint.org/docs/latest/rules/default-case-last). Flags a `default` clause followed by a `case` clause.",
7
+ "scope": {
8
+ "include": [
9
+ "**/*"
10
+ ],
11
+ "exclude": []
12
+ },
13
+ "clauses": [
14
+ {
15
+ "id": "not-last",
16
+ "forbid": {
17
+ "ast": {
18
+ "language": "typescript",
19
+ "rule": {
20
+ "kind": "switch_default",
21
+ "precedes": {
22
+ "kind": "switch_case",
23
+ "stopBy": "end"
24
+ }
25
+ }
26
+ }
27
+ },
28
+ "violation": {
29
+ "anchor": "witness.span",
30
+ "code": "default-case-last",
31
+ "message": "Default clause should be the last clause.",
32
+ "suppress": {
33
+ "eslint": {
34
+ "rules": [
35
+ "default-case-last"
36
+ ]
37
+ },
38
+ "oxlint": {
39
+ "rules": [
40
+ "default-case-last"
41
+ ]
42
+ },
43
+ "biome": {
44
+ "rules": [
45
+ "lint/suspicious/useDefaultSwitchClauseLast"
46
+ ]
47
+ }
48
+ }
49
+ }
50
+ }
51
+ ]
52
+ }
@@ -0,0 +1 @@
1
+ {"format":"rerail.policy/v1","id":"eslint-default-case","revision":4,"mode":"steer","description":"Port of ESLint's `default-case` rule (https://eslint.org/docs/latest/rules/default-case): a non-empty switch needs a `default` case unless the last comment after its last case reads `no default` (case-insensitive). 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":{"commentPattern":{"type":"string","nullable":true,"default":null}}}},{"id":"missing-default","forbid":{"ast":{"language":"typescript","rule":{"all":[{"kind":"switch_statement"},{"has":{"stopBy":"neighbor","kind":"switch_body","all":[{"has":{"stopBy":"neighbor","kind":"switch_case"}},{"not":{"has":{"stopBy":"neighbor","kind":"switch_default"}}},{"not":{"any":[{"has":{"stopBy":"neighbor","all":[{"kind":"comment","regex":{"$option":"commentPattern","cases":{".?":"(?s)^(?://|/\\*)\\s*","default case omitted":"(?s)^(?://|/\\*)\\s*.*default case omitted","^skip default":"(?s)^(?://|/\\*)\\s*skip default","default":"(?s)^(?://|/\\*)\\s*.*default","skipped default case":"(?s)^(?://|/\\*)\\s*.*skipped default case","default omitted":"(?s)^(?://|/\\*)\\s*.*default omitted"},"default":"(?i)^(?://|/\\*)\\s*no default\\s*(?:\\*/)?$"}},{"precedes":{"stopBy":"neighbor","regex":"^\\}$"}}]}},{"has":{"stopBy":"neighbor","kind":"switch_case","precedes":{"stopBy":"neighbor","regex":"^\\}$"},"has":{"stopBy":"neighbor","all":[{"kind":"comment","regex":{"$option":"commentPattern","cases":{".?":"(?s)^(?://|/\\*)\\s*","default case omitted":"(?s)^(?://|/\\*)\\s*.*default case omitted","^skip default":"(?s)^(?://|/\\*)\\s*skip default","default":"(?s)^(?://|/\\*)\\s*.*default","skipped default case":"(?s)^(?://|/\\*)\\s*.*skipped default case","default omitted":"(?s)^(?://|/\\*)\\s*.*default omitted"},"default":"(?i)^(?://|/\\*)\\s*no default\\s*(?:\\*/)?$"}},{"not":{"precedes":{"stopBy":"neighbor","regex":"[\\s\\S]"}}}]}}}]}}]}}]}}},"violation":{"anchor":"witness.span","code":"default-case","message":"Expected a default case.","suppress":{"eslint":{"rules":["default-case"]},"oxlint":{"rules":["default-case"]},"biome":{"rules":["lint/style/useDefaultSwitchClause"]}}}}]}