@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,533 @@
|
|
|
1
|
+
{
|
|
2
|
+
"format": "rerail.policy/v1",
|
|
3
|
+
"id": "eslint-radix",
|
|
4
|
+
"revision": 3,
|
|
5
|
+
"mode": "steer",
|
|
6
|
+
"description": "ESLint 10.11.0 radix, default options. Port of ESLint's `radix` rule (https://eslint.org/docs/latest/rules/radix). Flags calls of the global `parseInt` / `Number.parseInt` (resolved with `resolves`) with no arguments, no radix, or a radix that is not an integer 2..36: any literal whose value is not such a Number, a signed Number literal likewise, or the global `undefined`. The 'always'/'as-needed' option is deprecated and changes nothing.",
|
|
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": "missing-parameters",
|
|
23
|
+
"forbid": {
|
|
24
|
+
"ast": {
|
|
25
|
+
"language": "typescript",
|
|
26
|
+
"languageOptions": {},
|
|
27
|
+
"rule": {
|
|
28
|
+
"kind": "call_expression",
|
|
29
|
+
"has": {
|
|
30
|
+
"matches": "callee"
|
|
31
|
+
},
|
|
32
|
+
"arguments": {
|
|
33
|
+
"signature": [
|
|
34
|
+
"string",
|
|
35
|
+
"radix"
|
|
36
|
+
],
|
|
37
|
+
"absent": [
|
|
38
|
+
"string"
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"utils": {
|
|
43
|
+
"callee": {
|
|
44
|
+
"any": [
|
|
45
|
+
{
|
|
46
|
+
"any": [
|
|
47
|
+
{
|
|
48
|
+
"kind": "identifier",
|
|
49
|
+
"resolves": {
|
|
50
|
+
"global": [
|
|
51
|
+
"parseInt"
|
|
52
|
+
],
|
|
53
|
+
"directives": "eslint"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"kind": "member_expression",
|
|
58
|
+
"all": [
|
|
59
|
+
{
|
|
60
|
+
"has": {
|
|
61
|
+
"kind": "property_identifier",
|
|
62
|
+
"regex": "^parseInt$"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"has": {
|
|
67
|
+
"matches": "number-obj"
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"kind": "subscript_expression",
|
|
74
|
+
"all": [
|
|
75
|
+
{
|
|
76
|
+
"has": {
|
|
77
|
+
"any": [
|
|
78
|
+
{
|
|
79
|
+
"kind": "string"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"kind": "template_string",
|
|
83
|
+
"not": {
|
|
84
|
+
"has": {
|
|
85
|
+
"kind": "template_substitution"
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
],
|
|
90
|
+
"value": {
|
|
91
|
+
"eq": "parseInt"
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"has": {
|
|
97
|
+
"matches": "number-obj"
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"kind": "parenthesized_expression",
|
|
106
|
+
"has": {
|
|
107
|
+
"matches": "callee"
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
]
|
|
111
|
+
},
|
|
112
|
+
"number-obj": {
|
|
113
|
+
"any": [
|
|
114
|
+
{
|
|
115
|
+
"kind": "identifier",
|
|
116
|
+
"resolves": {
|
|
117
|
+
"global": [
|
|
118
|
+
"Number"
|
|
119
|
+
],
|
|
120
|
+
"directives": "eslint"
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"kind": "parenthesized_expression",
|
|
125
|
+
"has": {
|
|
126
|
+
"matches": "number-obj"
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
]
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
"violation": {
|
|
135
|
+
"anchor": "witness.span",
|
|
136
|
+
"code": "radix",
|
|
137
|
+
"message": "Missing parameters.",
|
|
138
|
+
"suppress": {
|
|
139
|
+
"eslint": {
|
|
140
|
+
"rules": [
|
|
141
|
+
"radix"
|
|
142
|
+
]
|
|
143
|
+
},
|
|
144
|
+
"oxlint": {
|
|
145
|
+
"rules": [
|
|
146
|
+
"radix"
|
|
147
|
+
]
|
|
148
|
+
},
|
|
149
|
+
"biome": {
|
|
150
|
+
"rules": [
|
|
151
|
+
"lint/correctness/useParseIntRadix"
|
|
152
|
+
]
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"id": "missing-radix",
|
|
159
|
+
"forbid": {
|
|
160
|
+
"ast": {
|
|
161
|
+
"language": "typescript",
|
|
162
|
+
"languageOptions": {},
|
|
163
|
+
"rule": {
|
|
164
|
+
"kind": "call_expression",
|
|
165
|
+
"has": {
|
|
166
|
+
"matches": "callee"
|
|
167
|
+
},
|
|
168
|
+
"arguments": {
|
|
169
|
+
"signature": [
|
|
170
|
+
"string",
|
|
171
|
+
"radix"
|
|
172
|
+
],
|
|
173
|
+
"bind": {
|
|
174
|
+
"S": "string"
|
|
175
|
+
},
|
|
176
|
+
"absent": [
|
|
177
|
+
"radix"
|
|
178
|
+
]
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
"utils": {
|
|
182
|
+
"callee": {
|
|
183
|
+
"any": [
|
|
184
|
+
{
|
|
185
|
+
"any": [
|
|
186
|
+
{
|
|
187
|
+
"kind": "identifier",
|
|
188
|
+
"resolves": {
|
|
189
|
+
"global": [
|
|
190
|
+
"parseInt"
|
|
191
|
+
],
|
|
192
|
+
"directives": "eslint"
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"kind": "member_expression",
|
|
197
|
+
"all": [
|
|
198
|
+
{
|
|
199
|
+
"has": {
|
|
200
|
+
"kind": "property_identifier",
|
|
201
|
+
"regex": "^parseInt$"
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"has": {
|
|
206
|
+
"matches": "number-obj"
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
]
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"kind": "subscript_expression",
|
|
213
|
+
"all": [
|
|
214
|
+
{
|
|
215
|
+
"has": {
|
|
216
|
+
"any": [
|
|
217
|
+
{
|
|
218
|
+
"kind": "string"
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"kind": "template_string",
|
|
222
|
+
"not": {
|
|
223
|
+
"has": {
|
|
224
|
+
"kind": "template_substitution"
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
],
|
|
229
|
+
"value": {
|
|
230
|
+
"eq": "parseInt"
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"has": {
|
|
236
|
+
"matches": "number-obj"
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
]
|
|
240
|
+
}
|
|
241
|
+
]
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"kind": "parenthesized_expression",
|
|
245
|
+
"has": {
|
|
246
|
+
"matches": "callee"
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
]
|
|
250
|
+
},
|
|
251
|
+
"number-obj": {
|
|
252
|
+
"any": [
|
|
253
|
+
{
|
|
254
|
+
"kind": "identifier",
|
|
255
|
+
"resolves": {
|
|
256
|
+
"global": [
|
|
257
|
+
"Number"
|
|
258
|
+
],
|
|
259
|
+
"directives": "eslint"
|
|
260
|
+
}
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
"kind": "parenthesized_expression",
|
|
264
|
+
"has": {
|
|
265
|
+
"matches": "number-obj"
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
]
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
},
|
|
273
|
+
"violation": {
|
|
274
|
+
"anchor": "witness.span",
|
|
275
|
+
"code": "radix",
|
|
276
|
+
"message": "Missing radix parameter.",
|
|
277
|
+
"suppress": {
|
|
278
|
+
"eslint": {
|
|
279
|
+
"rules": [
|
|
280
|
+
"radix"
|
|
281
|
+
]
|
|
282
|
+
},
|
|
283
|
+
"oxlint": {
|
|
284
|
+
"rules": [
|
|
285
|
+
"radix"
|
|
286
|
+
]
|
|
287
|
+
},
|
|
288
|
+
"biome": {
|
|
289
|
+
"rules": [
|
|
290
|
+
"lint/correctness/useParseIntRadix"
|
|
291
|
+
]
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
"id": "invalid-radix",
|
|
298
|
+
"forbid": {
|
|
299
|
+
"ast": {
|
|
300
|
+
"language": "typescript",
|
|
301
|
+
"languageOptions": {},
|
|
302
|
+
"rule": {
|
|
303
|
+
"kind": "call_expression",
|
|
304
|
+
"has": {
|
|
305
|
+
"matches": "callee"
|
|
306
|
+
},
|
|
307
|
+
"arguments": {
|
|
308
|
+
"signature": [
|
|
309
|
+
"string",
|
|
310
|
+
"radix"
|
|
311
|
+
],
|
|
312
|
+
"bind": {
|
|
313
|
+
"R": "radix"
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
},
|
|
317
|
+
"utils": {
|
|
318
|
+
"callee": {
|
|
319
|
+
"any": [
|
|
320
|
+
{
|
|
321
|
+
"any": [
|
|
322
|
+
{
|
|
323
|
+
"kind": "identifier",
|
|
324
|
+
"resolves": {
|
|
325
|
+
"global": [
|
|
326
|
+
"parseInt"
|
|
327
|
+
],
|
|
328
|
+
"directives": "eslint"
|
|
329
|
+
}
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
"kind": "member_expression",
|
|
333
|
+
"all": [
|
|
334
|
+
{
|
|
335
|
+
"has": {
|
|
336
|
+
"kind": "property_identifier",
|
|
337
|
+
"regex": "^parseInt$"
|
|
338
|
+
}
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
"has": {
|
|
342
|
+
"matches": "number-obj"
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
]
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
"kind": "subscript_expression",
|
|
349
|
+
"all": [
|
|
350
|
+
{
|
|
351
|
+
"has": {
|
|
352
|
+
"any": [
|
|
353
|
+
{
|
|
354
|
+
"kind": "string"
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
"kind": "template_string",
|
|
358
|
+
"not": {
|
|
359
|
+
"has": {
|
|
360
|
+
"kind": "template_substitution"
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
],
|
|
365
|
+
"value": {
|
|
366
|
+
"eq": "parseInt"
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
"has": {
|
|
372
|
+
"matches": "number-obj"
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
]
|
|
376
|
+
}
|
|
377
|
+
]
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
"kind": "parenthesized_expression",
|
|
381
|
+
"has": {
|
|
382
|
+
"matches": "callee"
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
]
|
|
386
|
+
},
|
|
387
|
+
"number-obj": {
|
|
388
|
+
"any": [
|
|
389
|
+
{
|
|
390
|
+
"kind": "identifier",
|
|
391
|
+
"resolves": {
|
|
392
|
+
"global": [
|
|
393
|
+
"Number"
|
|
394
|
+
],
|
|
395
|
+
"directives": "eslint"
|
|
396
|
+
}
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
"kind": "parenthesized_expression",
|
|
400
|
+
"has": {
|
|
401
|
+
"matches": "number-obj"
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
]
|
|
405
|
+
},
|
|
406
|
+
"invalid-radix": {
|
|
407
|
+
"any": [
|
|
408
|
+
{
|
|
409
|
+
"any": [
|
|
410
|
+
{
|
|
411
|
+
"kind": "null"
|
|
412
|
+
},
|
|
413
|
+
{
|
|
414
|
+
"kind": "true"
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
"kind": "false"
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
"kind": "string"
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
"kind": "regex"
|
|
424
|
+
}
|
|
425
|
+
]
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
"kind": "number",
|
|
429
|
+
"not": {
|
|
430
|
+
"value": {
|
|
431
|
+
"type": "number",
|
|
432
|
+
"ge": 2,
|
|
433
|
+
"le": 36,
|
|
434
|
+
"bitsAny": 63
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
"kind": "unary_expression",
|
|
440
|
+
"has": {
|
|
441
|
+
"regex": "^[-+]$"
|
|
442
|
+
},
|
|
443
|
+
"all": [
|
|
444
|
+
{
|
|
445
|
+
"has": {
|
|
446
|
+
"matches": "num-lit"
|
|
447
|
+
}
|
|
448
|
+
},
|
|
449
|
+
{
|
|
450
|
+
"not": {
|
|
451
|
+
"value": {
|
|
452
|
+
"type": "number",
|
|
453
|
+
"ge": 2,
|
|
454
|
+
"le": 36,
|
|
455
|
+
"bitsAny": 63
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
]
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
"any": [
|
|
463
|
+
{
|
|
464
|
+
"kind": "undefined"
|
|
465
|
+
},
|
|
466
|
+
{
|
|
467
|
+
"kind": "identifier"
|
|
468
|
+
}
|
|
469
|
+
],
|
|
470
|
+
"resolves": {
|
|
471
|
+
"global": [
|
|
472
|
+
"undefined"
|
|
473
|
+
],
|
|
474
|
+
"directives": "eslint"
|
|
475
|
+
}
|
|
476
|
+
},
|
|
477
|
+
{
|
|
478
|
+
"kind": "parenthesized_expression",
|
|
479
|
+
"has": {
|
|
480
|
+
"matches": "invalid-radix"
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
]
|
|
484
|
+
},
|
|
485
|
+
"num-lit": {
|
|
486
|
+
"any": [
|
|
487
|
+
{
|
|
488
|
+
"kind": "number",
|
|
489
|
+
"value": {
|
|
490
|
+
"type": "number"
|
|
491
|
+
}
|
|
492
|
+
},
|
|
493
|
+
{
|
|
494
|
+
"kind": "parenthesized_expression",
|
|
495
|
+
"has": {
|
|
496
|
+
"matches": "num-lit"
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
]
|
|
500
|
+
}
|
|
501
|
+
},
|
|
502
|
+
"constraints": {
|
|
503
|
+
"R": {
|
|
504
|
+
"matches": "invalid-radix"
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
},
|
|
509
|
+
"violation": {
|
|
510
|
+
"anchor": "witness.span",
|
|
511
|
+
"code": "radix",
|
|
512
|
+
"message": "Invalid radix parameter, must be an integer between 2 and 36.",
|
|
513
|
+
"suppress": {
|
|
514
|
+
"eslint": {
|
|
515
|
+
"rules": [
|
|
516
|
+
"radix"
|
|
517
|
+
]
|
|
518
|
+
},
|
|
519
|
+
"oxlint": {
|
|
520
|
+
"rules": [
|
|
521
|
+
"radix"
|
|
522
|
+
]
|
|
523
|
+
},
|
|
524
|
+
"biome": {
|
|
525
|
+
"rules": [
|
|
526
|
+
"lint/correctness/useParseIntRadix"
|
|
527
|
+
]
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
]
|
|
533
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"format":"rerail.policy/v1","id":"eslint-sort-imports","revision":3,"mode":"steer","description":"Port of ESLint's `sort-imports` rule (https://eslint.org/docs/latest/rules/sort-imports). Each import is compared with the previous import declaration: member-syntax group order (none, all, multiple, single), then the first local name within a group; import specifiers must be sorted by local name (first unsorted one reported). No fix (the fix sorts a list). 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":{"ignoreCase":{"type":"boolean","nullable":true,"default":null},"ignoreDeclarationSort":{"type":"boolean","nullable":true,"default":null},"ignoreMemberSort":{"type":"boolean","nullable":true,"default":null},"memberSyntaxSortOrder":{"type":"array","items":"string","nullable":true,"default":null},"allowSeparatedGroups":{"type":"boolean","nullable":true,"default":null}}}},{"id":"shared","define":{"language":"typescript","utils":{"default-id":{"kind":"identifier","inside":{"kind":"import_clause"}},"spec":{"any":[{"kind":"import_specifier"},{"kind":"namespace_import"},{"matches":"default-id"}]},"syntax-all":{"all":[{"matches":"r11"},{"not":{"has":{"matches":"default-id","stopBy":"end"}}}]},"syntax-multiple":{"count":{"has":{"matches":"spec","stopBy":"end"},"min":2}},"syntax-none":{"not":{"has":{"matches":"spec","stopBy":"end"}}},"syntax-single":{"all":[{"count":{"has":{"matches":"spec","stopBy":"end"},"min":1,"max":1}},{"not":{"matches":"r11"}}]},"r1":{"has":{"has":{"any":[{"kind":"identifier","pattern":"$PREV"},{"has":{"kind":"identifier","pattern":"$PREV"},"kind":"namespace_import"},{"has":{"all":[{"kind":"import_specifier"},{"matches":"r10"},{"has":{"kind":"identifier","not":{"precedes":{"regex":"^as$"}},"pattern":"$PREV"}}]},"kind":"named_imports"}]},"kind":"import_clause"}},"r2":{"has":{"has":{"any":[{"kind":"identifier","pattern":"$CUR"},{"has":{"kind":"identifier","pattern":"$CUR"},"kind":"namespace_import"},{"has":{"all":[{"kind":"import_specifier"},{"matches":"r10"},{"has":{"kind":"identifier","not":{"precedes":{"regex":"^as$"}},"pattern":"$CUR"}}]},"kind":"named_imports"}]},"kind":"import_clause"}},"r3":{"not":{"layout":{"before":{"breaks":{"min":2},"to":"capture.PD"}}}},"r4":{"follows":{"kind":"import_statement","matches":"syntax-single","pattern":"$PD","stopBy":{"kind":"import_statement"}}},"r5":{"follows":{"kind":"import_statement","matches":"syntax-multiple","stopBy":{"kind":"import_statement"}}},"r6":{"follows":{"kind":"import_statement","matches":"syntax-single","stopBy":{"kind":"import_statement"}}},"r7":{"follows":{"kind":"import_statement","matches":"syntax-none","stopBy":{"kind":"import_statement"}}},"r8":{"follows":{"kind":"import_statement","matches":"syntax-all","stopBy":{"kind":"import_statement"}}},"r9":{"follows":{"kind":"import_statement","matches":"syntax-multiple","pattern":"$PD","stopBy":{"kind":"import_statement"}}},"r10":{"not":{"follows":{"kind":"import_specifier","stopBy":"end"}}},"r11":{"has":{"kind":"namespace_import","stopBy":"end"}}}}},{"id":"syntax-all-before-single","forbid":{"ast":{"language":"typescript","rule":{"all":[{"kind":"import_statement"},{"matches":"syntax-all"},{"$option":"allowSeparatedGroups","cases":{"true":[]},"default":[{"matches":"r6"}],"spread":true},{"$option":"allowSeparatedGroups","cases":{"true":[{"matches":"r4"}]},"default":[],"spread":true},{"$option":"allowSeparatedGroups","cases":{"true":[{"matches":"r3"}]},"default":[],"spread":true}]},"when":{"option":{"ignoreDeclarationSort":null,"memberSyntaxSortOrder":{"in":[null,["all","single","multiple","none"]]}}}}},"violation":{"anchor":"witness.span","code":"sort-imports","message":"Expected 'all' syntax before 'single' syntax.","suppress":{"eslint":{"rules":["sort-imports"]},"oxlint":{"rules":["sort-imports"]}}}},{"id":"syntax-all-before-multiple","forbid":{"ast":{"language":"typescript","rule":{"all":[{"kind":"import_statement"},{"matches":"syntax-all"},{"$option":"allowSeparatedGroups","cases":{"true":[]},"default":[{"matches":"r5"}],"spread":true},{"$option":"allowSeparatedGroups","cases":{"true":[{"matches":"r9"}]},"default":[],"spread":true},{"$option":"allowSeparatedGroups","cases":{"true":[{"matches":"r3"}]},"default":[],"spread":true}]},"when":{"option":{"ignoreDeclarationSort":null,"memberSyntaxSortOrder":{"in":[null,["all","single","multiple","none"]]}}}}},"violation":{"anchor":"witness.span","code":"sort-imports","message":"Expected 'all' syntax before 'multiple' syntax.","suppress":{"eslint":{"rules":["sort-imports"]},"oxlint":{"rules":["sort-imports"]}}}},{"id":"syntax-all-before-none","forbid":{"ast":{"language":"typescript","rule":{"all":[{"kind":"import_statement"},{"matches":"syntax-all"},{"matches":"r7"}]},"when":{"option":{"memberSyntaxSortOrder":["all","single","multiple","none"]}}}},"violation":{"anchor":"witness.span","code":"sort-imports","message":"Expected 'all' syntax before 'none' syntax.","suppress":{"eslint":{"rules":["sort-imports"]},"oxlint":{"rules":["sort-imports"]}}}},{"id":"syntax-single-before-multiple","forbid":{"ast":{"language":"typescript","rule":{"all":[{"kind":"import_statement"},{"matches":"syntax-single"},{"matches":"r5"}]},"when":{"option":{"memberSyntaxSortOrder":{"in":[["single","multiple","none","all"],["all","single","multiple","none"]]}}}}},"violation":{"anchor":"witness.span","code":"sort-imports","message":"Expected 'single' syntax before 'multiple' syntax.","suppress":{"eslint":{"rules":["sort-imports"]},"oxlint":{"rules":["sort-imports"]}}}},{"id":"syntax-single-before-none","forbid":{"ast":{"language":"typescript","rule":{"all":[{"kind":"import_statement"},{"matches":"syntax-single"},{"matches":"r7"}]},"when":{"option":{"memberSyntaxSortOrder":{"in":[["single","multiple","none","all"],["all","single","multiple","none"]]}}}}},"violation":{"anchor":"witness.span","code":"sort-imports","message":"Expected 'single' syntax before 'none' syntax.","suppress":{"eslint":{"rules":["sort-imports"]},"oxlint":{"rules":["sort-imports"]}}}},{"id":"syntax-single-before-all","forbid":{"ast":{"language":"typescript","rule":{"all":[{"kind":"import_statement"},{"matches":"syntax-single"},{"matches":"r8"}]},"when":{"option":{"memberSyntaxSortOrder":["single","multiple","none","all"]}}}},"violation":{"anchor":"witness.span","code":"sort-imports","message":"Expected 'single' syntax before 'all' syntax.","suppress":{"eslint":{"rules":["sort-imports"]},"oxlint":{"rules":["sort-imports"]}}}},{"id":"syntax-multiple-before-none","forbid":{"ast":{"language":"typescript","rule":{"all":[{"kind":"import_statement"},{"matches":"syntax-multiple"},{"matches":"r7"}]},"when":{"option":{"memberSyntaxSortOrder":{"in":[["single","multiple","none","all"],["all","single","multiple","none"]]}}}}},"violation":{"anchor":"witness.span","code":"sort-imports","message":"Expected 'multiple' syntax before 'none' syntax.","suppress":{"eslint":{"rules":["sort-imports"]},"oxlint":{"rules":["sort-imports"]}}}},{"id":"syntax-multiple-before-all","forbid":{"ast":{"language":"typescript","rule":{"all":[{"kind":"import_statement"},{"matches":"syntax-multiple"},{"matches":"r8"}]},"when":{"option":{"memberSyntaxSortOrder":["single","multiple","none","all"]}}}},"violation":{"anchor":"witness.span","code":"sort-imports","message":"Expected 'multiple' syntax before 'all' syntax.","suppress":{"eslint":{"rules":["sort-imports"]},"oxlint":{"rules":["sort-imports"]}}}},{"id":"syntax-none-before-all","forbid":{"ast":{"language":"typescript","rule":{"all":[{"kind":"import_statement"},{"matches":"syntax-none"},{"$option":"allowSeparatedGroups","cases":{"true":[]},"default":[{"matches":"r8"}],"spread":true},{"$option":"allowSeparatedGroups","cases":{"true":[{"follows":{"matches":"syntax-all","kind":"import_statement","stopBy":{"kind":"import_statement"},"pattern":"$PD"}}]},"default":[],"spread":true},{"$option":"allowSeparatedGroups","cases":{"true":[{"matches":"r3"}]},"default":[],"spread":true}]},"when":{"option":{"ignoreDeclarationSort":null,"memberSyntaxSortOrder":{"in":[null,["single","multiple","none","all"]]}}}}},"violation":{"anchor":"witness.span","code":"sort-imports","message":"Expected 'none' syntax before 'all' syntax.","suppress":{"eslint":{"rules":["sort-imports"]},"oxlint":{"rules":["sort-imports"]}}}},{"id":"syntax-none-before-multiple","forbid":{"ast":{"language":"typescript","rule":{"all":[{"kind":"import_statement"},{"matches":"syntax-none"},{"$option":"allowSeparatedGroups","cases":{"true":[]},"default":[{"matches":"r5"}],"spread":true},{"$option":"allowSeparatedGroups","cases":{"true":[{"matches":"r9"}]},"default":[],"spread":true},{"$option":"allowSeparatedGroups","cases":{"true":[{"matches":"r3"}]},"default":[],"spread":true}]},"when":{"option":{"memberSyntaxSortOrder":null,"ignoreDeclarationSort":null}}}},"violation":{"anchor":"witness.span","code":"sort-imports","message":"Expected 'none' syntax before 'multiple' syntax.","suppress":{"eslint":{"rules":["sort-imports"]},"oxlint":{"rules":["sort-imports"]}}}},{"id":"syntax-none-before-single","forbid":{"ast":{"language":"typescript","rule":{"all":[{"kind":"import_statement"},{"matches":"syntax-none"},{"$option":"allowSeparatedGroups","cases":{"true":[]},"default":[{"matches":"r6"}],"spread":true},{"$option":"allowSeparatedGroups","cases":{"true":[{"matches":"r4"}]},"default":[],"spread":true},{"$option":"allowSeparatedGroups","cases":{"true":[{"matches":"r3"}]},"default":[],"spread":true}]},"when":{"option":{"memberSyntaxSortOrder":null,"ignoreDeclarationSort":null}}}},"violation":{"anchor":"witness.span","code":"sort-imports","message":"Expected 'none' syntax before 'single' syntax.","suppress":{"eslint":{"rules":["sort-imports"]},"oxlint":{"rules":["sort-imports"]}}}},{"id":"syntax-multiple-before-single","forbid":{"ast":{"language":"typescript","rule":{"all":[{"kind":"import_statement"},{"matches":"syntax-multiple"},{"$option":"allowSeparatedGroups","cases":{"true":[]},"default":[{"matches":"r6"}],"spread":true},{"$option":"allowSeparatedGroups","cases":{"true":[{"matches":"r4"}]},"default":[],"spread":true},{"$option":"allowSeparatedGroups","cases":{"true":[{"matches":"r3"}]},"default":[],"spread":true}]},"when":{"option":{"memberSyntaxSortOrder":null,"ignoreDeclarationSort":null}}}},"violation":{"anchor":"witness.span","code":"sort-imports","message":"Expected 'multiple' syntax before 'single' syntax.","suppress":{"eslint":{"rules":["sort-imports"]},"oxlint":{"rules":["sort-imports"]}}}},{"id":"alphabetical-all","forbid":{"ast":{"language":"typescript","rule":{"all":[{"kind":"import_statement"},{"matches":"syntax-all"},{"matches":"r2"},{"$option":"allowSeparatedGroups","cases":{"true":[]},"default":[{"follows":{"all":[{"matches":"syntax-all"},{"matches":"r1"}],"compare":{"$option":"ignoreCase","cases":{"true":{"left":"CUR","op":"lt","right":"PREV","collation":"fold-lower"}},"default":{"left":"CUR","op":"lt","right":"PREV"}},"kind":"import_statement","stopBy":{"kind":"import_statement"}}}],"spread":true},{"$option":"allowSeparatedGroups","cases":{"true":[{"follows":{"all":[{"matches":"syntax-all"},{"matches":"r1"}],"compare":{"left":"CUR","op":"lt","right":"PREV"},"kind":"import_statement","stopBy":{"kind":"import_statement"},"pattern":"$PD"}}]},"default":[],"spread":true},{"$option":"allowSeparatedGroups","cases":{"true":[{"matches":"r3"}]},"default":[],"spread":true}]},"when":{"option":{"ignoreDeclarationSort":null}}}},"violation":{"anchor":"witness.span","code":"sort-imports","message":"Imports should be sorted alphabetically.","suppress":{"eslint":{"rules":["sort-imports"]},"oxlint":{"rules":["sort-imports"]}}}},{"id":"alphabetical-single","forbid":{"ast":{"language":"typescript","rule":{"all":[{"kind":"import_statement"},{"matches":"syntax-single"},{"matches":"r2"},{"$option":"allowSeparatedGroups","cases":{"true":[]},"default":[{"follows":{"all":[{"matches":"syntax-single"},{"matches":"r1"}],"compare":{"$option":"ignoreCase","cases":{"true":{"left":"CUR","op":"lt","right":"PREV","collation":"fold-lower"}},"default":{"left":"CUR","op":"lt","right":"PREV"}},"kind":"import_statement","stopBy":{"kind":"import_statement"}}}],"spread":true},{"$option":"allowSeparatedGroups","cases":{"true":[{"follows":{"all":[{"matches":"syntax-single"},{"matches":"r1"}],"compare":{"left":"CUR","op":"lt","right":"PREV"},"kind":"import_statement","stopBy":{"kind":"import_statement"},"pattern":"$PD"}}]},"default":[],"spread":true},{"$option":"allowSeparatedGroups","cases":{"true":[{"matches":"r3"}]},"default":[],"spread":true}]},"when":{"option":{"ignoreDeclarationSort":null}}}},"violation":{"anchor":"witness.span","code":"sort-imports","message":"Imports should be sorted alphabetically.","suppress":{"eslint":{"rules":["sort-imports"]},"oxlint":{"rules":["sort-imports"]}}}},{"id":"alphabetical-multiple","forbid":{"ast":{"language":"typescript","rule":{"all":[{"kind":"import_statement"},{"matches":"syntax-multiple"},{"matches":"r2"},{"$option":"allowSeparatedGroups","cases":{"true":[]},"default":[{"follows":{"all":[{"matches":"syntax-multiple"},{"matches":"r1"}],"compare":{"$option":"ignoreCase","cases":{"true":{"left":"CUR","op":"lt","right":"PREV","collation":"fold-lower"}},"default":{"left":"CUR","op":"lt","right":"PREV"}},"kind":"import_statement","stopBy":{"kind":"import_statement"}}}],"spread":true},{"$option":"allowSeparatedGroups","cases":{"true":[{"follows":{"all":[{"matches":"syntax-multiple"},{"matches":"r1"}],"compare":{"left":"CUR","op":"lt","right":"PREV"},"kind":"import_statement","stopBy":{"kind":"import_statement"},"pattern":"$PD"}}]},"default":[],"spread":true},{"$option":"allowSeparatedGroups","cases":{"true":[{"matches":"r3"}]},"default":[],"spread":true}]},"when":{"option":{"ignoreDeclarationSort":null}}}},"violation":{"anchor":"witness.span","code":"sort-imports","message":"Imports should be sorted alphabetically.","suppress":{"eslint":{"rules":["sort-imports"]},"oxlint":{"rules":["sort-imports"]}}}},{"id":"member-order","forbid":{"ast":{"language":"typescript","rule":{"all":[{"all":[{"kind":"import_specifier"},{"has":{"kind":"identifier","pattern":"$M","not":{"precedes":{"regex":"^as$"}}}},{"follows":{"all":[{"kind":"import_specifier"},{"has":{"kind":"identifier","pattern":"$PM","not":{"precedes":{"regex":"^as$"}}}}],"stopBy":{"kind":"import_specifier"},"compare":{"$option":"ignoreCase","cases":{"true":{"left":"M","op":"lt","right":"PM","collation":"fold-lower"}},"default":{"left":"M","op":"lt","right":"PM"}}}}]},{"not":{"matches":"earlier-unsorted"}}]},"utils":{"earlier-unsorted":{"follows":{"all":[{"kind":"import_specifier"},{"has":{"kind":"identifier","pattern":"$M2","not":{"precedes":{"regex":"^as$"}}}},{"follows":{"all":[{"kind":"import_specifier"},{"has":{"kind":"identifier","pattern":"$PM2","not":{"precedes":{"regex":"^as$"}}}}],"stopBy":{"kind":"import_specifier"},"compare":{"$option":"ignoreCase","cases":{"true":{"left":"M2","op":"lt","right":"PM2","collation":"fold-lower"}},"default":{"left":"M2","op":"lt","right":"PM2"}}}}],"stopBy":"end"}}},"when":{"option":{"ignoreMemberSort":null}}}},"violation":{"anchor":"witness.span","code":"sort-imports","message":"Member '$M' of the import declaration should be sorted alphabetically.","suppress":{"eslint":{"rules":["sort-imports"]},"oxlint":{"rules":["sort-imports"]}}}}]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"format":"rerail.policy/v1","id":"eslint-sort-keys","revision":3,"mode":"steer","description":"Port of ESLint's `sort-keys` rule (default options: asc, case-sensitive, minKeys 2). Compares each object key with the previous named key (a spread resets) using `compare` (static key names; a computed identifier key by its name). 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},"allowLineSeparatedGroups":{"type":"boolean","nullable":true,"default":null},"caseSensitive":{"type":"boolean","nullable":true,"default":null},"natural":{"type":"boolean","nullable":true,"default":null},"ignoreComputedKeys":{"type":"boolean","nullable":true,"default":null},"minKeys":{"type":"integer","nullable":true,"default":null}}}},{"id":"shared","define":{"language":"typescript","utils":{"r1":{"any":[{"kind":"property_identifier"},{"kind":"string"},{"kind":"number"}]},"r2":{"has":{"kind":"computed_property_name","stopBy":"neighbor"}},"r3":{"any":[{"kind":"formal_parameters"},{"kind":"type_parameters"}]},"r4":{"layout":{"before":{"blank":{"min":1},"to":"sibling"}}}}}},{"id":"sort-keys","forbid":{"ast":{"language":"typescript","utils":{"this-key":{"any":[{"kind":"pair","has":{"stopBy":"neighbor","precedes":{"regex":"^:$"},"any":[{"all":[{"matches":"r1"},{"pattern":"$THIS"}]},{"$option":"ignoreComputedKeys","cases":{"true":[]},"default":[{"kind":"computed_property_name","has":{"stopBy":"neighbor","all":[{"matches":"static-computed-key"},{"pattern":"$THIS"}]}}],"spread":true}]}},{"kind":"method_definition","has":{"stopBy":"neighbor","precedes":{"matches":"r3"},"any":[{"all":[{"matches":"r1"},{"pattern":"$THIS"}]},{"$option":"ignoreComputedKeys","cases":{"true":[]},"default":[{"kind":"computed_property_name","has":{"stopBy":"neighbor","all":[{"matches":"static-computed-key"},{"pattern":"$THIS"}]}}],"spread":true}]}},{"kind":"shorthand_property_identifier","pattern":"$THIS"}]},"prev-key":{"any":[{"kind":"pair","has":{"stopBy":"neighbor","precedes":{"regex":"^:$"},"any":[{"all":[{"matches":"r1"},{"pattern":"$PREV"}]},{"$option":"ignoreComputedKeys","cases":{"true":[]},"default":[{"kind":"computed_property_name","has":{"stopBy":"neighbor","all":[{"matches":"static-computed-key"},{"pattern":"$PREV"}]}}],"spread":true}]}},{"kind":"method_definition","has":{"stopBy":"neighbor","precedes":{"matches":"r3"},"any":[{"all":[{"matches":"r1"},{"pattern":"$PREV"}]},{"$option":"ignoreComputedKeys","cases":{"true":[]},"default":[{"kind":"computed_property_name","has":{"stopBy":"neighbor","all":[{"matches":"static-computed-key"},{"pattern":"$PREV"}]}}],"spread":true}]}},{"kind":"shorthand_property_identifier","pattern":"$PREV"}]},"property":{"any":[{"kind":"pair"},{"kind":"method_definition"},{"kind":"shorthand_property_identifier"}]},"named":{"all":[{"matches":"property"},{"$option":"ignoreComputedKeys","cases":{"true":{"not":{"matches":"r2"}}},"default":{"any":[{"not":{"matches":"r2"}},{"has":{"stopBy":"neighbor","kind":"computed_property_name","has":{"stopBy":"neighbor","matches":"static-computed-key"}}}]}}]},"static-computed-key":{"any":[{"kind":"string"},{"kind":"number"},{"kind":"regex"},{"kind":"identifier"},{"kind":"undefined"},{"kind":"false"},{"kind":"true"},{"kind":"null"},{"kind":"template_string","not":{"has":{"kind":"template_substitution"}}}]},"reset":{"any":[{"kind":"spread_element"},{"$option":"ignoreComputedKeys","cases":{"true":[{"all":[{"matches":"property"},{"matches":"r2"}]}]},"default":[],"spread":true}]},"ident-key":{"has":{"stopBy":"neighbor","kind":"computed_property_name","has":{"stopBy":"neighbor","any":[{"kind":"identifier"},{"kind":"undefined"}]}}}},"rule":{"all":[{"$option":"minKeys","cases":{"4":[{"inside":{"kind":"object","stopBy":"neighbor","count":{"has":{"stopBy":"neighbor","any":[{"matches":"property"},{"kind":"spread_element"}]},"min":{"$option":"minKeys","cases":{"null":4},"default":{"$option":"minKeys"}}}}}],"5":[{"inside":{"kind":"object","stopBy":"neighbor","count":{"has":{"stopBy":"neighbor","any":[{"matches":"property"},{"kind":"spread_element"}]},"min":{"$option":"minKeys","cases":{"null":4},"default":{"$option":"minKeys"}}}}}],"3":[{"inside":{"kind":"object","stopBy":"neighbor","count":{"has":{"stopBy":"neighbor","any":[{"matches":"property"},{"kind":"spread_element"}]},"min":{"$option":"minKeys","cases":{"null":4},"default":{"$option":"minKeys"}}}}}]},"default":[],"spread":true},{"matches":"named"},{"$option":"allowLineSeparatedGroups","cases":{"true":[{"not":{"matches":"r4"}}]},"default":[],"spread":true},{"$option":"allowLineSeparatedGroups","cases":{"true":[{"not":{"follows":{"stopBy":{"any":[{"matches":"named"},{"matches":"reset"}]},"all":[{"matches":"property"},{"not":{"matches":"named"}},{"matches":"r4"}]}}}]},"default":[],"spread":true},{"inside":{"kind":"object","stopBy":"neighbor"},"matches":"this-key","follows":{"stopBy":{"any":[{"matches":"named"},{"matches":"reset"}]},"all":[{"matches":"named"},{"matches":"prev-key"},{"pattern":"$PP"}]},"pattern":"$TP"},{"any":[{"not":{"matches":"ident-key"},"follows":{"stopBy":{"any":[{"matches":"named"},{"matches":"reset"}]},"all":[{"matches":"named"},{"not":{"matches":"ident-key"}}]},"compare":{"left":"PP","op":{"$option":"option","cases":{"desc":"lt"},"default":"gt"},"right":"TP","collation":{"$option":"caseSensitive","cases":{"false":{"$option":"natural","cases":{"true":"natural-fold-lower"},"default":"fold-lower"}},"default":{"$option":"natural","cases":{"true":"natural"},"default":"ordinal"}},"text":"key"}},{"any":[{"matches":"ident-key"},{"follows":{"stopBy":{"any":[{"matches":"named"},{"matches":"reset"}]},"all":[{"matches":"named"},{"matches":"ident-key"}]}}],"compare":{"left":"PREV","op":{"$option":"option","cases":{"desc":"lt"},"default":"gt"},"right":"THIS","collation":{"$option":"caseSensitive","cases":{"false":{"$option":"natural","cases":{"true":"natural-fold-lower"},"default":"fold-lower"}},"default":{"$option":"natural","cases":{"true":"natural"},"default":"ordinal"}},"text":"unquoted"}}]}]},"transform":{"TN":{"substring":{"source":"$THIS","value":true}},"PN":{"substring":{"source":"$PREV","value":true}}}}},"violation":{"anchor":"capture.THIS","code":"sort-keys","message":{"$option":"caseSensitive","cases":{"false":{"$option":"option","cases":{"asc":{"$option":"natural","cases":{"true":"Expected object keys to be in natural insensitive ascending order. '$TN' should be before '$PN'."},"default":"Expected object keys to be in insensitive ascending order. '$TN' should be before '$PN'."}},"default":{"$option":"natural","cases":{"true":"Expected object keys to be in natural insensitive descending order. '$TN' should be before '$PN'."},"default":"Expected object keys to be in insensitive descending order. '$TN' should be before '$PN'."}}},"default":{"$option":"option","cases":{"desc":{"$option":"natural","cases":{"true":"Expected object keys to be in natural descending order. '$TN' should be before '$PN'."},"default":"Expected object keys to be in descending order. '$TN' should be before '$PN'."}},"default":{"$option":"natural","cases":{"true":"Expected object keys to be in natural ascending order. '$TN' should be before '$PN'."},"default":"Expected object keys to be in ascending order. '$TN' should be before '$PN'."}}},"suppress":{"eslint":{"rules":["sort-keys"]},"oxlint":{"rules":["sort-keys"]}}}}]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"format":"rerail.policy/v1","id":"eslint-sort-vars","revision":3,"mode":"steer","description":"Port of ESLint's `sort-vars` (https://eslint.org/docs/latest/rules/sort-vars): flags an identifier declarator when an earlier identifier declarator of the same declaration sorts after it. ESLint's sorting autofix is not reproduced. 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":{"ignoreCase":{"type":"boolean","nullable":true,"default":null}}}},{"id":"sort-vars","forbid":{"ast":{"language":"typescript","rule":{"kind":"variable_declarator","all":[{"has":{"stopBy":"neighbor","kind":"identifier","pattern":"$NAME","not":{"follows":{"stopBy":"neighbor","regex":"^=$"}}}},{"follows":{"stopBy":"end","kind":"variable_declarator","has":{"stopBy":"neighbor","kind":"identifier","pattern":"$PREV","not":{"follows":{"stopBy":"neighbor","regex":"^=$"}},"compare":{"left":"PREV","op":"gt","right":"NAME","collation":{"$option":"ignoreCase","cases":{"true":"fold-lower"},"default":"ordinal"}}}}}]}}},"violation":{"anchor":"witness.span","code":"sort-vars","message":"Variables within the same declaration block should be sorted alphabetically.","suppress":{"eslint":{"rules":["sort-vars"]},"oxlint":{"rules":["sort-vars"]}}}}]}
|