@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,187 @@
1
+ {
2
+ "format": "rerail.policy/v1",
3
+ "id": "eslint-no-empty",
4
+ "revision": 4,
5
+ "mode": "steer",
6
+ "description": "Port of ESLint's `no-empty` rule (https://eslint.org/docs/latest/rules/no-empty). Flags a block (not a function body, class static block or TS module body) or switch with no statements and no comment. Options are declared in the `options` define (the rule's defaults); a variant is a config patch.",
7
+ "scope": {
8
+ "include": [
9
+ "**/*.js",
10
+ "**/*.jsx",
11
+ "**/*.mjs",
12
+ "**/*.cjs"
13
+ ],
14
+ "exclude": [
15
+ "**/node_modules/**",
16
+ "**/dist/**",
17
+ "**/build/**",
18
+ "**/out/**",
19
+ "**/.next/**",
20
+ "**/coverage/**",
21
+ "**/vendor/**",
22
+ "**/.venv/**",
23
+ "**/.yarn/**",
24
+ "**/generated/**",
25
+ "**/__generated__/**",
26
+ "**/*.generated.*",
27
+ "**/*.gen.*",
28
+ "**/*.min.js",
29
+ "**/*.config.js",
30
+ "**/*.config.mjs",
31
+ "**/*.config.cjs",
32
+ "**/.*rc.js",
33
+ "**/.*rc.cjs"
34
+ ]
35
+ },
36
+ "clauses": [
37
+ {
38
+ "id": "options",
39
+ "define": {
40
+ "options": {
41
+ "allowEmptyCatch": {
42
+ "type": "boolean",
43
+ "nullable": true,
44
+ "default": null
45
+ }
46
+ }
47
+ }
48
+ },
49
+ {
50
+ "id": "empty-block",
51
+ "forbid": {
52
+ "ast": {
53
+ "language": "typescript",
54
+ "rule": {
55
+ "kind": "statement_block",
56
+ "not": {
57
+ "has": {
58
+ "not": {
59
+ "regex": "^[{}]$"
60
+ }
61
+ }
62
+ },
63
+ "all": [
64
+ {
65
+ "not": {
66
+ "inside": {
67
+ "stopBy": "neighbor",
68
+ "any": [
69
+ {
70
+ "kind": "function_declaration"
71
+ },
72
+ {
73
+ "kind": "function_expression"
74
+ },
75
+ {
76
+ "kind": "generator_function_declaration"
77
+ },
78
+ {
79
+ "kind": "generator_function"
80
+ },
81
+ {
82
+ "kind": "arrow_function"
83
+ },
84
+ {
85
+ "kind": "method_definition"
86
+ },
87
+ {
88
+ "kind": "class_static_block"
89
+ },
90
+ {
91
+ "kind": "internal_module"
92
+ },
93
+ {
94
+ "kind": "module"
95
+ },
96
+ {
97
+ "kind": "ambient_declaration"
98
+ },
99
+ {
100
+ "$option": "allowEmptyCatch",
101
+ "cases": {
102
+ "true": [
103
+ {
104
+ "kind": "catch_clause"
105
+ }
106
+ ]
107
+ },
108
+ "default": [],
109
+ "spread": true
110
+ }
111
+ ]
112
+ }
113
+ }
114
+ }
115
+ ]
116
+ }
117
+ }
118
+ },
119
+ "violation": {
120
+ "anchor": "witness.span",
121
+ "code": "no-empty",
122
+ "message": "Empty block statement.",
123
+ "suppress": {
124
+ "eslint": {
125
+ "rules": [
126
+ "no-empty"
127
+ ]
128
+ },
129
+ "oxlint": {
130
+ "rules": [
131
+ "no-empty"
132
+ ]
133
+ },
134
+ "biome": {
135
+ "rules": [
136
+ "lint/suspicious/noEmptyBlockStatements"
137
+ ]
138
+ }
139
+ }
140
+ }
141
+ },
142
+ {
143
+ "id": "empty-switch",
144
+ "forbid": {
145
+ "ast": {
146
+ "language": "typescript",
147
+ "rule": {
148
+ "kind": "switch_body",
149
+ "inside": {
150
+ "kind": "switch_statement",
151
+ "stopBy": "neighbor"
152
+ },
153
+ "not": {
154
+ "has": {
155
+ "not": {
156
+ "regex": "^[{}]$"
157
+ }
158
+ }
159
+ }
160
+ }
161
+ }
162
+ },
163
+ "violation": {
164
+ "anchor": "witness.span",
165
+ "code": "no-empty",
166
+ "message": "Empty switch statement.",
167
+ "suppress": {
168
+ "eslint": {
169
+ "rules": [
170
+ "no-empty"
171
+ ]
172
+ },
173
+ "oxlint": {
174
+ "rules": [
175
+ "no-empty"
176
+ ]
177
+ },
178
+ "biome": {
179
+ "rules": [
180
+ "lint/suspicious/noEmptyBlockStatements"
181
+ ]
182
+ }
183
+ }
184
+ }
185
+ }
186
+ ]
187
+ }
@@ -0,0 +1,65 @@
1
+ {
2
+ "format": "rerail.policy/v1",
3
+ "id": "eslint-no-eq-null",
4
+ "revision": 3,
5
+ "mode": "steer",
6
+ "description": "Port of ESLint's `no-eq-null` rule (https://eslint.org/docs/latest/rules/no-eq-null). Reports `==` and `!=` with a `null` operand (through parentheses).",
7
+ "scope": {
8
+ "include": [
9
+ "**/*"
10
+ ],
11
+ "exclude": []
12
+ },
13
+ "clauses": [
14
+ {
15
+ "id": "loose-null-comparison",
16
+ "forbid": {
17
+ "ast": {
18
+ "language": "typescript",
19
+ "rule": {
20
+ "kind": "binary_expression",
21
+ "all": [
22
+ {
23
+ "has": {
24
+ "regex": "^(==|!=)$"
25
+ }
26
+ },
27
+ {
28
+ "has": {
29
+ "kind": "null",
30
+ "stopBy": {
31
+ "not": {
32
+ "kind": "parenthesized_expression"
33
+ }
34
+ }
35
+ }
36
+ }
37
+ ]
38
+ }
39
+ }
40
+ },
41
+ "violation": {
42
+ "anchor": "witness.span",
43
+ "code": "no-eq-null",
44
+ "message": "Use '===' to compare with null.",
45
+ "suppress": {
46
+ "eslint": {
47
+ "rules": [
48
+ "no-eq-null"
49
+ ]
50
+ },
51
+ "oxlint": {
52
+ "rules": [
53
+ "no-eq-null"
54
+ ]
55
+ },
56
+ "biome": {
57
+ "rules": [
58
+ "lint/suspicious/noEqualsToNull"
59
+ ]
60
+ }
61
+ }
62
+ }
63
+ }
64
+ ]
65
+ }
@@ -0,0 +1 @@
1
+ {"format":"rerail.policy/v1","id":"eslint-no-extend-native","revision":4,"mode":"steer","description":"Port of ESLint's `no-extend-native` rule (https://eslint.org/docs/latest/rules/no-extend-native). Flags assigning to a property of `<Builtin>.prototype`, or passing it to Object.defineProperty/defineProperties, for the ECMAScript builtins ESLint lists, of which the configured ecmaVersion and globals (`ast.languageOptions`) declare only some. The builtin must resolve to the global (resolved with `resolves`). Default options: exceptions []. 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":{"exceptions":{"type":"array","items":"string","nullable":true,"default":null}}}},{"id":"shared","define":{"language":"typescript","utils":{"r1":{"has":{"any":[{"kind":"string"},{"matches":"r2"}],"has":{"kind":"string_fragment","regex":"^prototype$"}}},"r2":{"kind":"template_string","not":{"has":{"kind":"template_substitution"}}},"r3":{"has":{"kind":"property_identifier","regex":"^prototype$"}}}}},{"id":"prototype-assignment","forbid":{"ast":{"language":"typescript","languageOptions":{},"rule":{"all":[{"any":[{"kind":"assignment_expression"},{"kind":"augmented_assignment_expression"}]},{"has":{"all":[{"not":{"follows":{"regex":"[\\s\\S]"}}},{"any":[{"kind":"member_expression"},{"kind":"subscript_expression"}]},{"has":{"all":[{"not":{"follows":{"regex":"[\\s\\S]"}}},{"matches":"prototype"}]}}]}}]},"utils":{"prototype":{"any":[{"any":[{"kind":"member_expression","all":[{"matches":"r3"},{"has":{"all":[{"matches":"builtin"},{"not":{"follows":{"regex":"[\\s\\S]"}}}]}}]},{"kind":"subscript_expression","all":[{"matches":"r1"},{"has":{"all":[{"matches":"builtin"},{"not":{"follows":{"regex":"[\\s\\S]"}}}]}}]}]},{"kind":"parenthesized_expression","has":{"matches":"prototype"}}]},"builtin":{"any":[{"kind":"identifier","pattern":"$G","resolves":{"global":["Array","Boolean","Date","Error","EvalError","Function","Infinity","Math","NaN","Number",{"$option":"exceptions","cases":{"[\"Object\"]":[]},"default":["Object"],"spread":true},"RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","JSON","ArrayBuffer","DataView","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Intl","Map","Promise","Proxy","Reflect","Set","Symbol","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray","WeakMap","WeakSet","Atomics","SharedArrayBuffer","BigInt","BigInt64Array","BigUint64Array","AggregateError","FinalizationRegistry","WeakRef","Float16Array","Iterator","AsyncDisposableStack","DisposableStack","SuppressedError","Temporal"],"directives":"eslint","scriptDeclarations":true}},{"kind":"parenthesized_expression","has":{"matches":"builtin"}}]}}}},"violation":{"anchor":"witness.span","code":"no-extend-native","message":"$G prototype is read only, properties should not be added.","suppress":{"eslint":{"rules":["no-extend-native"]},"oxlint":{"rules":["no-extend-native"]},"biome":{"rules":["lint/nursery/noExtendNative"]}}}},{"id":"define-property","forbid":{"ast":{"language":"typescript","languageOptions":{},"rule":{"kind":"call_expression","all":[{"has":{"matches":"define-property"}},{"has":{"kind":"arguments","has":{"all":[{"matches":"arg"},{"not":{"follows":{"regex":"^,$","stopBy":"end"}}},{"matches":"prototype"}]}}}]},"utils":{"prototype":{"any":[{"any":[{"kind":"member_expression","all":[{"matches":"r3"},{"has":{"all":[{"matches":"builtin"},{"not":{"follows":{"regex":"[\\s\\S]"}}}]}}]},{"kind":"subscript_expression","all":[{"matches":"r1"},{"has":{"all":[{"matches":"builtin"},{"not":{"follows":{"regex":"[\\s\\S]"}}}]}}]}]},{"kind":"parenthesized_expression","has":{"matches":"prototype"}}]},"define-property":{"any":[{"any":[{"kind":"member_expression","all":[{"has":{"kind":"property_identifier","regex":"^definePropert(?:y|ies)$"}},{"has":{"matches":"object-id"}}]},{"kind":"subscript_expression","all":[{"has":{"any":[{"kind":"string"},{"matches":"r2"}],"has":{"kind":"string_fragment","regex":"^definePropert(?:y|ies)$"}}},{"has":{"matches":"object-id"}}]}]},{"kind":"parenthesized_expression","has":{"matches":"define-property"}}]},"object-id":{"any":[{"kind":"identifier","regex":"^Object$"},{"kind":"parenthesized_expression","has":{"matches":"object-id"}}]},"arg":{"not":{"any":[{"regex":"^[(),]$"},{"kind":"comment"}]}},"builtin":{"any":[{"kind":"identifier","pattern":"$G","resolves":{"global":["Array","Boolean","Date","Error","EvalError","Function","Infinity","Math","NaN","Number",{"$option":"exceptions","cases":{"[\"Object\"]":[]},"default":["Object"],"spread":true},"RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","JSON","ArrayBuffer","DataView","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Intl","Map","Promise","Proxy","Reflect","Set","Symbol","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray","WeakMap","WeakSet","Atomics","SharedArrayBuffer","BigInt","BigInt64Array","BigUint64Array","AggregateError","FinalizationRegistry","WeakRef","Float16Array","Iterator","AsyncDisposableStack","DisposableStack","SuppressedError","Temporal"],"directives":"eslint","scriptDeclarations":true}},{"kind":"parenthesized_expression","has":{"matches":"builtin"}}]}}}},"violation":{"anchor":"witness.span","code":"no-extend-native","message":"$G prototype is read only, properties should not be added.","suppress":{"eslint":{"rules":["no-extend-native"]},"oxlint":{"rules":["no-extend-native"]},"biome":{"rules":["lint/nursery/noExtendNative"]}}}}]}
@@ -0,0 +1 @@
1
+ {"format":"rerail.policy/v1","id":"eslint-no-inline-comments","revision":4,"mode":"steer","description":"Port of ESLint's `no-inline-comments` rule (https://eslint.org/docs/latest/rules/no-inline-comments). A comment is reported when a token or comment ends on its start line before it or starts on its end line after it (`layout` gaps, comments included), except ESLint directive comments (isDirectiveComment's prefixes) and a comment alone in a JSX expression container whose line holds nothing but `{` before and `}` after it. 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":{"ignorePattern":{"type":"string","nullable":true,"default":null}}}},{"id":"shared","define":{"language":"typescript","utils":{"r1":{"any":[{"any":[{"regex":"^//[\\s\\x{FEFF}]*eslint-"},{"regex":"(?s)^/\\*[\\s\\x{FEFF}]*(?:eslint-|(?:eslint|globals?|exported) .*[^\\s\\x{FEFF}].*\\*/$)"}]},{"all":[{"inside":{"kind":"jsx_expression","not":{"has":{"all":[{"not":{"kind":"comment"}},{"not":{"regex":"^[{}]$"}}]}},"stopBy":"neighbor"}},{"any":[{"not":{"matches":"r2"}},{"follows":{"not":{"matches":"r2"},"regex":"^\\{$","stopBy":"neighbor"}}]},{"any":[{"not":{"matches":"r3"}},{"precedes":{"not":{"matches":"r3"},"regex":"^\\}$","stopBy":"neighbor"}}]}]}]},"r2":{"layout":{"before":{"breaks":{"eq":0},"comments":true,"to":"token"}}},"r3":{"layout":{"after":{"breaks":{"eq":0},"comments":true,"to":"token"}}}}}},{"id":"inline-comment","forbid":{"ast":{"language":"typescript","rule":{"$option":"ignorePattern","cases":{"(?:webpackChunkName):\\s.+":{"kind":"comment","any":[{"matches":"r2"},{"matches":"r3"}],"not":{"matches":"r1"},"all":[{"not":{"regex":{"$option":"ignorePattern","cases":{"null":"(?:webpackChunkName):\\s.+"},"default":{"$option":"ignorePattern"}}}}]},"Note: ":{"kind":"comment","any":[{"matches":"r2"},{"matches":"r3"}],"not":{"matches":"r1"},"all":[{"not":{"regex":{"$option":"ignorePattern","cases":{"null":"(?:webpackChunkName):\\s.+"},"default":{"$option":"ignorePattern"}}}}]},"otherthing":{"kind":"comment","any":[{"matches":"r2"},{"matches":"r3"}],"not":{"matches":"r1"},"all":[{"not":{"regex":{"$option":"ignorePattern","cases":{"null":"(?:webpackChunkName):\\s.+"},"default":{"$option":"ignorePattern"}}}}]},"something":{"kind":"comment","any":[{"matches":"r2"},{"matches":"r3"}],"not":{"matches":"r1"},"all":[{"not":{"regex":{"$option":"ignorePattern","cases":{"null":"(?:webpackChunkName):\\s.+"},"default":{"$option":"ignorePattern"}}}}]}},"default":{"kind":"comment","any":[{"matches":"r2"},{"matches":"r3"}],"not":{"matches":"r1"}}}}},"violation":{"anchor":"witness.span","code":"no-inline-comments","message":"Unexpected comment inline with code.","suppress":{"eslint":{"rules":["no-inline-comments"]},"oxlint":{"rules":["no-inline-comments"]}}}}]}
@@ -0,0 +1 @@
1
+ {"format":"rerail.policy/v1","id":"eslint-no-iterator","revision":3,"mode":"steer","description":"Port of ESLint's `no-iterator` (https://eslint.org/docs/latest/rules/no-iterator). Flags member accesses whose static property name (getStaticPropertyName) is `__iterator__`: a non-computed name (identifier escapes decoded), or a string or substitution-free template index by its cooked value.","scope":{"include":["**/*"],"exclude":[]},"clauses":[{"id":"iterator-member","forbid":{"ast":{"language":"typescript","utils":{"static-str":{"any":[{"kind":"string"},{"kind":"template_string","not":{"has":{"kind":"template_substitution","stopBy":"neighbor"}}},{"kind":"parenthesized_expression","has":{"stopBy":"neighbor","matches":"static-str"}}]}},"rule":{"any":[{"kind":"member_expression","has":{"kind":"property_identifier","stopBy":"neighbor","regex":"^(?:[_]|\\\\u005[fF]|\\\\u\\{0*5[fF]\\})(?:[_]|\\\\u005[fF]|\\\\u\\{0*5[fF]\\})(?:[i]|\\\\u0069|\\\\u\\{0*69\\})(?:[t]|\\\\u0074|\\\\u\\{0*74\\})(?:[e]|\\\\u0065|\\\\u\\{0*65\\})(?:[r]|\\\\u0072|\\\\u\\{0*72\\})(?:[a]|\\\\u0061|\\\\u\\{0*61\\})(?:[t]|\\\\u0074|\\\\u\\{0*74\\})(?:[o]|\\\\u006[fF]|\\\\u\\{0*6[fF]\\})(?:[r]|\\\\u0072|\\\\u\\{0*72\\})(?:[_]|\\\\u005[fF]|\\\\u\\{0*5[fF]\\})(?:[_]|\\\\u005[fF]|\\\\u\\{0*5[fF]\\})$"}},{"kind":"subscript_expression","has":{"stopBy":"neighbor","precedes":{"regex":"^\\]$","stopBy":"neighbor"},"matches":"static-str","value":{"eq":"__iterator__"}}}]}}},"violation":{"anchor":"witness.span","code":"no-iterator","message":"Reserved name '__iterator__'.","suppress":{"eslint":{"rules":["no-iterator"]},"oxlint":{"rules":["no-iterator"]}}}}]}
@@ -0,0 +1 @@
1
+ {"format":"rerail.policy/v1","id":"eslint-no-loss-of-precision","revision":4,"mode":"steer","description":"Port of ESLint's `no-loss-of-precision` rule (https://eslint.org/docs/latest/rules/no-loss-of-precision). Binary literals whose significant bits span more than 53; decimal literals whose significant digits differ from those of the number they store (String(v) through `transform` with `value: true`: overflow to Infinity and underflow to zero included); hex and octal literals, as binary ones, by the span of their significant bits.","scope":{"include":["**/*"],"exclude":[]},"clauses":[{"id":"binary-over-53-bits","forbid":{"ast":{"language":"typescript","rule":{"kind":"number","regex":"^0[bB][0_]*1(?:_*[01]){52,}_*1[01_]*$"}}},"violation":{"anchor":"witness.span","code":"no-loss-of-precision","message":"This number literal will lose precision at runtime.","suppress":{"eslint":{"rules":["no-loss-of-precision"]},"oxlint":{"rules":["no-loss-of-precision"]},"biome":{"rules":["lint/correctness/noPrecisionLoss"]}}}},{"id":"hex-over-53-bits","forbid":{"ast":{"language":"typescript","rule":{"kind":"number","regex":"^0[xX][0_]*(?:1(?:_*[0-9a-fA-F]){13,}_*[13579bdfBDF]|1(?:_*[0-9a-fA-F]){13,}_*[26aeAE]|1(?:_*[0-9a-fA-F]){13,}_*[4cC]|1(?:_*[0-9a-fA-F]){13,}_*8|[23](?:_*[0-9a-fA-F]){12,}_*[13579bdfBDF]|[23](?:_*[0-9a-fA-F]){13,}_*[26aeAE]|[23](?:_*[0-9a-fA-F]){13,}_*[4cC]|[23](?:_*[0-9a-fA-F]){13,}_*8|[4-7](?:_*[0-9a-fA-F]){12,}_*[13579bdfBDF]|[4-7](?:_*[0-9a-fA-F]){12,}_*[26aeAE]|[4-7](?:_*[0-9a-fA-F]){13,}_*[4cC]|[4-7](?:_*[0-9a-fA-F]){13,}_*8|[89a-fA-F](?:_*[0-9a-fA-F]){12,}_*[13579bdfBDF]|[89a-fA-F](?:_*[0-9a-fA-F]){12,}_*[26aeAE]|[89a-fA-F](?:_*[0-9a-fA-F]){12,}_*[4cC]|[89a-fA-F](?:_*[0-9a-fA-F]){13,}_*8)"}}},"violation":{"anchor":"witness.span","code":"no-loss-of-precision","message":"This number literal will lose precision at runtime.","suppress":{"eslint":{"rules":["no-loss-of-precision"]},"oxlint":{"rules":["no-loss-of-precision"]},"biome":{"rules":["lint/correctness/noPrecisionLoss"]}}}},{"id":"octal-over-53-bits","forbid":{"ast":{"language":"typescript","rule":{"kind":"number","regex":"^0[oO]?[0_]*(?:1(?:_*[0-7]){17,}_*[1357]|1(?:_*[0-7]){17,}_*[26]|1(?:_*[0-7]){18,}_*4|[23](?:_*[0-7]){17,}_*[1357]|[23](?:_*[0-7]){17,}_*[26]|[23](?:_*[0-7]){17,}_*4|[4-7](?:_*[0-7]){16,}_*[1357]|[4-7](?:_*[0-7]){17,}_*[26]|[4-7](?:_*[0-7]){17,}_*4)"}}},"violation":{"anchor":"witness.span","code":"no-loss-of-precision","message":"This number literal will lose precision at runtime.","suppress":{"eslint":{"rules":["no-loss-of-precision"]},"oxlint":{"rules":["no-loss-of-precision"]},"biome":{"rules":["lint/correctness/noPrecisionLoss"]}}}},{"id":"decimal-digits","forbid":{"ast":{"language":"typescript","rule":{"kind":"number","pattern":"$N","not":{"regex":"^0[xXoObB]|^0[0-9_]*[0-7]$|^0[0-7_]+$|n$"},"all":[{"regex":"^(?:[0-9_]+\\.?[0-9_]*|\\.[0-9_]+)(?:[eE][-+]?[0-9_]+)?$"},{"compare":{"left":"L4","op":"ne","right":"V4"}}]},"transform":{"L0":{"replace":{"source":"$N","replace":"_","by":""}},"L1":{"replace":{"source":"$L0","replace":"[eE].*$","by":""}},"L2":{"replace":{"source":"$L1","replace":"\\.","by":""}},"L3":{"replace":{"source":"$L2","replace":"^0+","by":""}},"L4":{"replace":{"source":"$L3","replace":"0+$","by":""}},"V0":{"replace":{"source":"$N","replace":"^-","by":"","value":true}},"V1":{"replace":{"source":"$V0","replace":"[eE].*$","by":""}},"V2":{"replace":{"source":"$V1","replace":"\\.","by":""}},"V3":{"replace":{"source":"$V2","replace":"^0+","by":""}},"V4":{"replace":{"source":"$V3","replace":"0+$","by":""}}}}},"violation":{"anchor":"witness.span","code":"no-loss-of-precision","message":"This number literal will lose precision at runtime.","suppress":{"eslint":{"rules":["no-loss-of-precision"]},"oxlint":{"rules":["no-loss-of-precision"]},"biome":{"rules":["lint/correctness/noPrecisionLoss"]}}}},{"id":"long-float","forbid":{"ast":{"language":"typescript","rule":{"kind":"number","pattern":"$N","not":{"regex":"^0[xXoObB]|^0[0-9_]*[0-7]$|^0[0-7_]+$|n$"},"all":[{"regex":"^(?:[0-9_]*\\.[0-9_]*|\\.[0-9_]+)(?:[eE][-+]?[0-9_]+)?$"},{"regex":"^[0._]*[1-9](?:[._]*[0-9]){17,}"},{"compare":{"left":"L4","op":"eq","right":"V4"}},{"compare":{"left":"VI","op":"ne","right":"E"}}]},"transform":{"L0":{"replace":{"source":"$N","replace":"_","by":""}},"L1":{"replace":{"source":"$L0","replace":"[eE].*$","by":""}},"L2":{"replace":{"source":"$L1","replace":"\\.","by":""}},"L3":{"replace":{"source":"$L2","replace":"^0+","by":""}},"L4":{"replace":{"source":"$L3","replace":"0+$","by":""}},"V0":{"replace":{"source":"$N","replace":"^-","by":"","value":true}},"V1":{"replace":{"source":"$V0","replace":"[eE].*$","by":""}},"V2":{"replace":{"source":"$V1","replace":"\\.","by":""}},"V3":{"replace":{"source":"$V2","replace":"^0+","by":""}},"V4":{"replace":{"source":"$V3","replace":"0+$","by":""}},"VI":{"replace":{"source":"$V0","replace":"^[0-9]{1,16}$","by":""}},"E":{"replace":{"source":"$N","replace":"(?s)^.*$","by":""}}}}},"violation":{"anchor":"witness.span","code":"no-loss-of-precision","message":"This number literal will lose precision at runtime.","suppress":{"eslint":{"rules":["no-loss-of-precision"]},"oxlint":{"rules":["no-loss-of-precision"]},"biome":{"rules":["lint/correctness/noPrecisionLoss"]}}}}]}
@@ -0,0 +1,61 @@
1
+ {
2
+ "format": "rerail.policy/v1",
3
+ "id": "eslint-no-multi-str",
4
+ "revision": 3,
5
+ "mode": "steer",
6
+ "description": "Port of ESLint's `no-multi-str` rule (https://eslint.org/docs/latest/rules/no-multi-str). Reports a string literal whose source text contains a line break (a backslash line continuation), unless its parent is a JSX attribute or JSX expression container.",
7
+ "scope": {
8
+ "include": [
9
+ "**/*"
10
+ ],
11
+ "exclude": []
12
+ },
13
+ "clauses": [
14
+ {
15
+ "id": "multiline-string",
16
+ "forbid": {
17
+ "ast": {
18
+ "language": "typescript",
19
+ "rule": {
20
+ "kind": "string",
21
+ "regex": "[\\r\\n\\u2028\\u2029]",
22
+ "not": {
23
+ "inside": {
24
+ "any": [
25
+ {
26
+ "kind": "jsx_attribute"
27
+ },
28
+ {
29
+ "kind": "jsx_expression"
30
+ }
31
+ ]
32
+ }
33
+ }
34
+ }
35
+ }
36
+ },
37
+ "violation": {
38
+ "anchor": "witness.span",
39
+ "code": "no-multi-str",
40
+ "message": "Multiline support is limited to browsers supporting ES5 only.",
41
+ "suppress": {
42
+ "eslint": {
43
+ "rules": [
44
+ "no-multi-str"
45
+ ]
46
+ },
47
+ "oxlint": {
48
+ "rules": [
49
+ "no-multi-str"
50
+ ]
51
+ },
52
+ "biome": {
53
+ "rules": [
54
+ "lint/style/noMultilineString"
55
+ ]
56
+ }
57
+ }
58
+ }
59
+ }
60
+ ]
61
+ }
@@ -0,0 +1,114 @@
1
+ {
2
+ "format": "rerail.policy/v1",
3
+ "id": "eslint-no-negated-condition",
4
+ "revision": 3,
5
+ "mode": "steer",
6
+ "description": "Port of ESLint's `no-negated-condition` (https://eslint.org/docs/latest/rules/no-negated-condition). Flags `if` with a plain `else` and ternaries whose test is `!x`, `!=` or `!==`.",
7
+ "scope": {
8
+ "include": [
9
+ "**/*"
10
+ ],
11
+ "exclude": []
12
+ },
13
+ "clauses": [
14
+ {
15
+ "id": "negated-condition",
16
+ "forbid": {
17
+ "ast": {
18
+ "language": "typescript",
19
+ "rule": {
20
+ "any": [
21
+ {
22
+ "kind": "if_statement",
23
+ "all": [
24
+ {
25
+ "has": {
26
+ "kind": "parenthesized_expression",
27
+ "stopBy": "neighbor",
28
+ "has": {
29
+ "stopBy": "neighbor",
30
+ "matches": "negated"
31
+ }
32
+ }
33
+ },
34
+ {
35
+ "has": {
36
+ "kind": "else_clause",
37
+ "stopBy": "neighbor",
38
+ "not": {
39
+ "has": {
40
+ "kind": "if_statement",
41
+ "stopBy": "neighbor"
42
+ }
43
+ }
44
+ }
45
+ }
46
+ ]
47
+ },
48
+ {
49
+ "kind": "ternary_expression",
50
+ "has": {
51
+ "stopBy": "neighbor",
52
+ "matches": "negated",
53
+ "precedes": {
54
+ "regex": "^\\?$",
55
+ "stopBy": "neighbor"
56
+ }
57
+ }
58
+ }
59
+ ]
60
+ },
61
+ "utils": {
62
+ "negated": {
63
+ "any": [
64
+ {
65
+ "kind": "unary_expression",
66
+ "has": {
67
+ "regex": "^!$",
68
+ "stopBy": "neighbor"
69
+ }
70
+ },
71
+ {
72
+ "kind": "binary_expression",
73
+ "has": {
74
+ "regex": "^!==?$",
75
+ "stopBy": "neighbor"
76
+ }
77
+ },
78
+ {
79
+ "kind": "parenthesized_expression",
80
+ "has": {
81
+ "stopBy": "neighbor",
82
+ "matches": "negated"
83
+ }
84
+ }
85
+ ]
86
+ }
87
+ }
88
+ }
89
+ },
90
+ "violation": {
91
+ "anchor": "witness.span",
92
+ "code": "no-negated-condition",
93
+ "message": "Unexpected negated condition.",
94
+ "suppress": {
95
+ "eslint": {
96
+ "rules": [
97
+ "no-negated-condition"
98
+ ]
99
+ },
100
+ "oxlint": {
101
+ "rules": [
102
+ "no-negated-condition"
103
+ ]
104
+ },
105
+ "biome": {
106
+ "rules": [
107
+ "lint/style/noNegationElse"
108
+ ]
109
+ }
110
+ }
111
+ }
112
+ }
113
+ ]
114
+ }
@@ -0,0 +1,76 @@
1
+ {
2
+ "format": "rerail.policy/v1",
3
+ "id": "eslint-no-nested-ternary",
4
+ "revision": 3,
5
+ "mode": "steer",
6
+ "description": "Port of ESLint's `no-nested-ternary` rule (https://eslint.org/docs/latest/rules/no-nested-ternary). Reports a conditional expression whose consequent or alternate (through parentheses) is itself a conditional expression.",
7
+ "scope": {
8
+ "include": [
9
+ "**/*"
10
+ ],
11
+ "exclude": []
12
+ },
13
+ "clauses": [
14
+ {
15
+ "id": "nested-ternary",
16
+ "forbid": {
17
+ "ast": {
18
+ "language": "typescript",
19
+ "rule": {
20
+ "kind": "ternary_expression",
21
+ "has": {
22
+ "all": [
23
+ {
24
+ "follows": {
25
+ "regex": "^\\?$",
26
+ "stopBy": "end"
27
+ }
28
+ },
29
+ {
30
+ "any": [
31
+ {
32
+ "kind": "ternary_expression"
33
+ },
34
+ {
35
+ "kind": "parenthesized_expression",
36
+ "has": {
37
+ "kind": "ternary_expression",
38
+ "stopBy": {
39
+ "not": {
40
+ "kind": "parenthesized_expression"
41
+ }
42
+ }
43
+ }
44
+ }
45
+ ]
46
+ }
47
+ ]
48
+ }
49
+ }
50
+ }
51
+ },
52
+ "violation": {
53
+ "anchor": "witness.span",
54
+ "code": "no-nested-ternary",
55
+ "message": "Do not nest ternary expressions.",
56
+ "suppress": {
57
+ "eslint": {
58
+ "rules": [
59
+ "no-nested-ternary"
60
+ ]
61
+ },
62
+ "oxlint": {
63
+ "rules": [
64
+ "no-nested-ternary"
65
+ ]
66
+ },
67
+ "biome": {
68
+ "rules": [
69
+ "lint/style/noNestedTernary"
70
+ ]
71
+ }
72
+ }
73
+ }
74
+ }
75
+ ]
76
+ }
@@ -0,0 +1,89 @@
1
+ {
2
+ "format": "rerail.policy/v1",
3
+ "id": "eslint-no-new-wrappers",
4
+ "revision": 3,
5
+ "mode": "steer",
6
+ "description": "ESLint 10.11.0 no-new-wrappers, default options. Port of ESLint's `no-new-wrappers` rule (https://eslint.org/docs/latest/rules/no-new-wrappers). Flags `new` of the global String, Number or Boolean (resolved with `resolves`).",
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": "new-wrapper",
23
+ "forbid": {
24
+ "ast": {
25
+ "language": "typescript",
26
+ "languageOptions": {},
27
+ "rule": {
28
+ "kind": "new_expression",
29
+ "has": {
30
+ "matches": "callee"
31
+ }
32
+ },
33
+ "utils": {
34
+ "callee": {
35
+ "any": [
36
+ {
37
+ "all": [
38
+ {
39
+ "kind": "identifier",
40
+ "resolves": {
41
+ "global": [
42
+ "String",
43
+ "Number",
44
+ "Boolean"
45
+ ],
46
+ "directives": "eslint"
47
+ }
48
+ },
49
+ {
50
+ "pattern": "$FN"
51
+ }
52
+ ]
53
+ },
54
+ {
55
+ "kind": "parenthesized_expression",
56
+ "has": {
57
+ "matches": "callee"
58
+ }
59
+ }
60
+ ]
61
+ }
62
+ }
63
+ }
64
+ },
65
+ "violation": {
66
+ "anchor": "witness.span",
67
+ "code": "no-new-wrappers",
68
+ "message": "Do not use $FN as a constructor.",
69
+ "suppress": {
70
+ "eslint": {
71
+ "rules": [
72
+ "no-new-wrappers"
73
+ ]
74
+ },
75
+ "oxlint": {
76
+ "rules": [
77
+ "no-new-wrappers"
78
+ ]
79
+ },
80
+ "biome": {
81
+ "rules": [
82
+ "lint/style/useConsistentBuiltinInstantiation"
83
+ ]
84
+ }
85
+ }
86
+ }
87
+ }
88
+ ]
89
+ }