@neralabs/rerail-pack-javascript 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +7 -0
  3. package/README.md +37 -0
  4. package/licenses/eslint/LICENSE +19 -0
  5. package/licenses/eslint/UPSTREAM.md +10363 -0
  6. package/licenses/eslint-plugin-unicorn/LICENSE +9 -0
  7. package/licenses/eslint-plugin-unicorn/UPSTREAM.md +297 -0
  8. package/pack.json +499 -0
  9. package/package.json +30 -0
  10. package/rules/eslint-arrow-body-style.json +1 -0
  11. package/rules/eslint-capitalized-comments.json +1 -0
  12. package/rules/eslint-default-case-last.json +52 -0
  13. package/rules/eslint-default-case.json +1 -0
  14. package/rules/eslint-eqeqeq.json +608 -0
  15. package/rules/eslint-func-style.json +1 -0
  16. package/rules/eslint-guard-for-in.json +144 -0
  17. package/rules/eslint-no-bitwise.json +1 -0
  18. package/rules/eslint-no-caller.json +63 -0
  19. package/rules/eslint-no-case-declarations.json +101 -0
  20. package/rules/eslint-no-compare-neg-zero.json +109 -0
  21. package/rules/eslint-no-cond-assign.json +1 -0
  22. package/rules/eslint-no-console.json +1 -0
  23. package/rules/eslint-no-continue.json +48 -0
  24. package/rules/eslint-no-debugger.json +55 -0
  25. package/rules/eslint-no-delete-var.json +63 -0
  26. package/rules/eslint-no-div-regex.json +1 -0
  27. package/rules/eslint-no-dupe-keys.json +295 -0
  28. package/rules/eslint-no-duplicate-case.json +160 -0
  29. package/rules/eslint-no-empty-pattern.json +1 -0
  30. package/rules/eslint-no-empty-static-block.json +64 -0
  31. package/rules/eslint-no-empty.json +187 -0
  32. package/rules/eslint-no-eq-null.json +65 -0
  33. package/rules/eslint-no-extend-native.json +1 -0
  34. package/rules/eslint-no-inline-comments.json +1 -0
  35. package/rules/eslint-no-iterator.json +1 -0
  36. package/rules/eslint-no-loss-of-precision.json +1 -0
  37. package/rules/eslint-no-multi-str.json +61 -0
  38. package/rules/eslint-no-negated-condition.json +114 -0
  39. package/rules/eslint-no-nested-ternary.json +76 -0
  40. package/rules/eslint-no-new-wrappers.json +89 -0
  41. package/rules/eslint-no-new.json +56 -0
  42. package/rules/eslint-no-nonoctal-decimal-escape.json +54 -0
  43. package/rules/eslint-no-octal-escape.json +1 -0
  44. package/rules/eslint-no-octal.json +15 -0
  45. package/rules/eslint-no-plusplus.json +1 -0
  46. package/rules/eslint-no-proto.json +1 -0
  47. package/rules/eslint-no-prototype-builtins.json +143 -0
  48. package/rules/eslint-no-return-assign.json +1 -0
  49. package/rules/eslint-no-script-url.json +81 -0
  50. package/rules/eslint-no-self-compare.json +121 -0
  51. package/rules/eslint-no-setter-return.json +1 -0
  52. package/rules/eslint-no-sparse-arrays.json +59 -0
  53. package/rules/eslint-no-template-curly-in-string.json +58 -0
  54. package/rules/eslint-no-ternary.json +48 -0
  55. package/rules/eslint-no-unneeded-ternary.json +1 -0
  56. package/rules/eslint-no-unsafe-finally.json +570 -0
  57. package/rules/eslint-no-unsafe-negation.json +1 -0
  58. package/rules/eslint-no-useless-call.json +1 -0
  59. package/rules/eslint-no-useless-catch.json +239 -0
  60. package/rules/eslint-no-useless-concat.json +1 -0
  61. package/rules/eslint-no-void.json +1 -0
  62. package/rules/eslint-no-warning-comments.json +1 -0
  63. package/rules/eslint-no-with.json +51 -0
  64. package/rules/eslint-operator-assignment.json +1 -0
  65. package/rules/eslint-prefer-numeric-literals.json +1 -0
  66. package/rules/eslint-prefer-spread.json +1 -0
  67. package/rules/eslint-prefer-template.json +187 -0
  68. package/rules/eslint-radix.json +533 -0
  69. package/rules/eslint-sort-imports.json +1 -0
  70. package/rules/eslint-sort-keys.json +1 -0
  71. package/rules/eslint-sort-vars.json +1 -0
  72. package/rules/eslint-use-isnan.json +400 -0
  73. package/rules/eslint-valid-typeof.json +1 -0
  74. package/rules/eslint-yoda.json +1 -0
@@ -0,0 +1,144 @@
1
+ {
2
+ "format": "rerail.policy/v1",
3
+ "id": "eslint-guard-for-in",
4
+ "revision": 3,
5
+ "mode": "steer",
6
+ "description": "Port of ESLint's `guard-for-in` rule (https://eslint.org/docs/latest/rules/guard-for-in). A for-in body must be empty, an if statement, or a block whose first statement is an if that is either the only statement or whose consequent is `continue` / `{ continue; }`.",
7
+ "scope": {
8
+ "include": [
9
+ "**/*"
10
+ ],
11
+ "exclude": []
12
+ },
13
+ "clauses": [
14
+ {
15
+ "id": "unguarded-for-in",
16
+ "forbid": {
17
+ "ast": {
18
+ "language": "typescript",
19
+ "utils": {
20
+ "statement": {
21
+ "all": [
22
+ {
23
+ "not": {
24
+ "kind": "comment"
25
+ }
26
+ },
27
+ {
28
+ "not": {
29
+ "regex": "^[{}]$"
30
+ }
31
+ }
32
+ ]
33
+ },
34
+ "continue-only": {
35
+ "any": [
36
+ {
37
+ "kind": "continue_statement"
38
+ },
39
+ {
40
+ "kind": "statement_block",
41
+ "has": {
42
+ "kind": "continue_statement"
43
+ },
44
+ "not": {
45
+ "has": {
46
+ "all": [
47
+ {
48
+ "matches": "statement"
49
+ },
50
+ {
51
+ "not": {
52
+ "kind": "continue_statement"
53
+ }
54
+ }
55
+ ]
56
+ }
57
+ }
58
+ }
59
+ ]
60
+ },
61
+ "guarded-body": {
62
+ "any": [
63
+ {
64
+ "kind": "empty_statement"
65
+ },
66
+ {
67
+ "kind": "if_statement"
68
+ },
69
+ {
70
+ "kind": "statement_block",
71
+ "not": {
72
+ "has": {
73
+ "matches": "statement"
74
+ }
75
+ }
76
+ },
77
+ {
78
+ "kind": "statement_block",
79
+ "has": {
80
+ "kind": "if_statement",
81
+ "not": {
82
+ "follows": {
83
+ "matches": "statement",
84
+ "stopBy": "end"
85
+ }
86
+ },
87
+ "any": [
88
+ {
89
+ "not": {
90
+ "precedes": {
91
+ "matches": "statement",
92
+ "stopBy": "end"
93
+ }
94
+ }
95
+ },
96
+ {
97
+ "has": {
98
+ "matches": "continue-only"
99
+ }
100
+ }
101
+ ]
102
+ }
103
+ }
104
+ ]
105
+ }
106
+ },
107
+ "rule": {
108
+ "kind": "for_in_statement",
109
+ "has": {
110
+ "regex": "^in$"
111
+ },
112
+ "not": {
113
+ "has": {
114
+ "matches": "guarded-body"
115
+ }
116
+ }
117
+ }
118
+ }
119
+ },
120
+ "violation": {
121
+ "anchor": "witness.span",
122
+ "code": "guard-for-in",
123
+ "message": "The body of a for-in should be wrapped in an if statement to filter unwanted properties from the prototype.",
124
+ "suppress": {
125
+ "eslint": {
126
+ "rules": [
127
+ "guard-for-in"
128
+ ]
129
+ },
130
+ "oxlint": {
131
+ "rules": [
132
+ "guard-for-in"
133
+ ]
134
+ },
135
+ "biome": {
136
+ "rules": [
137
+ "lint/suspicious/useGuardForIn"
138
+ ]
139
+ }
140
+ }
141
+ }
142
+ }
143
+ ]
144
+ }
@@ -0,0 +1 @@
1
+ {"format":"rerail.policy/v1","id":"eslint-no-bitwise","revision":4,"mode":"steer","description":"Port of ESLint's `no-bitwise` rule (https://eslint.org/docs/latest/rules/no-bitwise). Flags bitwise operators in binary, unary and compound-assignment expressions. 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":{"allow":{"type":"array","items":"string","nullable":true,"default":null},"int32Hint":{"type":"boolean","nullable":true,"default":null}}}},{"id":"bitwise-operator","forbid":{"ast":{"language":"typescript","rule":{"$option":"int32Hint","cases":{"true":{"all":[{"any":[{"kind":"binary_expression"},{"kind":"augmented_assignment_expression"},{"kind":"unary_expression"}],"has":{"pattern":"$$OP","regex":"^(\\^|\\||\\&|<<|>>|>>>|\\^=|\\|=|\\&=|<<=|>>=|>>>=|\\~)$","stopBy":"neighbor"}},{"not":{"all":[{"kind":"binary_expression"},{"has":{"regex":"^\\|$","stopBy":"neighbor"}},{"has":{"kind":"number","regex":"^(0[xXoObB])?0*(\\.0*)?([eE][+-]?[0-9]+)?$","stopBy":"neighbor","not":{"precedes":{"regex":"[\\s\\S]","stopBy":"neighbor"}}}}]}}]}},"default":{"any":[{"kind":"binary_expression"},{"kind":"augmented_assignment_expression"},{"kind":"unary_expression"}],"has":{"pattern":"$$OP","regex":{"$option":"allow","cases":{"[\"~\"]":"^(\\^|\\||\\&|<<|>>|>>>|\\^=|\\|=|\\&=|<<=|>>=|>>>=)$","[\"~\",\"<<\"]":"^(\\^|\\||\\&|>>|>>>|\\^=|\\|=|\\&=|<<=|>>=|>>>=)$","[\"|\"]":"^(\\^|\\&|<<|>>|>>>|\\^=|\\|=|\\&=|<<=|>>=|>>>=|\\~)$"},"default":"^(\\^|\\||\\&|<<|>>|>>>|\\^=|\\|=|\\&=|<<=|>>=|>>>=|\\~)$"},"stopBy":"neighbor"}}}}},"violation":{"anchor":"witness.span","code":"no-bitwise","message":"Unexpected use of '$OP'.","suppress":{"eslint":{"rules":["no-bitwise"]},"oxlint":{"rules":["no-bitwise"]},"biome":{"rules":["lint/suspicious/noBitwiseOperators"]}}}}]}
@@ -0,0 +1,63 @@
1
+ {
2
+ "format": "rerail.policy/v1",
3
+ "id": "eslint-no-caller",
4
+ "revision": 2,
5
+ "mode": "steer",
6
+ "description": "Port of ESLint's `no-caller` rule (https://eslint.org/docs/latest/rules/no-caller). Reports `arguments.callee` and `arguments.caller` (object through parentheses).",
7
+ "scope": {
8
+ "include": [
9
+ "**/*"
10
+ ],
11
+ "exclude": []
12
+ },
13
+ "clauses": [
14
+ {
15
+ "id": "arguments-callee-caller",
16
+ "forbid": {
17
+ "ast": {
18
+ "language": "typescript",
19
+ "rule": {
20
+ "kind": "member_expression",
21
+ "all": [
22
+ {
23
+ "has": {
24
+ "kind": "identifier",
25
+ "regex": "^arguments$",
26
+ "stopBy": {
27
+ "not": {
28
+ "kind": "parenthesized_expression"
29
+ }
30
+ }
31
+ }
32
+ },
33
+ {
34
+ "has": {
35
+ "kind": "property_identifier",
36
+ "regex": "^calle[er]$",
37
+ "pattern": "$PROP"
38
+ }
39
+ }
40
+ ]
41
+ }
42
+ }
43
+ },
44
+ "violation": {
45
+ "anchor": "witness.span",
46
+ "code": "no-caller",
47
+ "message": "Avoid arguments.$PROP.",
48
+ "suppress": {
49
+ "eslint": {
50
+ "rules": [
51
+ "no-caller"
52
+ ]
53
+ },
54
+ "oxlint": {
55
+ "rules": [
56
+ "no-caller"
57
+ ]
58
+ }
59
+ }
60
+ }
61
+ }
62
+ ]
63
+ }
@@ -0,0 +1,101 @@
1
+ {
2
+ "format": "rerail.policy/v1",
3
+ "id": "eslint-no-case-declarations",
4
+ "revision": 3,
5
+ "mode": "steer",
6
+ "description": "Port of ESLint's `no-case-declarations` rule (https://eslint.org/docs/latest/rules/no-case-declarations). Flags a let/const, function or class declaration that is a direct statement of a `case` or `default` clause. `using` declarations, which tree-sitter-typescript 0.23.2 parses as assignments with a `using` token, count as lexical declarations.",
7
+ "scope": {
8
+ "include": [
9
+ "**/*"
10
+ ],
11
+ "exclude": []
12
+ },
13
+ "clauses": [
14
+ {
15
+ "id": "case-declaration",
16
+ "forbid": {
17
+ "ast": {
18
+ "language": "typescript",
19
+ "rule": {
20
+ "any": [
21
+ {
22
+ "kind": "lexical_declaration"
23
+ },
24
+ {
25
+ "kind": "function_declaration"
26
+ },
27
+ {
28
+ "kind": "generator_function_declaration"
29
+ },
30
+ {
31
+ "kind": "class_declaration"
32
+ },
33
+ {
34
+ "kind": "abstract_class_declaration"
35
+ },
36
+ {
37
+ "kind": "expression_statement",
38
+ "has": {
39
+ "stopBy": "neighbor",
40
+ "any": [
41
+ {
42
+ "kind": "assignment_expression",
43
+ "has": {
44
+ "stopBy": "neighbor",
45
+ "regex": "^using$"
46
+ }
47
+ },
48
+ {
49
+ "kind": "await_expression",
50
+ "has": {
51
+ "stopBy": "neighbor",
52
+ "kind": "assignment_expression",
53
+ "has": {
54
+ "stopBy": "neighbor",
55
+ "regex": "^using$"
56
+ }
57
+ }
58
+ }
59
+ ]
60
+ }
61
+ }
62
+ ],
63
+ "inside": {
64
+ "any": [
65
+ {
66
+ "kind": "switch_case"
67
+ },
68
+ {
69
+ "kind": "switch_default"
70
+ }
71
+ ],
72
+ "stopBy": "neighbor"
73
+ }
74
+ }
75
+ }
76
+ },
77
+ "violation": {
78
+ "anchor": "witness.span",
79
+ "code": "no-case-declarations",
80
+ "message": "Unexpected lexical declaration in case block.",
81
+ "suppress": {
82
+ "eslint": {
83
+ "rules": [
84
+ "no-case-declarations"
85
+ ]
86
+ },
87
+ "oxlint": {
88
+ "rules": [
89
+ "no-case-declarations"
90
+ ]
91
+ },
92
+ "biome": {
93
+ "rules": [
94
+ "lint/correctness/noSwitchDeclarations"
95
+ ]
96
+ }
97
+ }
98
+ }
99
+ }
100
+ ]
101
+ }
@@ -0,0 +1,109 @@
1
+ {
2
+ "format": "rerail.policy/v1",
3
+ "id": "eslint-no-compare-neg-zero",
4
+ "revision": 3,
5
+ "mode": "steer",
6
+ "description": "ESLint 10.11.0 no-compare-neg-zero, default options. Port of ESLint's `no-compare-neg-zero` rule (https://eslint.org/docs/latest/rules/no-compare-neg-zero). Flags a comparison with `-0` (a unary minus applied to a numeric literal whose value is 0). Scope only matters to ESLint's Object.is suggestion, which is not a fix.",
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": "compare-neg-zero",
23
+ "forbid": {
24
+ "ast": {
25
+ "language": "typescript",
26
+ "rule": {
27
+ "kind": "binary_expression",
28
+ "all": [
29
+ {
30
+ "has": {
31
+ "regex": "^(>|>=|<|<=|==|===|!=|!==)$",
32
+ "pattern": "$$OP"
33
+ }
34
+ },
35
+ {
36
+ "has": {
37
+ "matches": "neg-zero"
38
+ }
39
+ }
40
+ ]
41
+ },
42
+ "utils": {
43
+ "zero": {
44
+ "any": [
45
+ {
46
+ "kind": "number",
47
+ "regex": "^(?:(?:0[0_]*(?:\\.[0_]*)?|\\.0[0_]*)(?:[eE][+-]?[0-9_]+)?|0[xXoObB]0[0_]*)$"
48
+ },
49
+ {
50
+ "kind": "parenthesized_expression",
51
+ "has": {
52
+ "matches": "zero"
53
+ }
54
+ }
55
+ ]
56
+ },
57
+ "neg-zero": {
58
+ "any": [
59
+ {
60
+ "kind": "unary_expression",
61
+ "all": [
62
+ {
63
+ "has": {
64
+ "regex": "^-$"
65
+ }
66
+ },
67
+ {
68
+ "has": {
69
+ "matches": "zero"
70
+ }
71
+ }
72
+ ]
73
+ },
74
+ {
75
+ "kind": "parenthesized_expression",
76
+ "has": {
77
+ "matches": "neg-zero"
78
+ }
79
+ }
80
+ ]
81
+ }
82
+ }
83
+ }
84
+ },
85
+ "violation": {
86
+ "anchor": "witness.span",
87
+ "code": "no-compare-neg-zero",
88
+ "message": "Do not use the '$$OP' operator to compare against -0.",
89
+ "suppress": {
90
+ "eslint": {
91
+ "rules": [
92
+ "no-compare-neg-zero"
93
+ ]
94
+ },
95
+ "oxlint": {
96
+ "rules": [
97
+ "no-compare-neg-zero"
98
+ ]
99
+ },
100
+ "biome": {
101
+ "rules": [
102
+ "lint/suspicious/noCompareNegZero"
103
+ ]
104
+ }
105
+ }
106
+ }
107
+ }
108
+ ]
109
+ }
@@ -0,0 +1 @@
1
+ {"format":"rerail.policy/v1","id":"eslint-no-cond-assign","revision":3,"mode":"steer","description":"Port of ESLint's `no-cond-assign` (https://eslint.org/docs/latest/rules/no-cond-assign) with its default `except-parens`: an assignment that is itself the test of if/while/do-while/for/ternary, unless wrapped in an extra pair of parentheses (for `for`, any pair). 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}}}},{"id":"shared","define":{"language":"typescript","utils":{"any-test":{"any":[{"matches":"test-if"},{"matches":"test-while"},{"matches":"test-do"},{"matches":"test-for"},{"matches":"test-ternary"}]},"stop":{"any":[{"kind":"function_declaration"},{"kind":"function_expression"},{"kind":"arrow_function"},{"kind":"generator_function"},{"kind":"generator_function_declaration"},{"kind":"method_definition"},{"matches":"any-test"}]},"test-do":{"kind":"parenthesized_expression","inside":{"kind":"do_statement","stopBy":"neighbor"}},"test-for":{"all":[{"matches":"r3"},{"matches":"r1"},{"matches":"r2"}]},"test-if":{"kind":"parenthesized_expression","inside":{"kind":"if_statement","stopBy":"neighbor"}},"test-ternary":{"all":[{"precedes":{"regex":"^\\?$","stopBy":"neighbor"}},{"inside":{"kind":"ternary_expression","stopBy":"neighbor"}}]},"test-while":{"kind":"parenthesized_expression","inside":{"kind":"while_statement","stopBy":"neighbor"}},"r1":{"not":{"follows":{"regex":"^\\($","stopBy":"neighbor"}}},"r2":{"inside":{"kind":"for_statement","stopBy":"neighbor"}},"r3":{"precedes":{"regex":"^;$","stopBy":"neighbor"}}}}},{"id":"missing","forbid":{"ast":{"language":"typescript","rule":{"any":[{"all":[{"matches":"assign"},{"inside":{"kind":"parenthesized_expression","stopBy":"neighbor","inside":{"stopBy":"neighbor","any":[{"kind":"if_statement"},{"kind":"while_statement"},{"kind":"do_statement"}]}}}]},{"all":[{"matches":"assign"},{"matches":"r3"},{"matches":"r1"},{"matches":"r2"}]},{"all":[{"matches":"assign"},{"any":[{"precedes":{"regex":"^\\?$","stopBy":"neighbor"},"inside":{"kind":"ternary_expression","stopBy":"neighbor"}},{"inside":{"kind":"parenthesized_expression","stopBy":"neighbor","precedes":{"regex":"^\\?$","stopBy":"neighbor"},"inside":{"kind":"ternary_expression","stopBy":"neighbor"}}}]}]}]},"utils":{"assign":{"any":[{"kind":"assignment_expression"},{"kind":"augmented_assignment_expression"}]}},"when":{"option":{"option":{"in":[null,"except-parens"]}}}}},"violation":{"anchor":"witness.span","code":"no-cond-assign","message":"Expected a conditional expression and instead saw an assignment.","suppress":{"eslint":{"rules":["no-cond-assign"]},"oxlint":{"rules":["no-cond-assign"]}}}},{"id":"unexpected-if","forbid":{"ast":{"language":"typescript","rule":{"all":[{"kind":"assignment_expression"},{"any":[{"matches":"test-if"},{"all":[{"not":{"matches":"any-test"}},{"inside":{"stopBy":{"matches":"stop"},"matches":"test-if"}}]}]}]},"when":{"option":{"option":"always"}}}},"violation":{"anchor":"witness.span","code":"no-cond-assign","message":"Unexpected assignment within an 'if' statement.","suppress":{"eslint":{"rules":["no-cond-assign"]},"oxlint":{"rules":["no-cond-assign"]}}}},{"id":"unexpected-while","forbid":{"ast":{"language":"typescript","rule":{"all":[{"kind":"assignment_expression"},{"any":[{"matches":"test-while"},{"all":[{"not":{"matches":"any-test"}},{"inside":{"stopBy":{"matches":"stop"},"matches":"test-while"}}]}]}]},"when":{"option":{"option":"always"}}}},"violation":{"anchor":"witness.span","code":"no-cond-assign","message":"Unexpected assignment within a 'while' statement.","suppress":{"eslint":{"rules":["no-cond-assign"]},"oxlint":{"rules":["no-cond-assign"]}}}},{"id":"unexpected-do","forbid":{"ast":{"language":"typescript","rule":{"all":[{"kind":"assignment_expression"},{"any":[{"matches":"test-do"},{"all":[{"not":{"matches":"any-test"}},{"inside":{"stopBy":{"matches":"stop"},"matches":"test-do"}}]}]}]},"when":{"option":{"option":"always"}}}},"violation":{"anchor":"witness.span","code":"no-cond-assign","message":"Unexpected assignment within a 'do...while' statement.","suppress":{"eslint":{"rules":["no-cond-assign"]},"oxlint":{"rules":["no-cond-assign"]}}}},{"id":"unexpected-for","forbid":{"ast":{"language":"typescript","rule":{"all":[{"kind":"assignment_expression"},{"any":[{"matches":"test-for"},{"all":[{"not":{"matches":"any-test"}},{"inside":{"stopBy":{"matches":"stop"},"matches":"test-for"}}]}]}]},"when":{"option":{"option":"always"}}}},"violation":{"anchor":"witness.span","code":"no-cond-assign","message":"Unexpected assignment within a 'for' statement.","suppress":{"eslint":{"rules":["no-cond-assign"]},"oxlint":{"rules":["no-cond-assign"]}}}},{"id":"unexpected-ternary","forbid":{"ast":{"language":"typescript","rule":{"all":[{"kind":"assignment_expression"},{"any":[{"matches":"test-ternary"},{"all":[{"not":{"matches":"any-test"}},{"inside":{"stopBy":{"matches":"stop"},"matches":"test-ternary"}}]}]}]},"when":{"option":{"option":"always"}}}},"violation":{"anchor":"witness.span","code":"no-cond-assign","message":"Unexpected assignment within ConditionalExpression.","suppress":{"eslint":{"rules":["no-cond-assign"]},"oxlint":{"rules":["no-cond-assign"]}}}}]}
@@ -0,0 +1 @@
1
+ {"format":"rerail.policy/v1","id":"eslint-no-console","revision":4,"mode":"steer","description":"Port of ESLint's `no-console` rule (https://eslint.org/docs/latest/rules/no-console). Flags member access on the global `console` (resolved with `resolves`), reported at the member expression. Default options: allow []. 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":{"allow":{"type":"array","items":"string","nullable":true,"default":null}}}},{"id":"shared","define":{"language":"typescript","utils":{"r1":{"kind":"template_string","not":{"has":{"kind":"template_substitution"}}}}}},{"id":"console","forbid":{"ast":{"language":"typescript","rule":{"all":[{"any":[{"kind":"member_expression"},{"kind":"subscript_expression"}]},{"has":{"all":[{"any":[{"kind":"identifier"},{"kind":"parenthesized_expression"}],"resolves":{"global":["console"]}},{"not":{"follows":{"regex":"[\\s\\S]"}}}]}},{"$option":"allow","cases":{"[\"warn\"]":[{"not":{"has":{"any":[{"kind":"property_identifier","regex":{"$option":"allow","cases":{"null":"^(warn)$"},"default":{"$option":"allow","join":"|","template":"^({})$"}}},{"any":[{"kind":"string"},{"matches":"r1"}],"has":{"kind":"string_fragment","regex":{"$option":"allow","cases":{"null":"^(warn)$"},"default":{"$option":"allow","join":"|","template":"^({})$"}}}}]}}}],"[\"error\"]":[{"not":{"has":{"any":[{"kind":"property_identifier","regex":{"$option":"allow","cases":{"null":"^(warn)$"},"default":{"$option":"allow","join":"|","template":"^({})$"}}},{"any":[{"kind":"string"},{"matches":"r1"}],"has":{"kind":"string_fragment","regex":{"$option":"allow","cases":{"null":"^(warn)$"},"default":{"$option":"allow","join":"|","template":"^({})$"}}}}]}}}],"[\"log\"]":[{"not":{"has":{"any":[{"kind":"property_identifier","regex":{"$option":"allow","cases":{"null":"^(warn)$"},"default":{"$option":"allow","join":"|","template":"^({})$"}}},{"any":[{"kind":"string"},{"matches":"r1"}],"has":{"kind":"string_fragment","regex":{"$option":"allow","cases":{"null":"^(warn)$"},"default":{"$option":"allow","join":"|","template":"^({})$"}}}}]}}}],"[\"warn\",\"error\"]":[{"not":{"has":{"any":[{"kind":"property_identifier","regex":{"$option":"allow","cases":{"null":"^(warn)$"},"default":{"$option":"allow","join":"|","template":"^({})$"}}},{"any":[{"kind":"string"},{"matches":"r1"}],"has":{"kind":"string_fragment","regex":{"$option":"allow","cases":{"null":"^(warn)$"},"default":{"$option":"allow","join":"|","template":"^({})$"}}}}]}}}],"[\"warn\",\"info\"]":[{"not":{"has":{"any":[{"kind":"property_identifier","regex":{"$option":"allow","cases":{"null":"^(warn)$"},"default":{"$option":"allow","join":"|","template":"^({})$"}}},{"any":[{"kind":"string"},{"matches":"r1"}],"has":{"kind":"string_fragment","regex":{"$option":"allow","cases":{"null":"^(warn)$"},"default":{"$option":"allow","join":"|","template":"^({})$"}}}}]}}}],"[\"info\",\"log\"]":[{"not":{"has":{"any":[{"kind":"property_identifier","regex":{"$option":"allow","cases":{"null":"^(warn)$"},"default":{"$option":"allow","join":"|","template":"^({})$"}}},{"any":[{"kind":"string"},{"matches":"r1"}],"has":{"kind":"string_fragment","regex":{"$option":"allow","cases":{"null":"^(warn)$"},"default":{"$option":"allow","join":"|","template":"^({})$"}}}}]}}}],"[\"info\"]":[{"not":{"has":{"any":[{"kind":"property_identifier","regex":{"$option":"allow","cases":{"null":"^(warn)$"},"default":{"$option":"allow","join":"|","template":"^({})$"}}},{"any":[{"kind":"string"},{"matches":"r1"}],"has":{"kind":"string_fragment","regex":{"$option":"allow","cases":{"null":"^(warn)$"},"default":{"$option":"allow","join":"|","template":"^({})$"}}}}]}}}],"[\"error\",\"warn\"]":[{"not":{"has":{"any":[{"kind":"property_identifier","regex":{"$option":"allow","cases":{"null":"^(warn)$"},"default":{"$option":"allow","join":"|","template":"^({})$"}}},{"any":[{"kind":"string"},{"matches":"r1"}],"has":{"kind":"string_fragment","regex":{"$option":"allow","cases":{"null":"^(warn)$"},"default":{"$option":"allow","join":"|","template":"^({})$"}}}}]}}}],"[\"log\",\"error\"]":[{"not":{"has":{"any":[{"kind":"property_identifier","regex":{"$option":"allow","cases":{"null":"^(warn)$"},"default":{"$option":"allow","join":"|","template":"^({})$"}}},{"any":[{"kind":"string"},{"matches":"r1"}],"has":{"kind":"string_fragment","regex":{"$option":"allow","cases":{"null":"^(warn)$"},"default":{"$option":"allow","join":"|","template":"^({})$"}}}}]}}}],"[\"info\",\"log\",\"warn\"]":[{"not":{"has":{"any":[{"kind":"property_identifier","regex":{"$option":"allow","cases":{"null":"^(warn)$"},"default":{"$option":"allow","join":"|","template":"^({})$"}}},{"any":[{"kind":"string"},{"matches":"r1"}],"has":{"kind":"string_fragment","regex":{"$option":"allow","cases":{"null":"^(warn)$"},"default":{"$option":"allow","join":"|","template":"^({})$"}}}}]}}}],"[\"warn\",\"info\",\"log\"]":[{"not":{"has":{"any":[{"kind":"property_identifier","regex":{"$option":"allow","cases":{"null":"^(warn)$"},"default":{"$option":"allow","join":"|","template":"^({})$"}}},{"any":[{"kind":"string"},{"matches":"r1"}],"has":{"kind":"string_fragment","regex":{"$option":"allow","cases":{"null":"^(warn)$"},"default":{"$option":"allow","join":"|","template":"^({})$"}}}}]}}}],"[\"warn\",\"error\",\"log\"]":[{"not":{"has":{"any":[{"kind":"property_identifier","regex":{"$option":"allow","cases":{"null":"^(warn)$"},"default":{"$option":"allow","join":"|","template":"^({})$"}}},{"any":[{"kind":"string"},{"matches":"r1"}],"has":{"kind":"string_fragment","regex":{"$option":"allow","cases":{"null":"^(warn)$"},"default":{"$option":"allow","join":"|","template":"^({})$"}}}}]}}}],"[\"log\",\"error\",\"warn\"]":[{"not":{"has":{"any":[{"kind":"property_identifier","regex":{"$option":"allow","cases":{"null":"^(warn)$"},"default":{"$option":"allow","join":"|","template":"^({})$"}}},{"any":[{"kind":"string"},{"matches":"r1"}],"has":{"kind":"string_fragment","regex":{"$option":"allow","cases":{"null":"^(warn)$"},"default":{"$option":"allow","join":"|","template":"^({})$"}}}}]}}}]},"default":[],"spread":true}]}}},"violation":{"anchor":"witness.span","code":"no-console","message":{"$option":"allow","cases":{"[\"warn\"]":"Unexpected console statement. Only these console methods are allowed: warn.","[\"error\"]":"Unexpected console statement. Only these console methods are allowed: error.","[\"log\"]":"Unexpected console statement. Only these console methods are allowed: log.","[\"warn\",\"error\"]":"Unexpected console statement. Only these console methods are allowed: warn, error.","[\"warn\",\"info\"]":"Unexpected console statement. Only these console methods are allowed: warn, info.","[\"info\",\"log\"]":"Unexpected console statement. Only these console methods are allowed: info, log.","[\"info\"]":"Unexpected console statement. Only these console methods are allowed: info.","[\"error\",\"warn\"]":"Unexpected console statement. Only these console methods are allowed: error, warn.","[\"log\",\"error\"]":"Unexpected console statement. Only these console methods are allowed: log, error.","[\"info\",\"log\",\"warn\"]":"Unexpected console statement. Only these console methods are allowed: info, log, warn.","[\"warn\",\"info\",\"log\"]":"Unexpected console statement. Only these console methods are allowed: warn, info, log.","[\"warn\",\"error\",\"log\"]":"Unexpected console statement. Only these console methods are allowed: warn, error, log.","[\"log\",\"error\",\"warn\"]":"Unexpected console statement. Only these console methods are allowed: log, error, warn."},"default":"Unexpected console statement."},"suppress":{"eslint":{"rules":["no-console"]},"oxlint":{"rules":["no-console"]},"biome":{"rules":["lint/suspicious/noConsole"]}}}}]}
@@ -0,0 +1,48 @@
1
+ {
2
+ "format": "rerail.policy/v1",
3
+ "id": "eslint-no-continue",
4
+ "revision": 3,
5
+ "mode": "steer",
6
+ "description": "Port of ESLint's `no-continue` rule (https://eslint.org/docs/latest/rules/no-continue). Reports every `continue` statement.",
7
+ "scope": {
8
+ "include": [
9
+ "**/*"
10
+ ],
11
+ "exclude": []
12
+ },
13
+ "clauses": [
14
+ {
15
+ "id": "continue-statement",
16
+ "forbid": {
17
+ "ast": {
18
+ "language": "typescript",
19
+ "rule": {
20
+ "kind": "continue_statement"
21
+ }
22
+ }
23
+ },
24
+ "violation": {
25
+ "anchor": "witness.span",
26
+ "code": "no-continue",
27
+ "message": "Unexpected use of continue statement.",
28
+ "suppress": {
29
+ "eslint": {
30
+ "rules": [
31
+ "no-continue"
32
+ ]
33
+ },
34
+ "oxlint": {
35
+ "rules": [
36
+ "no-continue"
37
+ ]
38
+ },
39
+ "biome": {
40
+ "rules": [
41
+ "lint/style/noContinue"
42
+ ]
43
+ }
44
+ }
45
+ }
46
+ }
47
+ ]
48
+ }
@@ -0,0 +1,55 @@
1
+ {
2
+ "format": "rerail.policy/v1",
3
+ "id": "eslint-no-debugger",
4
+ "revision": 3,
5
+ "mode": "steer",
6
+ "description": "ESLint 10.11.0 no-debugger, default options. Port of ESLint's `no-debugger` rule (https://eslint.org/docs/latest/rules/no-debugger). Reports every `debugger` statement.",
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": "debugger-statement",
23
+ "forbid": {
24
+ "ast": {
25
+ "language": "typescript",
26
+ "rule": {
27
+ "kind": "debugger_statement"
28
+ }
29
+ }
30
+ },
31
+ "violation": {
32
+ "anchor": "witness.span",
33
+ "code": "no-debugger",
34
+ "message": "Unexpected 'debugger' statement.",
35
+ "suppress": {
36
+ "eslint": {
37
+ "rules": [
38
+ "no-debugger"
39
+ ]
40
+ },
41
+ "oxlint": {
42
+ "rules": [
43
+ "no-debugger"
44
+ ]
45
+ },
46
+ "biome": {
47
+ "rules": [
48
+ "lint/suspicious/noDebugger"
49
+ ]
50
+ }
51
+ }
52
+ }
53
+ }
54
+ ]
55
+ }
@@ -0,0 +1,63 @@
1
+ {
2
+ "format": "rerail.policy/v1",
3
+ "id": "eslint-no-delete-var",
4
+ "revision": 2,
5
+ "mode": "steer",
6
+ "description": "Port of ESLint's `no-delete-var` rule (https://eslint.org/docs/latest/rules/no-delete-var). Reports `delete` applied to a bare identifier (through parentheses).",
7
+ "scope": {
8
+ "include": [
9
+ "**/*"
10
+ ],
11
+ "exclude": []
12
+ },
13
+ "clauses": [
14
+ {
15
+ "id": "delete-identifier",
16
+ "forbid": {
17
+ "ast": {
18
+ "language": "typescript",
19
+ "rule": {
20
+ "kind": "unary_expression",
21
+ "all": [
22
+ {
23
+ "has": {
24
+ "regex": "^delete$",
25
+ "not": {
26
+ "kind": "identifier"
27
+ }
28
+ }
29
+ },
30
+ {
31
+ "has": {
32
+ "kind": "identifier",
33
+ "stopBy": {
34
+ "not": {
35
+ "kind": "parenthesized_expression"
36
+ }
37
+ }
38
+ }
39
+ }
40
+ ]
41
+ }
42
+ }
43
+ },
44
+ "violation": {
45
+ "anchor": "witness.span",
46
+ "code": "no-delete-var",
47
+ "message": "Variables should not be deleted.",
48
+ "suppress": {
49
+ "eslint": {
50
+ "rules": [
51
+ "no-delete-var"
52
+ ]
53
+ },
54
+ "oxlint": {
55
+ "rules": [
56
+ "no-delete-var"
57
+ ]
58
+ }
59
+ }
60
+ }
61
+ }
62
+ ]
63
+ }
@@ -0,0 +1 @@
1
+ {"format":"rerail.policy/v1","id":"eslint-no-div-regex","revision":4,"mode":"steer","description":"Port of ESLint's `no-div-regex` rule (https://eslint.org/docs/latest/rules/no-div-regex). Reports a regular expression literal whose pattern starts with `=`. Fixes as ESLint does, replacing the pattern's first `=` with `[=]` (M12b `fix.range` over a regex group).","scope":{"include":["**/*"],"exclude":[]},"clauses":[{"id":"leading-equals-regex","forbid":{"ast":{"language":"typescript","rule":{"kind":"regex","regex":"^/(?<EQ>=)"}}},"violation":{"anchor":"witness.span","code":"no-div-regex","message":"A regular expression literal can be confused with '/='.","fix":{"template":"[=]","range":"capture.EQ"},"suppress":{"eslint":{"rules":["no-div-regex"]},"oxlint":{"rules":["no-div-regex"]},"biome":{"rules":["lint/complexity/noDivRegex"]}}}}]}