@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,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"format": "rerail.policy/v1",
|
|
3
|
+
"id": "eslint-no-ternary",
|
|
4
|
+
"revision": 3,
|
|
5
|
+
"mode": "steer",
|
|
6
|
+
"description": "Port of ESLint's `no-ternary` rule (https://eslint.org/docs/latest/rules/no-ternary). Reports every conditional expression.",
|
|
7
|
+
"scope": {
|
|
8
|
+
"include": [
|
|
9
|
+
"**/*"
|
|
10
|
+
],
|
|
11
|
+
"exclude": []
|
|
12
|
+
},
|
|
13
|
+
"clauses": [
|
|
14
|
+
{
|
|
15
|
+
"id": "ternary",
|
|
16
|
+
"forbid": {
|
|
17
|
+
"ast": {
|
|
18
|
+
"language": "typescript",
|
|
19
|
+
"rule": {
|
|
20
|
+
"kind": "ternary_expression"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"violation": {
|
|
25
|
+
"anchor": "witness.span",
|
|
26
|
+
"code": "no-ternary",
|
|
27
|
+
"message": "Ternary operator used.",
|
|
28
|
+
"suppress": {
|
|
29
|
+
"eslint": {
|
|
30
|
+
"rules": [
|
|
31
|
+
"no-ternary"
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
"oxlint": {
|
|
35
|
+
"rules": [
|
|
36
|
+
"no-ternary"
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
"biome": {
|
|
40
|
+
"rules": [
|
|
41
|
+
"lint/style/noTernary"
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"format":"rerail.policy/v1","id":"eslint-no-unneeded-ternary","revision":4,"mode":"steer","description":"Port of ESLint's `no-unneeded-ternary` rule. Flags a conditional whose branches are both boolean literals, with ESLint's fixes (invert, coerce, or collapse). 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":{"defaultAssignment":{"type":"boolean","nullable":true,"default":null}}}},{"id":"shared","define":{"language":"typescript","utils":{"bool-lit":{"any":[{"kind":"true"},{"kind":"false"}]},"boolean-expression":{"any":[{"kind":"binary_expression","has":{"regex":"^(==|===|!=|!==|>|>=|<|<=|in|instanceof)$"}},{"kind":"unary_expression","has":{"regex":"^!$"}},{"kind":"parenthesized_expression","has":{"matches":"boolean-expression"}}]},"low-precedence":{"any":[{"kind":"sequence_expression"},{"kind":"assignment_expression"},{"kind":"augmented_assignment_expression"},{"kind":"arrow_function"},{"kind":"yield_expression"},{"kind":"ternary_expression"},{"kind":"binary_expression"}]},"or-operand-needs-parens":{"any":[{"kind":"sequence_expression"},{"kind":"assignment_expression"},{"kind":"augmented_assignment_expression"},{"kind":"arrow_function"},{"kind":"yield_expression"},{"kind":"ternary_expression"},{"kind":"binary_expression","has":{"regex":"^\\?\\?$"}}]},"same-identifier":{"any":[{"kind":"identifier","pattern":"$N"},{"kind":"parenthesized_expression","has":{"matches":"same-identifier"}}]},"r1":{"kind":"ternary_expression","pattern":"$T ? true : false"},"r2":{"kind":"ternary_expression","pattern":"$T ? false : true"},"r3":{"kind":"ternary_expression","pattern":"$T ? $B : $B"},"r4":{"kind":"ternary_expression","pattern":"$T ? $C : $A"}}}},{"id":"same-values-identifier-test","forbid":{"ast":{"language":"typescript","rule":{"matches":"r3"},"constraints":{"B":{"matches":"bool-lit"},"T":{"kind":"identifier"}}}},"violation":{"anchor":"witness.span","code":"no-unneeded-ternary","message":"Unnecessary use of boolean literals in conditional expression.","fix":"$B","suppress":{"eslint":{"rules":["no-unneeded-ternary"]},"oxlint":{"rules":["no-unneeded-ternary"]},"biome":{"rules":["lint/complexity/noUselessTernary"]}}}},{"id":"same-values","forbid":{"ast":{"language":"typescript","rule":{"matches":"r3"},"constraints":{"B":{"matches":"bool-lit"},"T":{"not":{"kind":"identifier"}}}}},"violation":{"anchor":"witness.span","code":"no-unneeded-ternary","message":"Unnecessary use of boolean literals in conditional expression.","suppress":{"eslint":{"rules":["no-unneeded-ternary"]},"oxlint":{"rules":["no-unneeded-ternary"]},"biome":{"rules":["lint/complexity/noUselessTernary"]}}}},{"id":"invert-strict-eq","forbid":{"ast":{"language":"typescript","rule":{"kind":"ternary_expression","pattern":"$L === $R ? false : true"}}},"violation":{"anchor":"witness.span","code":"no-unneeded-ternary","message":"Unnecessary use of boolean literals in conditional expression.","fix":"$L !== $R","suppress":{"eslint":{"rules":["no-unneeded-ternary"]},"oxlint":{"rules":["no-unneeded-ternary"]},"biome":{"rules":["lint/complexity/noUselessTernary"]}}}},{"id":"invert-strict-ne","forbid":{"ast":{"language":"typescript","rule":{"kind":"ternary_expression","pattern":"$L !== $R ? false : true"}}},"violation":{"anchor":"witness.span","code":"no-unneeded-ternary","message":"Unnecessary use of boolean literals in conditional expression.","fix":"$L === $R","suppress":{"eslint":{"rules":["no-unneeded-ternary"]},"oxlint":{"rules":["no-unneeded-ternary"]},"biome":{"rules":["lint/complexity/noUselessTernary"]}}}},{"id":"invert-eq","forbid":{"ast":{"language":"typescript","rule":{"kind":"ternary_expression","pattern":"$L == $R ? false : true"}}},"violation":{"anchor":"witness.span","code":"no-unneeded-ternary","message":"Unnecessary use of boolean literals in conditional expression.","fix":"$L != $R","suppress":{"eslint":{"rules":["no-unneeded-ternary"]},"oxlint":{"rules":["no-unneeded-ternary"]},"biome":{"rules":["lint/complexity/noUselessTernary"]}}}},{"id":"invert-ne","forbid":{"ast":{"language":"typescript","rule":{"kind":"ternary_expression","pattern":"$L != $R ? false : true"}}},"violation":{"anchor":"witness.span","code":"no-unneeded-ternary","message":"Unnecessary use of boolean literals in conditional expression.","fix":"$L == $R","suppress":{"eslint":{"rules":["no-unneeded-ternary"]},"oxlint":{"rules":["no-unneeded-ternary"]},"biome":{"rules":["lint/complexity/noUselessTernary"]}}}},{"id":"invert-low-precedence","forbid":{"ast":{"language":"typescript","rule":{"matches":"r2"},"utils":{"inverse-op":{"kind":"binary_expression","has":{"regex":"^(==|===|!=|!==)$"}}},"constraints":{"T":{"all":[{"matches":"low-precedence"},{"not":{"matches":"inverse-op"}}]}}}},"violation":{"anchor":"witness.span","code":"no-unneeded-ternary","message":"Unnecessary use of boolean literals in conditional expression.","fix":"!($T)","suppress":{"eslint":{"rules":["no-unneeded-ternary"]},"oxlint":{"rules":["no-unneeded-ternary"]},"biome":{"rules":["lint/complexity/noUselessTernary"]}}}},{"id":"invert","forbid":{"ast":{"language":"typescript","rule":{"matches":"r2"},"constraints":{"T":{"not":{"matches":"low-precedence"}}}}},"violation":{"anchor":"witness.span","code":"no-unneeded-ternary","message":"Unnecessary use of boolean literals in conditional expression.","fix":"!$T","suppress":{"eslint":{"rules":["no-unneeded-ternary"]},"oxlint":{"rules":["no-unneeded-ternary"]},"biome":{"rules":["lint/complexity/noUselessTernary"]}}}},{"id":"boolean-test","forbid":{"ast":{"language":"typescript","rule":{"matches":"r1"},"constraints":{"T":{"matches":"boolean-expression"}}}},"violation":{"anchor":"witness.span","code":"no-unneeded-ternary","message":"Unnecessary use of boolean literals in conditional expression.","fix":"$T","suppress":{"eslint":{"rules":["no-unneeded-ternary"]},"oxlint":{"rules":["no-unneeded-ternary"]},"biome":{"rules":["lint/complexity/noUselessTernary"]}}}},{"id":"coerce-low-precedence","forbid":{"ast":{"language":"typescript","rule":{"matches":"r1"},"constraints":{"T":{"all":[{"matches":"low-precedence"},{"not":{"matches":"boolean-expression"}}]}}}},"violation":{"anchor":"witness.span","code":"no-unneeded-ternary","message":"Unnecessary use of boolean literals in conditional expression.","fix":"!!($T)","suppress":{"eslint":{"rules":["no-unneeded-ternary"]},"oxlint":{"rules":["no-unneeded-ternary"]},"biome":{"rules":["lint/complexity/noUselessTernary"]}}}},{"id":"coerce","forbid":{"ast":{"language":"typescript","rule":{"matches":"r1"},"constraints":{"T":{"all":[{"not":{"matches":"low-precedence"}},{"not":{"matches":"boolean-expression"}}]}}}},"violation":{"anchor":"witness.span","code":"no-unneeded-ternary","message":"Unnecessary use of boolean literals in conditional expression.","fix":"!!$T","suppress":{"eslint":{"rules":["no-unneeded-ternary"]},"oxlint":{"rules":["no-unneeded-ternary"]},"biome":{"rules":["lint/complexity/noUselessTernary"]}}}},{"id":"default-assignment-parenthesize","forbid":{"ast":{"language":"typescript","rule":{"matches":"r4"},"constraints":{"T":{"matches":"same-identifier"},"C":{"matches":"same-identifier"},"A":{"matches":"or-operand-needs-parens"}},"when":{"option":{"defaultAssignment":false}}}},"violation":{"anchor":"witness.span","code":"no-unneeded-ternary","message":"Unnecessary use of conditional expression for default assignment.","fix":"$T || ($A)","suppress":{"eslint":{"rules":["no-unneeded-ternary"]},"oxlint":{"rules":["no-unneeded-ternary"]},"biome":{"rules":["lint/complexity/noUselessTernary"]}}}},{"id":"default-assignment","forbid":{"ast":{"language":"typescript","rule":{"matches":"r4"},"constraints":{"T":{"matches":"same-identifier"},"C":{"matches":"same-identifier"},"A":{"not":{"matches":"or-operand-needs-parens"}}},"when":{"option":{"defaultAssignment":false}}}},"violation":{"anchor":"witness.span","code":"no-unneeded-ternary","message":"Unnecessary use of conditional expression for default assignment.","fix":"$T || $A","suppress":{"eslint":{"rules":["no-unneeded-ternary"]},"oxlint":{"rules":["no-unneeded-ternary"]},"biome":{"rules":["lint/complexity/noUselessTernary"]}}}}]}
|
|
@@ -0,0 +1,570 @@
|
|
|
1
|
+
{
|
|
2
|
+
"format": "rerail.policy/v1",
|
|
3
|
+
"id": "eslint-no-unsafe-finally",
|
|
4
|
+
"revision": 3,
|
|
5
|
+
"mode": "steer",
|
|
6
|
+
"description": "Port of ESLint's `no-unsafe-finally` rule (https://eslint.org/docs/latest/rules/no-unsafe-finally). Flags return/throw/break/continue inside a finally block that would transfer control out of it: the nearest finally before a function/class boundary (and, for unlabeled break/continue, before an enclosing loop or switch; for a labeled jump, before the labeled statement it targets).",
|
|
7
|
+
"scope": {
|
|
8
|
+
"include": [
|
|
9
|
+
"**/*"
|
|
10
|
+
],
|
|
11
|
+
"exclude": []
|
|
12
|
+
},
|
|
13
|
+
"clauses": [
|
|
14
|
+
{
|
|
15
|
+
"id": "return",
|
|
16
|
+
"forbid": {
|
|
17
|
+
"ast": {
|
|
18
|
+
"language": "typescript",
|
|
19
|
+
"rule": {
|
|
20
|
+
"kind": "return_statement",
|
|
21
|
+
"inside": {
|
|
22
|
+
"kind": "finally_clause",
|
|
23
|
+
"stopBy": {
|
|
24
|
+
"any": [
|
|
25
|
+
{
|
|
26
|
+
"kind": "function_declaration"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"kind": "function_expression"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"kind": "generator_function"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"kind": "generator_function_declaration"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"kind": "arrow_function"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"kind": "method_definition"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"kind": "class_declaration"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"kind": "class"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"kind": "abstract_class_declaration"
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"violation": {
|
|
59
|
+
"anchor": "witness.span",
|
|
60
|
+
"code": "no-unsafe-finally",
|
|
61
|
+
"message": "Unsafe usage of ReturnStatement.",
|
|
62
|
+
"suppress": {
|
|
63
|
+
"eslint": {
|
|
64
|
+
"rules": [
|
|
65
|
+
"no-unsafe-finally"
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
"oxlint": {
|
|
69
|
+
"rules": [
|
|
70
|
+
"no-unsafe-finally"
|
|
71
|
+
]
|
|
72
|
+
},
|
|
73
|
+
"biome": {
|
|
74
|
+
"rules": [
|
|
75
|
+
"lint/correctness/noUnsafeFinally"
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"id": "throw",
|
|
83
|
+
"forbid": {
|
|
84
|
+
"ast": {
|
|
85
|
+
"language": "typescript",
|
|
86
|
+
"rule": {
|
|
87
|
+
"kind": "throw_statement",
|
|
88
|
+
"inside": {
|
|
89
|
+
"kind": "finally_clause",
|
|
90
|
+
"stopBy": {
|
|
91
|
+
"any": [
|
|
92
|
+
{
|
|
93
|
+
"kind": "function_declaration"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"kind": "function_expression"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"kind": "generator_function"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"kind": "generator_function_declaration"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"kind": "arrow_function"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"kind": "method_definition"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"kind": "class_declaration"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"kind": "class"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"kind": "abstract_class_declaration"
|
|
118
|
+
}
|
|
119
|
+
]
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"violation": {
|
|
126
|
+
"anchor": "witness.span",
|
|
127
|
+
"code": "no-unsafe-finally",
|
|
128
|
+
"message": "Unsafe usage of ThrowStatement.",
|
|
129
|
+
"suppress": {
|
|
130
|
+
"eslint": {
|
|
131
|
+
"rules": [
|
|
132
|
+
"no-unsafe-finally"
|
|
133
|
+
]
|
|
134
|
+
},
|
|
135
|
+
"oxlint": {
|
|
136
|
+
"rules": [
|
|
137
|
+
"no-unsafe-finally"
|
|
138
|
+
]
|
|
139
|
+
},
|
|
140
|
+
"biome": {
|
|
141
|
+
"rules": [
|
|
142
|
+
"lint/correctness/noUnsafeFinally"
|
|
143
|
+
]
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"id": "break",
|
|
150
|
+
"forbid": {
|
|
151
|
+
"ast": {
|
|
152
|
+
"language": "typescript",
|
|
153
|
+
"rule": {
|
|
154
|
+
"kind": "break_statement",
|
|
155
|
+
"not": {
|
|
156
|
+
"has": {
|
|
157
|
+
"kind": "statement_identifier",
|
|
158
|
+
"stopBy": "neighbor"
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
"inside": {
|
|
162
|
+
"kind": "finally_clause",
|
|
163
|
+
"stopBy": {
|
|
164
|
+
"any": [
|
|
165
|
+
{
|
|
166
|
+
"kind": "function_declaration"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"kind": "function_expression"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"kind": "generator_function"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"kind": "generator_function_declaration"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"kind": "arrow_function"
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"kind": "method_definition"
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"kind": "class_declaration"
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"kind": "class"
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"kind": "abstract_class_declaration"
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"kind": "for_statement"
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"kind": "for_in_statement"
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"kind": "while_statement"
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"kind": "do_statement"
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"kind": "switch_statement"
|
|
206
|
+
}
|
|
207
|
+
]
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
"violation": {
|
|
214
|
+
"anchor": "witness.span",
|
|
215
|
+
"code": "no-unsafe-finally",
|
|
216
|
+
"message": "Unsafe usage of BreakStatement.",
|
|
217
|
+
"suppress": {
|
|
218
|
+
"eslint": {
|
|
219
|
+
"rules": [
|
|
220
|
+
"no-unsafe-finally"
|
|
221
|
+
]
|
|
222
|
+
},
|
|
223
|
+
"oxlint": {
|
|
224
|
+
"rules": [
|
|
225
|
+
"no-unsafe-finally"
|
|
226
|
+
]
|
|
227
|
+
},
|
|
228
|
+
"biome": {
|
|
229
|
+
"rules": [
|
|
230
|
+
"lint/correctness/noUnsafeFinally"
|
|
231
|
+
]
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"id": "continue",
|
|
238
|
+
"forbid": {
|
|
239
|
+
"ast": {
|
|
240
|
+
"language": "typescript",
|
|
241
|
+
"rule": {
|
|
242
|
+
"kind": "continue_statement",
|
|
243
|
+
"not": {
|
|
244
|
+
"has": {
|
|
245
|
+
"kind": "statement_identifier",
|
|
246
|
+
"stopBy": "neighbor"
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
"inside": {
|
|
250
|
+
"kind": "finally_clause",
|
|
251
|
+
"stopBy": {
|
|
252
|
+
"any": [
|
|
253
|
+
{
|
|
254
|
+
"kind": "function_declaration"
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
"kind": "function_expression"
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"kind": "generator_function"
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
"kind": "generator_function_declaration"
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
"kind": "arrow_function"
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
"kind": "method_definition"
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
"kind": "class_declaration"
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"kind": "class"
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
"kind": "abstract_class_declaration"
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
"kind": "for_statement"
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
"kind": "for_in_statement"
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
"kind": "while_statement"
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
"kind": "do_statement"
|
|
291
|
+
}
|
|
292
|
+
]
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
"violation": {
|
|
299
|
+
"anchor": "witness.span",
|
|
300
|
+
"code": "no-unsafe-finally",
|
|
301
|
+
"message": "Unsafe usage of ContinueStatement.",
|
|
302
|
+
"suppress": {
|
|
303
|
+
"eslint": {
|
|
304
|
+
"rules": [
|
|
305
|
+
"no-unsafe-finally"
|
|
306
|
+
]
|
|
307
|
+
},
|
|
308
|
+
"oxlint": {
|
|
309
|
+
"rules": [
|
|
310
|
+
"no-unsafe-finally"
|
|
311
|
+
]
|
|
312
|
+
},
|
|
313
|
+
"biome": {
|
|
314
|
+
"rules": [
|
|
315
|
+
"lint/correctness/noUnsafeFinally"
|
|
316
|
+
]
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
"id": "labeled-break",
|
|
323
|
+
"forbid": {
|
|
324
|
+
"ast": {
|
|
325
|
+
"language": "typescript",
|
|
326
|
+
"rule": {
|
|
327
|
+
"all": [
|
|
328
|
+
{
|
|
329
|
+
"kind": "break_statement",
|
|
330
|
+
"has": {
|
|
331
|
+
"kind": "statement_identifier",
|
|
332
|
+
"pattern": "$L",
|
|
333
|
+
"stopBy": "neighbor"
|
|
334
|
+
}
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
"inside": {
|
|
338
|
+
"kind": "finally_clause",
|
|
339
|
+
"stopBy": {
|
|
340
|
+
"any": [
|
|
341
|
+
{
|
|
342
|
+
"kind": "function_declaration"
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
"kind": "function_expression"
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
"kind": "generator_function"
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
"kind": "generator_function_declaration"
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
"kind": "arrow_function"
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
"kind": "method_definition"
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
"kind": "class_declaration"
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
"kind": "class"
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
"kind": "abstract_class_declaration"
|
|
367
|
+
}
|
|
368
|
+
]
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
"not": {
|
|
374
|
+
"inside": {
|
|
375
|
+
"kind": "labeled_statement",
|
|
376
|
+
"has": {
|
|
377
|
+
"kind": "statement_identifier",
|
|
378
|
+
"pattern": "$L",
|
|
379
|
+
"stopBy": "neighbor"
|
|
380
|
+
},
|
|
381
|
+
"stopBy": {
|
|
382
|
+
"any": [
|
|
383
|
+
{
|
|
384
|
+
"kind": "function_declaration"
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
"kind": "function_expression"
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
"kind": "generator_function"
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
"kind": "generator_function_declaration"
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
"kind": "arrow_function"
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
"kind": "method_definition"
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
"kind": "class_declaration"
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
"kind": "class"
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
"kind": "abstract_class_declaration"
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
"kind": "finally_clause"
|
|
412
|
+
}
|
|
413
|
+
]
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
]
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
},
|
|
422
|
+
"violation": {
|
|
423
|
+
"anchor": "witness.span",
|
|
424
|
+
"code": "no-unsafe-finally",
|
|
425
|
+
"message": "Unsafe usage of BreakStatement.",
|
|
426
|
+
"suppress": {
|
|
427
|
+
"eslint": {
|
|
428
|
+
"rules": [
|
|
429
|
+
"no-unsafe-finally"
|
|
430
|
+
]
|
|
431
|
+
},
|
|
432
|
+
"oxlint": {
|
|
433
|
+
"rules": [
|
|
434
|
+
"no-unsafe-finally"
|
|
435
|
+
]
|
|
436
|
+
},
|
|
437
|
+
"biome": {
|
|
438
|
+
"rules": [
|
|
439
|
+
"lint/correctness/noUnsafeFinally"
|
|
440
|
+
]
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
"id": "labeled-continue",
|
|
447
|
+
"forbid": {
|
|
448
|
+
"ast": {
|
|
449
|
+
"language": "typescript",
|
|
450
|
+
"rule": {
|
|
451
|
+
"all": [
|
|
452
|
+
{
|
|
453
|
+
"kind": "continue_statement",
|
|
454
|
+
"has": {
|
|
455
|
+
"kind": "statement_identifier",
|
|
456
|
+
"pattern": "$L",
|
|
457
|
+
"stopBy": "neighbor"
|
|
458
|
+
}
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
"inside": {
|
|
462
|
+
"kind": "finally_clause",
|
|
463
|
+
"stopBy": {
|
|
464
|
+
"any": [
|
|
465
|
+
{
|
|
466
|
+
"kind": "function_declaration"
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
"kind": "function_expression"
|
|
470
|
+
},
|
|
471
|
+
{
|
|
472
|
+
"kind": "generator_function"
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
"kind": "generator_function_declaration"
|
|
476
|
+
},
|
|
477
|
+
{
|
|
478
|
+
"kind": "arrow_function"
|
|
479
|
+
},
|
|
480
|
+
{
|
|
481
|
+
"kind": "method_definition"
|
|
482
|
+
},
|
|
483
|
+
{
|
|
484
|
+
"kind": "class_declaration"
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
"kind": "class"
|
|
488
|
+
},
|
|
489
|
+
{
|
|
490
|
+
"kind": "abstract_class_declaration"
|
|
491
|
+
}
|
|
492
|
+
]
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
},
|
|
496
|
+
{
|
|
497
|
+
"not": {
|
|
498
|
+
"inside": {
|
|
499
|
+
"kind": "labeled_statement",
|
|
500
|
+
"has": {
|
|
501
|
+
"kind": "statement_identifier",
|
|
502
|
+
"pattern": "$L",
|
|
503
|
+
"stopBy": "neighbor"
|
|
504
|
+
},
|
|
505
|
+
"stopBy": {
|
|
506
|
+
"any": [
|
|
507
|
+
{
|
|
508
|
+
"kind": "function_declaration"
|
|
509
|
+
},
|
|
510
|
+
{
|
|
511
|
+
"kind": "function_expression"
|
|
512
|
+
},
|
|
513
|
+
{
|
|
514
|
+
"kind": "generator_function"
|
|
515
|
+
},
|
|
516
|
+
{
|
|
517
|
+
"kind": "generator_function_declaration"
|
|
518
|
+
},
|
|
519
|
+
{
|
|
520
|
+
"kind": "arrow_function"
|
|
521
|
+
},
|
|
522
|
+
{
|
|
523
|
+
"kind": "method_definition"
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
"kind": "class_declaration"
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
"kind": "class"
|
|
530
|
+
},
|
|
531
|
+
{
|
|
532
|
+
"kind": "abstract_class_declaration"
|
|
533
|
+
},
|
|
534
|
+
{
|
|
535
|
+
"kind": "finally_clause"
|
|
536
|
+
}
|
|
537
|
+
]
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
]
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
},
|
|
546
|
+
"violation": {
|
|
547
|
+
"anchor": "witness.span",
|
|
548
|
+
"code": "no-unsafe-finally",
|
|
549
|
+
"message": "Unsafe usage of ContinueStatement.",
|
|
550
|
+
"suppress": {
|
|
551
|
+
"eslint": {
|
|
552
|
+
"rules": [
|
|
553
|
+
"no-unsafe-finally"
|
|
554
|
+
]
|
|
555
|
+
},
|
|
556
|
+
"oxlint": {
|
|
557
|
+
"rules": [
|
|
558
|
+
"no-unsafe-finally"
|
|
559
|
+
]
|
|
560
|
+
},
|
|
561
|
+
"biome": {
|
|
562
|
+
"rules": [
|
|
563
|
+
"lint/correctness/noUnsafeFinally"
|
|
564
|
+
]
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
]
|
|
570
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"format":"rerail.policy/v1","id":"eslint-no-unsafe-negation","revision":4,"mode":"steer","description":"Port of ESLint's `no-unsafe-negation` rule (https://eslint.org/docs/latest/rules/no-unsafe-negation). Reports an unparenthesized `!x` as the left operand of `in` or `instanceof`. 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":{"enforceForOrderingRelations":{"type":"boolean","nullable":true,"default":null}}}},{"id":"negated-left-operand-of-in","forbid":{"ast":{"language":"typescript","rule":{"kind":"unary_expression","has":{"regex":"^!$","stopBy":"neighbor"},"precedes":{"regex":"^in$","stopBy":"neighbor"},"inside":{"kind":"binary_expression","stopBy":"neighbor"}}}},"violation":{"anchor":"witness.span","code":"no-unsafe-negation","message":"Unexpected negating the left operand of 'in' operator.","suppress":{"eslint":{"rules":["no-unsafe-negation"]},"oxlint":{"rules":["no-unsafe-negation"]},"biome":{"rules":["lint/suspicious/noUnsafeNegation"]}}}},{"id":"negated-left-operand-of-instanceof","forbid":{"ast":{"language":"typescript","rule":{"kind":"unary_expression","has":{"regex":"^!$","stopBy":"neighbor"},"precedes":{"regex":"^instanceof$","stopBy":"neighbor"},"inside":{"kind":"binary_expression","stopBy":"neighbor"}}}},"violation":{"anchor":"witness.span","code":"no-unsafe-negation","message":"Unexpected negating the left operand of 'instanceof' operator.","suppress":{"eslint":{"rules":["no-unsafe-negation"]},"oxlint":{"rules":["no-unsafe-negation"]},"biome":{"rules":["lint/suspicious/noUnsafeNegation"]}}}},{"id":"negated-left-operand-of-lt","forbid":{"ast":{"language":"typescript","rule":{"kind":"unary_expression","has":{"regex":"^!$","stopBy":"neighbor"},"precedes":{"regex":"^<$","stopBy":"neighbor"},"inside":{"kind":"binary_expression","stopBy":"neighbor"}},"when":{"option":{"enforceForOrderingRelations":true}}}},"violation":{"anchor":"witness.span","code":"no-unsafe-negation","message":"Unexpected negating the left operand of '<' operator.","suppress":{"eslint":{"rules":["no-unsafe-negation"]},"oxlint":{"rules":["no-unsafe-negation"]},"biome":{"rules":["lint/suspicious/noUnsafeNegation"]}}}},{"id":"negated-left-operand-of-gt","forbid":{"ast":{"language":"typescript","rule":{"kind":"unary_expression","has":{"regex":"^!$","stopBy":"neighbor"},"precedes":{"regex":"^>$","stopBy":"neighbor"},"inside":{"kind":"binary_expression","stopBy":"neighbor"}},"when":{"option":{"enforceForOrderingRelations":true}}}},"violation":{"anchor":"witness.span","code":"no-unsafe-negation","message":"Unexpected negating the left operand of '>' operator.","suppress":{"eslint":{"rules":["no-unsafe-negation"]},"oxlint":{"rules":["no-unsafe-negation"]},"biome":{"rules":["lint/suspicious/noUnsafeNegation"]}}}},{"id":"negated-left-operand-of-le","forbid":{"ast":{"language":"typescript","rule":{"kind":"unary_expression","has":{"regex":"^!$","stopBy":"neighbor"},"precedes":{"regex":"^<=$","stopBy":"neighbor"},"inside":{"kind":"binary_expression","stopBy":"neighbor"}},"when":{"option":{"enforceForOrderingRelations":true}}}},"violation":{"anchor":"witness.span","code":"no-unsafe-negation","message":"Unexpected negating the left operand of '<=' operator.","suppress":{"eslint":{"rules":["no-unsafe-negation"]},"oxlint":{"rules":["no-unsafe-negation"]},"biome":{"rules":["lint/suspicious/noUnsafeNegation"]}}}},{"id":"negated-left-operand-of-ge","forbid":{"ast":{"language":"typescript","rule":{"kind":"unary_expression","has":{"regex":"^!$","stopBy":"neighbor"},"precedes":{"regex":"^>=$","stopBy":"neighbor"},"inside":{"kind":"binary_expression","stopBy":"neighbor"}},"when":{"option":{"enforceForOrderingRelations":true}}}},"violation":{"anchor":"witness.span","code":"no-unsafe-negation","message":"Unexpected negating the left operand of '>=' operator.","suppress":{"eslint":{"rules":["no-unsafe-negation"]},"oxlint":{"rules":["no-unsafe-negation"]},"biome":{"rules":["lint/suspicious/noUnsafeNegation"]}}}}]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"format":"rerail.policy/v1","id":"eslint-no-useless-call","revision":3,"mode":"steer","description":"Port of ESLint's `no-useless-call` rule (https://eslint.org/docs/latest/rules/no-useless-call). Reports `f.call(thisArg, ...)` and `f.apply(thisArg, [...])` whose thisArg is the object `f` is read from (token-equal: ESLint's equalTokens, via `compare` text `tokens`), or null/undefined when `f` is not a member access.","scope":{"include":["**/*"],"exclude":[]},"clauses":[{"id":"useless-call","forbid":{"ast":{"language":"typescript","utils":{"applied":{"any":[{"kind":"parenthesized_expression","has":{"matches":"applied","stopBy":"neighbor"}},{"not":{"any":[{"kind":"parenthesized_expression"},{"kind":"comment"}]},"pattern":"$A"}]},"expected-this":{"any":[{"kind":"parenthesized_expression","has":{"matches":"expected-this","stopBy":"neighbor"}},{"not":{"any":[{"kind":"parenthesized_expression"},{"kind":"comment"}]},"pattern":"$T"}]},"callee":{"any":[{"kind":"parenthesized_expression","has":{"matches":"callee","stopBy":"neighbor"}},{"kind":"member_expression","all":[{"has":{"kind":"property_identifier","regex":"^(call|apply)$","pattern":"$NAME","stopBy":"neighbor"}},{"has":{"not":{"any":[{"kind":"property_identifier"},{"kind":"optional_chain"},{"kind":"comment"}]},"matches":"applied","stopBy":"neighbor"}}]}]},"first-argument":{"all":[{"not":{"any":[{"kind":"comment"},{"regex":"^[(),]$"}]}},{"not":{"follows":{"stopBy":"end","all":[{"not":{"any":[{"kind":"comment"},{"regex":"^[(),]$"}]}}]}}}]},"null-or-undefined":{"any":[{"kind":"parenthesized_expression","has":{"matches":"null-or-undefined","stopBy":"neighbor"}},{"kind":"null"},{"kind":"undefined"},{"kind":"unary_expression","has":{"regex":"^void$","stopBy":"neighbor"}}]},"call-arguments":{"kind":"arguments","any":[{"all":[{"matches":"call-name"},{"has":{"not":{"any":[{"kind":"comment"},{"regex":"^[(),]$"}]},"stopBy":"neighbor"}}]},{"all":[{"matches":"apply-name"},{"count":{"has":{"not":{"any":[{"kind":"comment"},{"regex":"^[(),]$"}]},"stopBy":"neighbor"},"min":2,"max":2}},{"has":{"kind":"array","not":{"precedes":{"stopBy":"end","all":[{"not":{"any":[{"kind":"comment"},{"regex":"^[(),]$"}]}}]}},"stopBy":"neighbor"}}]}]},"call-name":{"follows":{"stopBy":"end","matches":"callee-call"}},"apply-name":{"follows":{"stopBy":"end","matches":"callee-apply"}},"callee-call":{"any":[{"kind":"parenthesized_expression","has":{"matches":"callee-call","stopBy":"neighbor"}},{"kind":"member_expression","has":{"kind":"property_identifier","regex":"^call$","stopBy":"neighbor"}}]},"callee-apply":{"any":[{"kind":"parenthesized_expression","has":{"matches":"callee-apply","stopBy":"neighbor"}},{"kind":"member_expression","has":{"kind":"property_identifier","regex":"^apply$","stopBy":"neighbor"}}]},"callee-object-member":{"any":[{"kind":"parenthesized_expression","has":{"matches":"callee-object-member","stopBy":"neighbor"}},{"kind":"member_expression","has":{"not":{"any":[{"kind":"property_identifier"},{"kind":"optional_chain"},{"kind":"comment"}]},"matches":"member-object","stopBy":"neighbor"}}]},"member-object":{"any":[{"kind":"parenthesized_expression","has":{"matches":"member-object","stopBy":"neighbor"}},{"any":[{"kind":"member_expression"},{"kind":"subscript_expression"}],"has":{"not":{"any":[{"kind":"property_identifier"},{"kind":"private_property_identifier"},{"kind":"optional_chain"},{"kind":"comment"}]},"matches":"expected-this","stopBy":"neighbor"}}]},"this-arg":{"any":[{"kind":"parenthesized_expression","has":{"matches":"this-arg","stopBy":"neighbor"}},{"not":{"any":[{"kind":"parenthesized_expression"},{"kind":"comment"}]},"pattern":"$ARG"}]}},"rule":{"kind":"call_expression","all":[{"has":{"matches":"callee","stopBy":"neighbor"}},{"has":{"matches":"call-arguments","stopBy":"neighbor"}},{"any":[{"all":[{"has":{"matches":"callee-object-member","stopBy":"neighbor"}},{"has":{"kind":"arguments","has":{"matches":"first-argument","all":[{"matches":"this-arg"}],"stopBy":"neighbor"},"stopBy":"neighbor"}}],"compare":{"left":"ARG","op":"eq","right":"T","text":"tokens"}},{"all":[{"not":{"has":{"matches":"callee-object-member","stopBy":"neighbor"}}},{"has":{"kind":"arguments","has":{"matches":"first-argument","all":[{"matches":"null-or-undefined"}],"stopBy":"neighbor"},"stopBy":"neighbor"}}]}]}]}}},"violation":{"anchor":"witness.span","code":"no-useless-call","message":"Unnecessary '.$NAME()'.","suppress":{"eslint":{"rules":["no-useless-call"]},"oxlint":{"rules":["no-useless-call"]}}}}]}
|