@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,295 @@
|
|
|
1
|
+
{
|
|
2
|
+
"format": "rerail.policy/v1",
|
|
3
|
+
"id": "eslint-no-dupe-keys",
|
|
4
|
+
"revision": 6,
|
|
5
|
+
"mode": "steer",
|
|
6
|
+
"description": "ESLint 10.11.0 no-dupe-keys, default options. Port of ESLint's `no-dupe-keys` rule (https://eslint.org/docs/latest/rules/no-dupe-keys). Flags an object-literal property whose static key (ESLint's getStaticPropertyName, via `compare` text `key`) repeats an earlier property of the same object; a getter may pair with a setter, and a non-computed `__proto__: value` is not a key.",
|
|
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": "duplicate-key",
|
|
23
|
+
"forbid": {
|
|
24
|
+
"ast": {
|
|
25
|
+
"language": "typescript",
|
|
26
|
+
"rule": {
|
|
27
|
+
"all": [
|
|
28
|
+
{
|
|
29
|
+
"matches": "cand"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"pattern": "$P"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"any": [
|
|
36
|
+
{
|
|
37
|
+
"kind": "shorthand_property_identifier",
|
|
38
|
+
"pattern": "$K"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"has": {
|
|
42
|
+
"stopBy": "neighbor",
|
|
43
|
+
"matches": "key",
|
|
44
|
+
"not": {
|
|
45
|
+
"kind": "computed_property_name"
|
|
46
|
+
},
|
|
47
|
+
"pattern": "$K"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"has": {
|
|
52
|
+
"stopBy": "neighbor",
|
|
53
|
+
"matches": "key",
|
|
54
|
+
"kind": "computed_property_name",
|
|
55
|
+
"has": {
|
|
56
|
+
"stopBy": "neighbor",
|
|
57
|
+
"not": {
|
|
58
|
+
"regex": "^[\\[\\]]$"
|
|
59
|
+
},
|
|
60
|
+
"pattern": "$K"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"any": [
|
|
68
|
+
{
|
|
69
|
+
"all": [
|
|
70
|
+
{
|
|
71
|
+
"matches": "getter"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"count": {
|
|
75
|
+
"follows": {
|
|
76
|
+
"stopBy": "end",
|
|
77
|
+
"all": [
|
|
78
|
+
{
|
|
79
|
+
"matches": "cand"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"not": {
|
|
83
|
+
"matches": "setter"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
"pattern": "$Q",
|
|
88
|
+
"compare": {
|
|
89
|
+
"left": "Q",
|
|
90
|
+
"op": "eq",
|
|
91
|
+
"right": "P",
|
|
92
|
+
"text": "key"
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"min": 1
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
]
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"all": [
|
|
102
|
+
{
|
|
103
|
+
"matches": "setter"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"count": {
|
|
107
|
+
"follows": {
|
|
108
|
+
"stopBy": "end",
|
|
109
|
+
"all": [
|
|
110
|
+
{
|
|
111
|
+
"matches": "cand"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"not": {
|
|
115
|
+
"matches": "getter"
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
],
|
|
119
|
+
"pattern": "$Q",
|
|
120
|
+
"compare": {
|
|
121
|
+
"left": "Q",
|
|
122
|
+
"op": "eq",
|
|
123
|
+
"right": "P",
|
|
124
|
+
"text": "key"
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"min": 1
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
]
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"all": [
|
|
134
|
+
{
|
|
135
|
+
"not": {
|
|
136
|
+
"matches": "getter"
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"not": {
|
|
141
|
+
"matches": "setter"
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"count": {
|
|
146
|
+
"follows": {
|
|
147
|
+
"stopBy": "end",
|
|
148
|
+
"all": [
|
|
149
|
+
{
|
|
150
|
+
"matches": "cand"
|
|
151
|
+
}
|
|
152
|
+
],
|
|
153
|
+
"pattern": "$Q",
|
|
154
|
+
"compare": {
|
|
155
|
+
"left": "Q",
|
|
156
|
+
"op": "eq",
|
|
157
|
+
"right": "P",
|
|
158
|
+
"text": "key"
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
"min": 1
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
]
|
|
165
|
+
}
|
|
166
|
+
]
|
|
167
|
+
}
|
|
168
|
+
]
|
|
169
|
+
},
|
|
170
|
+
"utils": {
|
|
171
|
+
"cand": {
|
|
172
|
+
"all": [
|
|
173
|
+
{
|
|
174
|
+
"any": [
|
|
175
|
+
{
|
|
176
|
+
"kind": "pair"
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"kind": "method_definition"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"kind": "shorthand_property_identifier"
|
|
183
|
+
}
|
|
184
|
+
]
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"inside": {
|
|
188
|
+
"kind": "object",
|
|
189
|
+
"stopBy": "neighbor"
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"not": {
|
|
194
|
+
"matches": "proto"
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
]
|
|
198
|
+
},
|
|
199
|
+
"getter": {
|
|
200
|
+
"kind": "method_definition",
|
|
201
|
+
"has": {
|
|
202
|
+
"stopBy": "neighbor",
|
|
203
|
+
"regex": "^get$",
|
|
204
|
+
"not": {
|
|
205
|
+
"kind": "property_identifier"
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
"setter": {
|
|
210
|
+
"kind": "method_definition",
|
|
211
|
+
"has": {
|
|
212
|
+
"stopBy": "neighbor",
|
|
213
|
+
"regex": "^set$",
|
|
214
|
+
"not": {
|
|
215
|
+
"kind": "property_identifier"
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
"key": {
|
|
220
|
+
"any": [
|
|
221
|
+
{
|
|
222
|
+
"kind": "property_identifier"
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
"kind": "string"
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"kind": "number"
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
"kind": "computed_property_name"
|
|
232
|
+
}
|
|
233
|
+
],
|
|
234
|
+
"not": {
|
|
235
|
+
"follows": {
|
|
236
|
+
"stopBy": "end",
|
|
237
|
+
"regex": "^:$"
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
"proto": {
|
|
242
|
+
"kind": "pair",
|
|
243
|
+
"has": {
|
|
244
|
+
"stopBy": "neighbor",
|
|
245
|
+
"matches": "key",
|
|
246
|
+
"any": [
|
|
247
|
+
{
|
|
248
|
+
"kind": "property_identifier",
|
|
249
|
+
"regex": "^__proto__$"
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"kind": "string",
|
|
253
|
+
"value": {
|
|
254
|
+
"eq": "__proto__"
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
]
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
"transform": {
|
|
262
|
+
"KT": {
|
|
263
|
+
"substring": {
|
|
264
|
+
"source": "$K",
|
|
265
|
+
"value": true
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
"violation": {
|
|
272
|
+
"anchor": "capture.K",
|
|
273
|
+
"code": "no-dupe-keys",
|
|
274
|
+
"message": "Duplicate key '$KT'.",
|
|
275
|
+
"suppress": {
|
|
276
|
+
"eslint": {
|
|
277
|
+
"rules": [
|
|
278
|
+
"no-dupe-keys"
|
|
279
|
+
]
|
|
280
|
+
},
|
|
281
|
+
"oxlint": {
|
|
282
|
+
"rules": [
|
|
283
|
+
"no-dupe-keys"
|
|
284
|
+
]
|
|
285
|
+
},
|
|
286
|
+
"biome": {
|
|
287
|
+
"rules": [
|
|
288
|
+
"lint/suspicious/noDuplicateObjectKeys"
|
|
289
|
+
]
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
]
|
|
295
|
+
}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
{
|
|
2
|
+
"format": "rerail.policy/v1",
|
|
3
|
+
"id": "eslint-no-duplicate-case",
|
|
4
|
+
"revision": 4,
|
|
5
|
+
"mode": "steer",
|
|
6
|
+
"description": "ESLint 10.11.0 no-duplicate-case, default options. Port of ESLint's `no-duplicate-case` rule (https://eslint.org/docs/latest/rules/no-duplicate-case). Reports a case whose test (inside any parentheses) is token-equal (ESLint's equalTokens, via `compare` text `tokens`) to an earlier case of the same switch.",
|
|
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": "duplicate-case",
|
|
23
|
+
"forbid": {
|
|
24
|
+
"ast": {
|
|
25
|
+
"language": "typescript",
|
|
26
|
+
"rule": {
|
|
27
|
+
"kind": "switch_case",
|
|
28
|
+
"all": [
|
|
29
|
+
{
|
|
30
|
+
"has": {
|
|
31
|
+
"stopBy": "neighbor",
|
|
32
|
+
"not": {
|
|
33
|
+
"kind": "comment"
|
|
34
|
+
},
|
|
35
|
+
"matches": "t",
|
|
36
|
+
"precedes": {
|
|
37
|
+
"regex": "^:$",
|
|
38
|
+
"stopBy": "end"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"count": {
|
|
44
|
+
"follows": {
|
|
45
|
+
"stopBy": "end",
|
|
46
|
+
"kind": "switch_case",
|
|
47
|
+
"all": [
|
|
48
|
+
{
|
|
49
|
+
"has": {
|
|
50
|
+
"stopBy": "neighbor",
|
|
51
|
+
"not": {
|
|
52
|
+
"kind": "comment"
|
|
53
|
+
},
|
|
54
|
+
"matches": "u",
|
|
55
|
+
"precedes": {
|
|
56
|
+
"regex": "^:$",
|
|
57
|
+
"stopBy": "end"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
],
|
|
62
|
+
"compare": {
|
|
63
|
+
"left": "U",
|
|
64
|
+
"op": "eq",
|
|
65
|
+
"right": "T",
|
|
66
|
+
"text": "tokens"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"min": 1
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
"utils": {
|
|
75
|
+
"t": {
|
|
76
|
+
"any": [
|
|
77
|
+
{
|
|
78
|
+
"not": {
|
|
79
|
+
"kind": "parenthesized_expression"
|
|
80
|
+
},
|
|
81
|
+
"pattern": "$T"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"kind": "parenthesized_expression",
|
|
85
|
+
"has": {
|
|
86
|
+
"stopBy": "neighbor",
|
|
87
|
+
"all": [
|
|
88
|
+
{
|
|
89
|
+
"not": {
|
|
90
|
+
"kind": "comment"
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"not": {
|
|
95
|
+
"regex": "^[()]$"
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
],
|
|
99
|
+
"matches": "t"
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
"u": {
|
|
105
|
+
"any": [
|
|
106
|
+
{
|
|
107
|
+
"not": {
|
|
108
|
+
"kind": "parenthesized_expression"
|
|
109
|
+
},
|
|
110
|
+
"pattern": "$U"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"kind": "parenthesized_expression",
|
|
114
|
+
"has": {
|
|
115
|
+
"stopBy": "neighbor",
|
|
116
|
+
"all": [
|
|
117
|
+
{
|
|
118
|
+
"not": {
|
|
119
|
+
"kind": "comment"
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"not": {
|
|
124
|
+
"regex": "^[()]$"
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
],
|
|
128
|
+
"matches": "u"
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
]
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
"violation": {
|
|
137
|
+
"anchor": "witness.span",
|
|
138
|
+
"code": "no-duplicate-case",
|
|
139
|
+
"message": "Duplicate case label.",
|
|
140
|
+
"suppress": {
|
|
141
|
+
"eslint": {
|
|
142
|
+
"rules": [
|
|
143
|
+
"no-duplicate-case"
|
|
144
|
+
]
|
|
145
|
+
},
|
|
146
|
+
"oxlint": {
|
|
147
|
+
"rules": [
|
|
148
|
+
"no-duplicate-case"
|
|
149
|
+
]
|
|
150
|
+
},
|
|
151
|
+
"biome": {
|
|
152
|
+
"rules": [
|
|
153
|
+
"lint/suspicious/noDuplicateCase"
|
|
154
|
+
]
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
]
|
|
160
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"format":"rerail.policy/v1","id":"eslint-no-empty-pattern","revision":4,"mode":"steer","description":"Port of ESLint's `no-empty-pattern` rule (https://eslint.org/docs/latest/rules/no-empty-pattern). Flags empty object and array destructuring patterns. 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":{"allowObjectPatternsAsParameters":{"type":"boolean","nullable":true,"default":null}}}},{"id":"shared","define":{"language":"typescript","utils":{"r1":{"has":{"all":[{"not":{"kind":"comment"}},{"not":{"regex":"^[{}]$"}}]}},"r2":{"kind":"object_pattern","not":{"matches":"r1"}}}}},{"id":"empty-object-pattern","forbid":{"ast":{"language":"typescript","rule":{"$option":"allowObjectPatternsAsParameters","cases":{"true":{"all":[{"matches":"r2"},{"not":{"inside":{"stopBy":"neighbor","all":[{"any":[{"kind":"required_parameter"},{"kind":"optional_parameter"}]},{"any":[{"not":{"has":{"regex":"^=$"}}},{"has":{"kind":"object","not":{"matches":"r1"}}}]}]}}}]}},"default":{"matches":"r2"}}}},"violation":{"anchor":"witness.span","code":"no-empty-pattern","message":"Unexpected empty object pattern.","suppress":{"eslint":{"rules":["no-empty-pattern"]},"oxlint":{"rules":["no-empty-pattern"]},"biome":{"rules":["lint/correctness/noEmptyPattern"]}}}},{"id":"empty-array-pattern","forbid":{"ast":{"language":"typescript","rule":{"kind":"array_pattern","not":{"has":{"all":[{"not":{"kind":"comment"}},{"not":{"regex":"^[\\[\\]]$"}}]}}}}},"violation":{"anchor":"witness.span","code":"no-empty-pattern","message":"Unexpected empty array pattern.","suppress":{"eslint":{"rules":["no-empty-pattern"]},"oxlint":{"rules":["no-empty-pattern"]},"biome":{"rules":["lint/correctness/noEmptyPattern"]}}}}]}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"format": "rerail.policy/v1",
|
|
3
|
+
"id": "eslint-no-empty-static-block",
|
|
4
|
+
"revision": 3,
|
|
5
|
+
"mode": "steer",
|
|
6
|
+
"description": "Port of ESLint's `no-empty-static-block` rule (https://eslint.org/docs/latest/rules/no-empty-static-block). Reports a class static block with no statements and no comment inside its braces (a trailing comment the grammar attaches after the closing brace does not count).",
|
|
7
|
+
"scope": {
|
|
8
|
+
"include": [
|
|
9
|
+
"**/*"
|
|
10
|
+
],
|
|
11
|
+
"exclude": []
|
|
12
|
+
},
|
|
13
|
+
"clauses": [
|
|
14
|
+
{
|
|
15
|
+
"id": "empty-static-block",
|
|
16
|
+
"forbid": {
|
|
17
|
+
"ast": {
|
|
18
|
+
"language": "typescript",
|
|
19
|
+
"rule": {
|
|
20
|
+
"kind": "statement_block",
|
|
21
|
+
"inside": {
|
|
22
|
+
"kind": "class_static_block",
|
|
23
|
+
"stopBy": "neighbor"
|
|
24
|
+
},
|
|
25
|
+
"not": {
|
|
26
|
+
"has": {
|
|
27
|
+
"stopBy": "neighbor",
|
|
28
|
+
"not": {
|
|
29
|
+
"regex": "^[{}]$"
|
|
30
|
+
},
|
|
31
|
+
"precedes": {
|
|
32
|
+
"regex": "^}$",
|
|
33
|
+
"stopBy": "end"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"violation": {
|
|
41
|
+
"anchor": "witness.span",
|
|
42
|
+
"code": "no-empty-static-block",
|
|
43
|
+
"message": "Unexpected empty static block.",
|
|
44
|
+
"suppress": {
|
|
45
|
+
"eslint": {
|
|
46
|
+
"rules": [
|
|
47
|
+
"no-empty-static-block"
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
"oxlint": {
|
|
51
|
+
"rules": [
|
|
52
|
+
"no-empty-static-block"
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
"biome": {
|
|
56
|
+
"rules": [
|
|
57
|
+
"lint/suspicious/noEmptyBlockStatements"
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
}
|