@neralabs/rerail-pack-javascript 0.1.2 → 0.1.4

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 (76) hide show
  1. package/README.md +416 -3
  2. package/licenses/eslint/UPSTREAM.md +28 -3
  3. package/licenses/eslint-plugin-unicorn/UPSTREAM.md +39 -2
  4. package/pack.json +43 -3
  5. package/package.json +1 -1
  6. package/rules/eslint-arrow-body-style.json +1 -1
  7. package/rules/eslint-capitalized-comments.json +1 -1
  8. package/rules/eslint-curly.json +1 -0
  9. package/rules/eslint-default-case-last.json +1 -1
  10. package/rules/eslint-default-case.json +1 -1
  11. package/rules/eslint-eqeqeq.json +1 -1
  12. package/rules/eslint-func-style.json +1 -1
  13. package/rules/eslint-guard-for-in.json +1 -1
  14. package/rules/eslint-no-bitwise.json +1 -1
  15. package/rules/eslint-no-caller.json +2 -2
  16. package/rules/eslint-no-case-declarations.json +2 -2
  17. package/rules/eslint-no-compare-neg-zero.json +2 -2
  18. package/rules/eslint-no-cond-assign.json +1 -1
  19. package/rules/eslint-no-console.json +1 -1
  20. package/rules/eslint-no-continue.json +2 -2
  21. package/rules/eslint-no-debugger.json +1 -1
  22. package/rules/eslint-no-delete-var.json +2 -2
  23. package/rules/eslint-no-div-regex.json +1 -1
  24. package/rules/eslint-no-dupe-keys.json +3 -7
  25. package/rules/eslint-no-duplicate-case.json +2 -2
  26. package/rules/eslint-no-empty-pattern.json +1 -1
  27. package/rules/eslint-no-empty-static-block.json +2 -2
  28. package/rules/eslint-no-empty.json +2 -2
  29. package/rules/eslint-no-eq-null.json +1 -1
  30. package/rules/eslint-no-extend-native.json +1 -1
  31. package/rules/eslint-no-inline-comments.json +1 -1
  32. package/rules/eslint-no-iterator.json +1 -1
  33. package/rules/eslint-no-labels.json +1 -0
  34. package/rules/eslint-no-loss-of-precision.json +1 -1
  35. package/rules/eslint-no-multi-str.json +2 -2
  36. package/rules/eslint-no-negated-condition.json +2 -2
  37. package/rules/eslint-no-nested-ternary.json +1 -1
  38. package/rules/eslint-no-new-wrappers.json +1 -1
  39. package/rules/eslint-no-new.json +2 -2
  40. package/rules/eslint-no-nonoctal-decimal-escape.json +2 -2
  41. package/rules/eslint-no-object-constructor.json +1 -0
  42. package/rules/eslint-no-octal-escape.json +1 -1
  43. package/rules/eslint-no-octal.json +2 -2
  44. package/rules/eslint-no-plusplus.json +1 -1
  45. package/rules/eslint-no-proto.json +1 -1
  46. package/rules/eslint-no-prototype-builtins.json +3 -3
  47. package/rules/eslint-no-return-assign.json +1 -1
  48. package/rules/eslint-no-script-url.json +1 -1
  49. package/rules/eslint-no-self-compare.json +2 -2
  50. package/rules/eslint-no-sequences.json +1 -0
  51. package/rules/eslint-no-setter-return.json +1 -1
  52. package/rules/eslint-no-sparse-arrays.json +1 -1
  53. package/rules/eslint-no-template-curly-in-string.json +2 -2
  54. package/rules/eslint-no-ternary.json +1 -1
  55. package/rules/eslint-no-unneeded-ternary.json +1 -1
  56. package/rules/eslint-no-unsafe-finally.json +7 -7
  57. package/rules/eslint-no-unsafe-negation.json +1 -1
  58. package/rules/eslint-no-unused-labels.json +1 -0
  59. package/rules/eslint-no-unused-private-class-members.json +83 -0
  60. package/rules/eslint-no-useless-call.json +1 -1
  61. package/rules/eslint-no-useless-catch.json +1 -1
  62. package/rules/eslint-no-useless-concat.json +1 -1
  63. package/rules/eslint-no-void.json +1 -1
  64. package/rules/eslint-no-warning-comments.json +1 -1
  65. package/rules/eslint-no-with.json +7 -4
  66. package/rules/eslint-operator-assignment.json +1 -1
  67. package/rules/eslint-prefer-numeric-literals.json +1 -1
  68. package/rules/eslint-prefer-spread.json +1 -1
  69. package/rules/eslint-prefer-template.json +2 -2
  70. package/rules/eslint-radix.json +2 -2
  71. package/rules/eslint-sort-imports.json +1 -1
  72. package/rules/eslint-sort-keys.json +1 -1
  73. package/rules/eslint-sort-vars.json +1 -1
  74. package/rules/eslint-use-isnan.json +3 -3
  75. package/rules/eslint-valid-typeof.json +1 -1
  76. package/rules/eslint-yoda.json +1 -1
@@ -1 +1 @@
1
- {"format":"rerail.policy/v1","id":"eslint-no-plusplus","revision":4,"mode":"steer","description":"Port of ESLint's `no-plusplus` rule. Flags every ++ and -- update expression. 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":{"allowForLoopAfterthoughts":{"type":"boolean","nullable":true,"default":null}}}},{"id":"shared","define":{"language":"typescript","utils":{"afterthought":{"any":[{"inside":{"kind":"for_statement"},"precedes":{"regex":"^\\)$","stopBy":{"not":{"kind":"comment"}}}},{"inside":{"any":[{"kind":"sequence_expression"},{"kind":"parenthesized_expression"}],"matches":"afterthought"}}]},"r1":{"has":{"regex":"^\\+\\+$"},"kind":"update_expression"},"r2":{"has":{"regex":"^--$"},"kind":"update_expression"}}}},{"id":"update-increment","forbid":{"ast":{"$option":"allowForLoopAfterthoughts","cases":{"true":{"language":"typescript","rule":{"all":[{"matches":"r1"},{"not":{"matches":"afterthought"}}]}}},"default":{"language":"typescript","rule":{"matches":"r1"}}}},"violation":{"anchor":"witness.span","code":"no-plusplus","message":"Unary operator '++' used.","suppress":{"eslint":{"rules":["no-plusplus"]},"oxlint":{"rules":["no-plusplus"]},"biome":{"rules":["lint/style/noIncrementDecrement"]}}}},{"id":"update-decrement","forbid":{"ast":{"$option":"allowForLoopAfterthoughts","cases":{"true":{"language":"typescript","rule":{"all":[{"matches":"r2"},{"not":{"matches":"afterthought"}}]}}},"default":{"language":"typescript","rule":{"matches":"r2"}}}},"violation":{"anchor":"witness.span","code":"no-plusplus","message":"Unary operator '--' used.","suppress":{"eslint":{"rules":["no-plusplus"]},"oxlint":{"rules":["no-plusplus"]},"biome":{"rules":["lint/style/noIncrementDecrement"]}}}}]}
1
+ {"format":"rerail.policy/v1","id":"eslint-no-plusplus","revision":4,"mode":"steer","description":"Use += 1 and -= 1 instead of the ++ and -- operators; automatic semicolon insertion can change what they apply to.","scope":{"include":["**/*"],"exclude":[]},"clauses":[{"id":"options","define":{"options":{"allowForLoopAfterthoughts":{"type":"boolean","nullable":true,"default":null}}}},{"id":"shared","define":{"language":"typescript","utils":{"afterthought":{"any":[{"inside":{"kind":"for_statement"},"precedes":{"regex":"^\\)$","stopBy":{"not":{"kind":"comment"}}}},{"inside":{"any":[{"kind":"sequence_expression"},{"kind":"parenthesized_expression"}],"matches":"afterthought"}}]},"r1":{"has":{"regex":"^\\+\\+$"},"kind":"update_expression"},"r2":{"has":{"regex":"^--$"},"kind":"update_expression"}}}},{"id":"update-increment","forbid":{"ast":{"$option":"allowForLoopAfterthoughts","cases":{"true":{"language":"typescript","rule":{"all":[{"matches":"r1"},{"not":{"matches":"afterthought"}}]}}},"default":{"language":"typescript","rule":{"matches":"r1"}}}},"violation":{"anchor":"witness.span","code":"no-plusplus","message":"Replace ++ with += 1, moving it to its own statement if its value is used.","suppress":{"eslint":{"rules":["no-plusplus"]},"oxlint":{"rules":["no-plusplus"]},"biome":{"rules":["lint/style/noIncrementDecrement"]}}}},{"id":"update-decrement","forbid":{"ast":{"$option":"allowForLoopAfterthoughts","cases":{"true":{"language":"typescript","rule":{"all":[{"matches":"r2"},{"not":{"matches":"afterthought"}}]}}},"default":{"language":"typescript","rule":{"matches":"r2"}}}},"violation":{"anchor":"witness.span","code":"no-plusplus","message":"Replace -- with -= 1, moving it to its own statement if its value is used.","suppress":{"eslint":{"rules":["no-plusplus"]},"oxlint":{"rules":["no-plusplus"]},"biome":{"rules":["lint/style/noIncrementDecrement"]}}}}]}
@@ -1 +1 @@
1
- {"format":"rerail.policy/v1","id":"eslint-no-proto","revision":4,"mode":"steer","description":"Port of ESLint's `no-proto` rule (https://eslint.org/docs/latest/rules/no-proto). Flags member accesses whose static property name (getStaticPropertyName) is `__proto__`: a non-computed name (identifier escapes decoded), or a string or substitution-free template index by its cooked value.","scope":{"include":["**/*"],"exclude":[]},"clauses":[{"id":"proto-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]\\})(?:[p]|\\\\u0070|\\\\u\\{0*70\\})(?:[r]|\\\\u0072|\\\\u\\{0*72\\})(?:[o]|\\\\u006[fF]|\\\\u\\{0*6[fF]\\})(?:[t]|\\\\u0074|\\\\u\\{0*74\\})(?:[o]|\\\\u006[fF]|\\\\u\\{0*6[fF]\\})(?:[_]|\\\\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":"__proto__"}}}]}}},"violation":{"anchor":"witness.span","code":"no-proto","message":"The '__proto__' property is deprecated.","suppress":{"eslint":{"rules":["no-proto"]},"oxlint":{"rules":["no-proto"]},"biome":{"rules":["lint/suspicious/noProto"]}}}}]}
1
+ {"format":"rerail.policy/v1","id":"eslint-no-proto","revision":4,"mode":"steer","description":"Avoid the deprecated __proto__ property; use Object.getPrototypeOf() and Object.setPrototypeOf() instead.","scope":{"include":["**/*"],"exclude":[]},"clauses":[{"id":"proto-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]\\})(?:[p]|\\\\u0070|\\\\u\\{0*70\\})(?:[r]|\\\\u0072|\\\\u\\{0*72\\})(?:[o]|\\\\u006[fF]|\\\\u\\{0*6[fF]\\})(?:[t]|\\\\u0074|\\\\u\\{0*74\\})(?:[o]|\\\\u006[fF]|\\\\u\\{0*6[fF]\\})(?:[_]|\\\\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":"__proto__"}}}]}}},"violation":{"anchor":"witness.span","code":"no-proto","message":"Replace __proto__ with Object.getPrototypeOf() or Object.setPrototypeOf().","suppress":{"eslint":{"rules":["no-proto"]},"oxlint":{"rules":["no-proto"]},"biome":{"rules":["lint/suspicious/noProto"]}}}}]}
@@ -3,7 +3,7 @@
3
3
  "id": "eslint-no-prototype-builtins",
4
4
  "revision": 3,
5
5
  "mode": "steer",
6
- "description": "Port of ESLint's `no-prototype-builtins` rule (https://eslint.org/docs/latest/rules/no-prototype-builtins). Flags calling hasOwnProperty, isPrototypeOf or propertyIsEnumerable as a method of an object, reported at the property. Scope only matters to ESLint's suggestion, which is not a fix.",
6
+ "description": "Call hasOwnProperty, isPrototypeOf and propertyIsEnumerable through Object.prototype, not on the object; it may shadow them or have no prototype.",
7
7
  "scope": {
8
8
  "include": [
9
9
  "**/*"
@@ -47,7 +47,7 @@
47
47
  "violation": {
48
48
  "anchor": "capture.PROP",
49
49
  "code": "no-prototype-builtins",
50
- "message": "Do not access Object.prototype method '$PROP' from target object.",
50
+ "message": "Call Object.prototype.$PROP.call(obj, ...) instead; the object may override $PROP or have no prototype.",
51
51
  "suppress": {
52
52
  "eslint": {
53
53
  "rules": [
@@ -119,7 +119,7 @@
119
119
  "violation": {
120
120
  "anchor": "capture.PROP",
121
121
  "code": "no-prototype-builtins",
122
- "message": "Do not access Object.prototype method '$NAME' from target object.",
122
+ "message": "Call Object.prototype.$NAME.call(obj, ...) instead; the object may override $NAME or have no prototype.",
123
123
  "suppress": {
124
124
  "eslint": {
125
125
  "rules": [
@@ -1 +1 @@
1
- {"format":"rerail.policy/v1","id":"eslint-no-return-assign","revision":4,"mode":"steer","description":"Port of ESLint's `no-return-assign` (https://eslint.org/docs/latest/rules/no-return-assign) with its default `except-parens`: an unparenthesized assignment whose nearest statement/function/class ancestor is a `return` or an expression-bodied arrow, reported at that ancestor. 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":{"assign":{"any":[{"kind":"assignment_expression"},{"kind":"augmented_assignment_expression"}]},"parenthesised":{"all":[{"follows":{"regex":"^\\($","stopBy":"neighbor"}},{"precedes":{"regex":"^\\)$","stopBy":"neighbor"}}]},"sentinel":{"any":[{"kind":"expression_statement"},{"kind":"return_statement"},{"kind":"if_statement"},{"kind":"statement_block"},{"kind":"for_statement"},{"kind":"for_in_statement"},{"kind":"while_statement"},{"kind":"do_statement"},{"kind":"try_statement"},{"kind":"throw_statement"},{"kind":"switch_statement"},{"kind":"break_statement"},{"kind":"continue_statement"},{"kind":"labeled_statement"},{"kind":"empty_statement"},{"kind":"with_statement"},{"kind":"debugger_statement"},{"kind":"arrow_function"},{"kind":"function_expression"},{"kind":"generator_function"},{"kind":"class"}]}}}},{"id":"return-assignment","forbid":{"ast":{"language":"typescript","rule":{"all":[{"matches":"assign"},{"$option":"option","cases":{"always":[]},"default":[{"not":{"matches":"parenthesised"}}],"spread":true},{"inside":{"stopBy":{"matches":"sentinel"},"all":[{"kind":"return_statement"},{"pattern":"$SENT"}]}}]}}},"violation":{"anchor":"capture.SENT","code":"no-return-assign","message":"Return statement should not contain assignment.","suppress":{"eslint":{"rules":["no-return-assign"]},"oxlint":{"rules":["no-return-assign"]},"biome":{"rules":["lint/suspicious/noReturnAssign"]}}}},{"id":"arrow-assignment","forbid":{"ast":{"language":"typescript","rule":{"all":[{"matches":"assign"},{"$option":"option","cases":{"always":[]},"default":[{"not":{"matches":"parenthesised"}}],"spread":true},{"not":{"inside":{"kind":"formal_parameters","stopBy":{"matches":"sentinel"}}}},{"inside":{"stopBy":{"matches":"sentinel"},"all":[{"kind":"arrow_function"},{"pattern":"$SENT"}]}}]}}},"violation":{"anchor":"capture.SENT","code":"no-return-assign","message":"Arrow function should not return assignment.","suppress":{"eslint":{"rules":["no-return-assign"]},"oxlint":{"rules":["no-return-assign"]},"biome":{"rules":["lint/suspicious/noReturnAssign"]}}}}]}
1
+ {"format":"rerail.policy/v1","id":"eslint-no-return-assign","revision":4,"mode":"steer","description":"Don't assign inside a return statement or an arrow function's expression body unless it is wrapped in parentheses; it reads like a mistyped comparison.","scope":{"include":["**/*"],"exclude":[]},"clauses":[{"id":"options","define":{"options":{"option":{"type":"string","nullable":true,"default":null}}}},{"id":"shared","define":{"language":"typescript","utils":{"assign":{"any":[{"kind":"assignment_expression"},{"kind":"augmented_assignment_expression"}]},"parenthesised":{"all":[{"follows":{"regex":"^\\($","stopBy":"neighbor"}},{"precedes":{"regex":"^\\)$","stopBy":"neighbor"}}]},"sentinel":{"any":[{"kind":"expression_statement"},{"kind":"return_statement"},{"kind":"if_statement"},{"kind":"statement_block"},{"kind":"for_statement"},{"kind":"for_in_statement"},{"kind":"while_statement"},{"kind":"do_statement"},{"kind":"try_statement"},{"kind":"throw_statement"},{"kind":"switch_statement"},{"kind":"break_statement"},{"kind":"continue_statement"},{"kind":"labeled_statement"},{"kind":"empty_statement"},{"kind":"with_statement"},{"kind":"debugger_statement"},{"kind":"arrow_function"},{"kind":"function_expression"},{"kind":"generator_function"},{"kind":"class"}]}}}},{"id":"return-assignment","forbid":{"ast":{"language":"typescript","rule":{"all":[{"matches":"assign"},{"$option":"option","cases":{"always":[]},"default":[{"not":{"matches":"parenthesised"}}],"spread":true},{"inside":{"stopBy":{"matches":"sentinel"},"all":[{"kind":"return_statement"},{"pattern":"$SENT"}]}}]}}},"violation":{"anchor":"capture.SENT","code":"no-return-assign","message":"Return statement should not contain assignment.","suppress":{"eslint":{"rules":["no-return-assign"]},"oxlint":{"rules":["no-return-assign"]},"biome":{"rules":["lint/suspicious/noReturnAssign"]}}}},{"id":"arrow-assignment","forbid":{"ast":{"language":"typescript","rule":{"all":[{"matches":"assign"},{"$option":"option","cases":{"always":[]},"default":[{"not":{"matches":"parenthesised"}}],"spread":true},{"not":{"inside":{"kind":"formal_parameters","stopBy":{"matches":"sentinel"}}}},{"inside":{"stopBy":{"matches":"sentinel"},"all":[{"kind":"arrow_function"},{"pattern":"$SENT"}]}}]}}},"violation":{"anchor":"capture.SENT","code":"no-return-assign","message":"Arrow function should not return assignment.","suppress":{"eslint":{"rules":["no-return-assign"]},"oxlint":{"rules":["no-return-assign"]},"biome":{"rules":["lint/suspicious/noReturnAssign"]}}}}]}
@@ -3,7 +3,7 @@
3
3
  "id": "eslint-no-script-url",
4
4
  "revision": 4,
5
5
  "mode": "steer",
6
- "description": "ESLint 10.11.0 no-script-url, default options. Port of ESLint's `no-script-url` rule (https://eslint.org/docs/latest/rules/no-script-url). Flags string literals and untagged, substitution-free template literals whose value starts with `javascript:` (case-insensitive): cooked, or for a JSX attribute string raw with HTML character references decoded.",
6
+ "description": "Avoid javascript: URLs in strings and template literals; running code from a URL is a form of eval.",
7
7
  "scope": {
8
8
  "include": [
9
9
  "**/*.ts",
@@ -3,7 +3,7 @@
3
3
  "id": "eslint-no-self-compare",
4
4
  "revision": 4,
5
5
  "mode": "steer",
6
- "description": "ESLint 10.11.0 no-self-compare, default options. Port of ESLint's `no-self-compare` rule (https://eslint.org/docs/latest/rules/no-self-compare). Reports an equality or relational comparison whose operands (parentheses around an operand aside, as ESTree drops them) have the same tokens, comments aside.",
6
+ "description": "Don't compare a value to itself; the result is fixed, and to check for NaN use Number.isNaN() instead.",
7
7
  "scope": {
8
8
  "include": [
9
9
  "**/*.ts",
@@ -97,7 +97,7 @@
97
97
  "violation": {
98
98
  "anchor": "witness.span",
99
99
  "code": "no-self-compare",
100
- "message": "Comparing to itself is potentially pointless.",
100
+ "message": "Compare against the intended value instead of itself, or use Number.isNaN() to test for NaN.",
101
101
  "suppress": {
102
102
  "eslint": {
103
103
  "rules": [
@@ -0,0 +1 @@
1
+ {"format":"rerail.policy/v1","id":"eslint-no-sequences","revision":2,"mode":"steer","description":"Avoid the comma operator outside for-loop headers unless the sequence is wrapped in parentheses; it hides side effects and is easily mistaken for a separator.","scope":{"include":["**/*"],"exclude":[]},"clauses":[{"id":"options","define":{"options":{"allowInParentheses":{"type":"boolean","nullable":true,"default":null}}}},{"id":"comma-operator","forbid":{"ast":{"language":"typescript","rule":{"regex":"^,$","not":{"follows":{"regex":"^,$","stopBy":"end"}},"inside":{"kind":"sequence_expression","stopBy":"neighbor","not":{"any":[{"matches":"for-init-or-update"},{"$option":"allowInParentheses","cases":{"false":[]},"default":[{"matches":"intent-parens"}],"spread":true}]}}},"utils":{"for-init-or-update":{"any":[{"inside":{"kind":"for_statement","stopBy":"neighbor"},"any":[{"follows":{"regex":"^\\($","stopBy":"neighbor"}},{"precedes":{"regex":"^\\)$","stopBy":"neighbor"}}]},{"inside":{"kind":"parenthesized_expression","stopBy":"neighbor","matches":"for-init-or-update"}}]},"intent-parens":{"inside":{"kind":"parenthesized_expression","stopBy":"neighbor","any":[{"not":{"inside":{"stopBy":"neighbor","any":[{"kind":"if_statement"},{"kind":"while_statement"},{"kind":"do_statement"},{"kind":"switch_statement"},{"kind":"with_statement"},{"kind":"arrow_function"}]}}},{"inside":{"kind":"parenthesized_expression","stopBy":"neighbor"}}]}}}}},"violation":{"anchor":"witness.span","code":"no-sequences","message":"Unexpected use of comma operator.","suppress":{"eslint":{"rules":["no-sequences"]},"oxlint":{"rules":["no-sequences"]},"biome":{"rules":["lint/complexity/noCommaOperator"]}}}}]}
@@ -1 +1 @@
1
- {"format":"rerail.policy/v1","id":"eslint-no-setter-return","revision":3,"mode":"steer","description":"Port of ESLint's `no-setter-return` rule (https://eslint.org/docs/latest/rules/no-setter-return). Flags `return <value>` in a setter (class or object `set` accessor, or the `set` function of a property descriptor passed to Object.defineProperty, Reflect.defineProperty, Object.defineProperties or Object.create), and an arrow descriptor setter's expression body. `Object` and `Reflect` must resolve to declared globals (`resolves` under `ast.languageOptions`).","scope":{"include":["**/*"],"exclude":[]},"clauses":[{"id":"return-value","forbid":{"ast":{"language":"typescript","languageOptions":{},"rule":{"kind":"return_statement","has":{"stopBy":"neighbor","not":{"regex":"^(return|;)$"}},"inside":{"stopBy":{"any":[{"kind":"function_declaration"},{"kind":"generator_function_declaration"},{"kind":"function_expression"},{"kind":"generator_function"},{"kind":"arrow_function"},{"kind":"method_definition"}]},"matches":"setter"}},"utils":{"callee-Object-defineProperty":{"any":[{"kind":"member_expression","all":[{"has":{"stopBy":"neighbor","any":[{"kind":"identifier"},{"kind":"parenthesized_expression"}],"resolves":{"global":["Object"],"directives":"eslint"}}},{"has":{"stopBy":"neighbor","kind":"property_identifier","regex":"^(defineProperty)$"}}]},{"kind":"subscript_expression","all":[{"has":{"stopBy":"neighbor","any":[{"kind":"identifier"},{"kind":"parenthesized_expression"}],"resolves":{"global":["Object"],"directives":"eslint"}}},{"has":{"stopBy":"neighbor","any":[{"kind":"string"},{"kind":"template_string"}],"regex":"^['\"`](defineProperty)['\"`]$"}}]},{"kind":"parenthesized_expression","has":{"stopBy":"neighbor","matches":"callee-Object-defineProperty"}}]},"callee-Reflect-defineProperty":{"any":[{"kind":"member_expression","all":[{"has":{"stopBy":"neighbor","any":[{"kind":"identifier"},{"kind":"parenthesized_expression"}],"resolves":{"global":["Reflect"],"directives":"eslint"}}},{"has":{"stopBy":"neighbor","kind":"property_identifier","regex":"^(defineProperty)$"}}]},{"kind":"subscript_expression","all":[{"has":{"stopBy":"neighbor","any":[{"kind":"identifier"},{"kind":"parenthesized_expression"}],"resolves":{"global":["Reflect"],"directives":"eslint"}}},{"has":{"stopBy":"neighbor","any":[{"kind":"string"},{"kind":"template_string"}],"regex":"^['\"`](defineProperty)['\"`]$"}}]},{"kind":"parenthesized_expression","has":{"stopBy":"neighbor","matches":"callee-Reflect-defineProperty"}}]},"callee-Object-create-defineProperties":{"any":[{"kind":"member_expression","all":[{"has":{"stopBy":"neighbor","any":[{"kind":"identifier"},{"kind":"parenthesized_expression"}],"resolves":{"global":["Object"],"directives":"eslint"}}},{"has":{"stopBy":"neighbor","kind":"property_identifier","regex":"^(create|defineProperties)$"}}]},{"kind":"subscript_expression","all":[{"has":{"stopBy":"neighbor","any":[{"kind":"identifier"},{"kind":"parenthesized_expression"}],"resolves":{"global":["Object"],"directives":"eslint"}}},{"has":{"stopBy":"neighbor","any":[{"kind":"string"},{"kind":"template_string"}],"regex":"^['\"`](create|defineProperties)['\"`]$"}}]},{"kind":"parenthesized_expression","has":{"stopBy":"neighbor","matches":"callee-Object-create-defineProperties"}}]},"descriptor":{"kind":"object","any":[{"inside":{"kind":"arguments","stopBy":"neighbor","inside":{"kind":"call_expression","stopBy":"neighbor","has":{"stopBy":"neighbor","any":[{"matches":"callee-Object-defineProperty"},{"matches":"callee-Reflect-defineProperty"}],"not":{"follows":{"regex":"[\\s\\S]","stopBy":"neighbor"}}}}},"count":{"follows":{"regex":"^,$","stopBy":"end"},"min":2,"max":2}},{"inside":{"kind":"pair","stopBy":"neighbor","inside":{"kind":"object","stopBy":"neighbor","inside":{"kind":"arguments","stopBy":"neighbor","inside":{"kind":"call_expression","stopBy":"neighbor","has":{"stopBy":"neighbor","any":[{"matches":"callee-Object-create-defineProperties"}],"not":{"follows":{"regex":"[\\s\\S]","stopBy":"neighbor"}}}}},"count":{"follows":{"regex":"^,$","stopBy":"end"},"min":1,"max":1}}}}]},"setter":{"any":[{"kind":"method_definition","has":{"regex":"^set$","not":{"kind":"property_identifier"},"stopBy":"neighbor"}},{"kind":"method_definition","all":[{"not":{"has":{"regex":"^get$","not":{"kind":"property_identifier"},"stopBy":"neighbor"}}},{"has":{"stopBy":"neighbor","any":[{"kind":"property_identifier","regex":"^set$"},{"kind":"string","regex":"^['\"]set['\"]$"},{"kind":"computed_property_name","has":{"stopBy":"neighbor","any":[{"kind":"string","regex":"^['\"]set['\"]$"},{"kind":"template_string","regex":"^`set`$"}]}}]}}],"inside":{"stopBy":"neighbor","matches":"descriptor"}},{"any":[{"kind":"function_expression"},{"kind":"generator_function"},{"kind":"arrow_function"}],"inside":{"kind":"pair","stopBy":"neighbor","has":{"stopBy":"neighbor","any":[{"kind":"property_identifier","regex":"^set$"},{"kind":"string","regex":"^['\"]set['\"]$"},{"kind":"computed_property_name","has":{"stopBy":"neighbor","any":[{"kind":"string","regex":"^['\"]set['\"]$"},{"kind":"template_string","regex":"^`set`$"}]}}],"not":{"follows":{"regex":"[\\s\\S]","stopBy":"neighbor"}}},"inside":{"stopBy":"neighbor","matches":"descriptor"}}}]}}}},"violation":{"anchor":"witness.span","code":"no-setter-return","message":"Setter cannot return a value.","suppress":{"eslint":{"rules":["no-setter-return"]},"oxlint":{"rules":["no-setter-return"]},"biome":{"rules":["lint/correctness/noSetterReturn"]}}}},{"id":"arrow-expression-body","forbid":{"ast":{"language":"typescript","languageOptions":{},"rule":{"not":{"any":[{"kind":"statement_block"},{"regex":"^=>$"}]},"follows":{"regex":"^=>$","stopBy":"neighbor"},"inside":{"stopBy":"neighbor","kind":"arrow_function","matches":"setter"}},"utils":{"callee-Object-defineProperty":{"any":[{"kind":"member_expression","all":[{"has":{"stopBy":"neighbor","any":[{"kind":"identifier"},{"kind":"parenthesized_expression"}],"resolves":{"global":["Object"],"directives":"eslint"}}},{"has":{"stopBy":"neighbor","kind":"property_identifier","regex":"^(defineProperty)$"}}]},{"kind":"subscript_expression","all":[{"has":{"stopBy":"neighbor","any":[{"kind":"identifier"},{"kind":"parenthesized_expression"}],"resolves":{"global":["Object"],"directives":"eslint"}}},{"has":{"stopBy":"neighbor","any":[{"kind":"string"},{"kind":"template_string"}],"regex":"^['\"`](defineProperty)['\"`]$"}}]},{"kind":"parenthesized_expression","has":{"stopBy":"neighbor","matches":"callee-Object-defineProperty"}}]},"callee-Reflect-defineProperty":{"any":[{"kind":"member_expression","all":[{"has":{"stopBy":"neighbor","any":[{"kind":"identifier"},{"kind":"parenthesized_expression"}],"resolves":{"global":["Reflect"],"directives":"eslint"}}},{"has":{"stopBy":"neighbor","kind":"property_identifier","regex":"^(defineProperty)$"}}]},{"kind":"subscript_expression","all":[{"has":{"stopBy":"neighbor","any":[{"kind":"identifier"},{"kind":"parenthesized_expression"}],"resolves":{"global":["Reflect"],"directives":"eslint"}}},{"has":{"stopBy":"neighbor","any":[{"kind":"string"},{"kind":"template_string"}],"regex":"^['\"`](defineProperty)['\"`]$"}}]},{"kind":"parenthesized_expression","has":{"stopBy":"neighbor","matches":"callee-Reflect-defineProperty"}}]},"callee-Object-create-defineProperties":{"any":[{"kind":"member_expression","all":[{"has":{"stopBy":"neighbor","any":[{"kind":"identifier"},{"kind":"parenthesized_expression"}],"resolves":{"global":["Object"],"directives":"eslint"}}},{"has":{"stopBy":"neighbor","kind":"property_identifier","regex":"^(create|defineProperties)$"}}]},{"kind":"subscript_expression","all":[{"has":{"stopBy":"neighbor","any":[{"kind":"identifier"},{"kind":"parenthesized_expression"}],"resolves":{"global":["Object"],"directives":"eslint"}}},{"has":{"stopBy":"neighbor","any":[{"kind":"string"},{"kind":"template_string"}],"regex":"^['\"`](create|defineProperties)['\"`]$"}}]},{"kind":"parenthesized_expression","has":{"stopBy":"neighbor","matches":"callee-Object-create-defineProperties"}}]},"descriptor":{"kind":"object","any":[{"inside":{"kind":"arguments","stopBy":"neighbor","inside":{"kind":"call_expression","stopBy":"neighbor","has":{"stopBy":"neighbor","any":[{"matches":"callee-Object-defineProperty"},{"matches":"callee-Reflect-defineProperty"}],"not":{"follows":{"regex":"[\\s\\S]","stopBy":"neighbor"}}}}},"count":{"follows":{"regex":"^,$","stopBy":"end"},"min":2,"max":2}},{"inside":{"kind":"pair","stopBy":"neighbor","inside":{"kind":"object","stopBy":"neighbor","inside":{"kind":"arguments","stopBy":"neighbor","inside":{"kind":"call_expression","stopBy":"neighbor","has":{"stopBy":"neighbor","any":[{"matches":"callee-Object-create-defineProperties"}],"not":{"follows":{"regex":"[\\s\\S]","stopBy":"neighbor"}}}}},"count":{"follows":{"regex":"^,$","stopBy":"end"},"min":1,"max":1}}}}]},"setter":{"any":[{"kind":"method_definition","has":{"regex":"^set$","not":{"kind":"property_identifier"},"stopBy":"neighbor"}},{"kind":"method_definition","all":[{"not":{"has":{"regex":"^get$","not":{"kind":"property_identifier"},"stopBy":"neighbor"}}},{"has":{"stopBy":"neighbor","any":[{"kind":"property_identifier","regex":"^set$"},{"kind":"string","regex":"^['\"]set['\"]$"},{"kind":"computed_property_name","has":{"stopBy":"neighbor","any":[{"kind":"string","regex":"^['\"]set['\"]$"},{"kind":"template_string","regex":"^`set`$"}]}}]}}],"inside":{"stopBy":"neighbor","matches":"descriptor"}},{"any":[{"kind":"function_expression"},{"kind":"generator_function"},{"kind":"arrow_function"}],"inside":{"kind":"pair","stopBy":"neighbor","has":{"stopBy":"neighbor","any":[{"kind":"property_identifier","regex":"^set$"},{"kind":"string","regex":"^['\"]set['\"]$"},{"kind":"computed_property_name","has":{"stopBy":"neighbor","any":[{"kind":"string","regex":"^['\"]set['\"]$"},{"kind":"template_string","regex":"^`set`$"}]}}],"not":{"follows":{"regex":"[\\s\\S]","stopBy":"neighbor"}}},"inside":{"stopBy":"neighbor","matches":"descriptor"}}}]}}}},"violation":{"anchor":"witness.span","code":"no-setter-return","message":"Setter cannot return a value.","suppress":{"eslint":{"rules":["no-setter-return"]},"oxlint":{"rules":["no-setter-return"]},"biome":{"rules":["lint/correctness/noSetterReturn"]}}}}]}
1
+ {"format":"rerail.policy/v1","id":"eslint-no-setter-return","revision":4,"mode":"steer","description":"Don't return a value from a JavaScript setter, including setters in property descriptors; the returned value is always ignored.","scope":{"include":["**/*.js","**/*.jsx","**/*.mjs","**/*.cjs"],"exclude":[]},"clauses":[{"id":"return-value","forbid":{"ast":{"language":"typescript","languageOptions":{},"rule":{"kind":"return_statement","has":{"stopBy":"neighbor","not":{"regex":"^(return|;)$"}},"inside":{"stopBy":{"any":[{"kind":"function_declaration"},{"kind":"generator_function_declaration"},{"kind":"function_expression"},{"kind":"generator_function"},{"kind":"arrow_function"},{"kind":"method_definition"}]},"matches":"setter"}},"utils":{"callee-Object-defineProperty":{"any":[{"kind":"member_expression","all":[{"has":{"stopBy":"neighbor","any":[{"kind":"identifier"},{"kind":"parenthesized_expression"}],"resolves":{"global":["Object"],"directives":"eslint"}}},{"has":{"stopBy":"neighbor","kind":"property_identifier","regex":"^(defineProperty)$"}}]},{"kind":"subscript_expression","all":[{"has":{"stopBy":"neighbor","any":[{"kind":"identifier"},{"kind":"parenthesized_expression"}],"resolves":{"global":["Object"],"directives":"eslint"}}},{"has":{"stopBy":"neighbor","any":[{"kind":"string"},{"kind":"template_string"}],"regex":"^['\"`](defineProperty)['\"`]$"}}]},{"kind":"parenthesized_expression","has":{"stopBy":"neighbor","matches":"callee-Object-defineProperty"}}]},"callee-Reflect-defineProperty":{"any":[{"kind":"member_expression","all":[{"has":{"stopBy":"neighbor","any":[{"kind":"identifier"},{"kind":"parenthesized_expression"}],"resolves":{"global":["Reflect"],"directives":"eslint"}}},{"has":{"stopBy":"neighbor","kind":"property_identifier","regex":"^(defineProperty)$"}}]},{"kind":"subscript_expression","all":[{"has":{"stopBy":"neighbor","any":[{"kind":"identifier"},{"kind":"parenthesized_expression"}],"resolves":{"global":["Reflect"],"directives":"eslint"}}},{"has":{"stopBy":"neighbor","any":[{"kind":"string"},{"kind":"template_string"}],"regex":"^['\"`](defineProperty)['\"`]$"}}]},{"kind":"parenthesized_expression","has":{"stopBy":"neighbor","matches":"callee-Reflect-defineProperty"}}]},"callee-Object-create-defineProperties":{"any":[{"kind":"member_expression","all":[{"has":{"stopBy":"neighbor","any":[{"kind":"identifier"},{"kind":"parenthesized_expression"}],"resolves":{"global":["Object"],"directives":"eslint"}}},{"has":{"stopBy":"neighbor","kind":"property_identifier","regex":"^(create|defineProperties)$"}}]},{"kind":"subscript_expression","all":[{"has":{"stopBy":"neighbor","any":[{"kind":"identifier"},{"kind":"parenthesized_expression"}],"resolves":{"global":["Object"],"directives":"eslint"}}},{"has":{"stopBy":"neighbor","any":[{"kind":"string"},{"kind":"template_string"}],"regex":"^['\"`](create|defineProperties)['\"`]$"}}]},{"kind":"parenthesized_expression","has":{"stopBy":"neighbor","matches":"callee-Object-create-defineProperties"}}]},"descriptor":{"kind":"object","any":[{"inside":{"kind":"arguments","stopBy":"neighbor","inside":{"kind":"call_expression","stopBy":"neighbor","has":{"stopBy":"neighbor","any":[{"matches":"callee-Object-defineProperty"},{"matches":"callee-Reflect-defineProperty"}],"not":{"follows":{"regex":"[\\s\\S]","stopBy":"neighbor"}}}}},"count":{"follows":{"regex":"^,$","stopBy":"end"},"min":2,"max":2}},{"inside":{"kind":"pair","stopBy":"neighbor","inside":{"kind":"object","stopBy":"neighbor","inside":{"kind":"arguments","stopBy":"neighbor","inside":{"kind":"call_expression","stopBy":"neighbor","has":{"stopBy":"neighbor","any":[{"matches":"callee-Object-create-defineProperties"}],"not":{"follows":{"regex":"[\\s\\S]","stopBy":"neighbor"}}}}},"count":{"follows":{"regex":"^,$","stopBy":"end"},"min":1,"max":1}}}}]},"setter":{"any":[{"kind":"method_definition","has":{"regex":"^set$","not":{"kind":"property_identifier"},"stopBy":"neighbor"}},{"kind":"method_definition","all":[{"not":{"has":{"regex":"^get$","not":{"kind":"property_identifier"},"stopBy":"neighbor"}}},{"has":{"stopBy":"neighbor","any":[{"kind":"property_identifier","regex":"^set$"},{"kind":"string","regex":"^['\"]set['\"]$"},{"kind":"computed_property_name","has":{"stopBy":"neighbor","any":[{"kind":"string","regex":"^['\"]set['\"]$"},{"kind":"template_string","regex":"^`set`$"}]}}]}}],"inside":{"stopBy":"neighbor","matches":"descriptor"}},{"any":[{"kind":"function_expression"},{"kind":"generator_function"},{"kind":"arrow_function"}],"inside":{"kind":"pair","stopBy":"neighbor","has":{"stopBy":"neighbor","any":[{"kind":"property_identifier","regex":"^set$"},{"kind":"string","regex":"^['\"]set['\"]$"},{"kind":"computed_property_name","has":{"stopBy":"neighbor","any":[{"kind":"string","regex":"^['\"]set['\"]$"},{"kind":"template_string","regex":"^`set`$"}]}}],"not":{"follows":{"regex":"[\\s\\S]","stopBy":"neighbor"}}},"inside":{"stopBy":"neighbor","matches":"descriptor"}}}]}}}},"violation":{"anchor":"witness.span","code":"no-setter-return","message":"Setter cannot return a value.","suppress":{"eslint":{"rules":["no-setter-return"]},"oxlint":{"rules":["no-setter-return"]},"biome":{"rules":["lint/correctness/noSetterReturn"]}}}},{"id":"arrow-expression-body","forbid":{"ast":{"language":"typescript","languageOptions":{},"rule":{"not":{"any":[{"kind":"statement_block"},{"regex":"^=>$"}]},"follows":{"regex":"^=>$","stopBy":"neighbor"},"inside":{"stopBy":"neighbor","kind":"arrow_function","matches":"setter"}},"utils":{"callee-Object-defineProperty":{"any":[{"kind":"member_expression","all":[{"has":{"stopBy":"neighbor","any":[{"kind":"identifier"},{"kind":"parenthesized_expression"}],"resolves":{"global":["Object"],"directives":"eslint"}}},{"has":{"stopBy":"neighbor","kind":"property_identifier","regex":"^(defineProperty)$"}}]},{"kind":"subscript_expression","all":[{"has":{"stopBy":"neighbor","any":[{"kind":"identifier"},{"kind":"parenthesized_expression"}],"resolves":{"global":["Object"],"directives":"eslint"}}},{"has":{"stopBy":"neighbor","any":[{"kind":"string"},{"kind":"template_string"}],"regex":"^['\"`](defineProperty)['\"`]$"}}]},{"kind":"parenthesized_expression","has":{"stopBy":"neighbor","matches":"callee-Object-defineProperty"}}]},"callee-Reflect-defineProperty":{"any":[{"kind":"member_expression","all":[{"has":{"stopBy":"neighbor","any":[{"kind":"identifier"},{"kind":"parenthesized_expression"}],"resolves":{"global":["Reflect"],"directives":"eslint"}}},{"has":{"stopBy":"neighbor","kind":"property_identifier","regex":"^(defineProperty)$"}}]},{"kind":"subscript_expression","all":[{"has":{"stopBy":"neighbor","any":[{"kind":"identifier"},{"kind":"parenthesized_expression"}],"resolves":{"global":["Reflect"],"directives":"eslint"}}},{"has":{"stopBy":"neighbor","any":[{"kind":"string"},{"kind":"template_string"}],"regex":"^['\"`](defineProperty)['\"`]$"}}]},{"kind":"parenthesized_expression","has":{"stopBy":"neighbor","matches":"callee-Reflect-defineProperty"}}]},"callee-Object-create-defineProperties":{"any":[{"kind":"member_expression","all":[{"has":{"stopBy":"neighbor","any":[{"kind":"identifier"},{"kind":"parenthesized_expression"}],"resolves":{"global":["Object"],"directives":"eslint"}}},{"has":{"stopBy":"neighbor","kind":"property_identifier","regex":"^(create|defineProperties)$"}}]},{"kind":"subscript_expression","all":[{"has":{"stopBy":"neighbor","any":[{"kind":"identifier"},{"kind":"parenthesized_expression"}],"resolves":{"global":["Object"],"directives":"eslint"}}},{"has":{"stopBy":"neighbor","any":[{"kind":"string"},{"kind":"template_string"}],"regex":"^['\"`](create|defineProperties)['\"`]$"}}]},{"kind":"parenthesized_expression","has":{"stopBy":"neighbor","matches":"callee-Object-create-defineProperties"}}]},"descriptor":{"kind":"object","any":[{"inside":{"kind":"arguments","stopBy":"neighbor","inside":{"kind":"call_expression","stopBy":"neighbor","has":{"stopBy":"neighbor","any":[{"matches":"callee-Object-defineProperty"},{"matches":"callee-Reflect-defineProperty"}],"not":{"follows":{"regex":"[\\s\\S]","stopBy":"neighbor"}}}}},"count":{"follows":{"regex":"^,$","stopBy":"end"},"min":2,"max":2}},{"inside":{"kind":"pair","stopBy":"neighbor","inside":{"kind":"object","stopBy":"neighbor","inside":{"kind":"arguments","stopBy":"neighbor","inside":{"kind":"call_expression","stopBy":"neighbor","has":{"stopBy":"neighbor","any":[{"matches":"callee-Object-create-defineProperties"}],"not":{"follows":{"regex":"[\\s\\S]","stopBy":"neighbor"}}}}},"count":{"follows":{"regex":"^,$","stopBy":"end"},"min":1,"max":1}}}}]},"setter":{"any":[{"kind":"method_definition","has":{"regex":"^set$","not":{"kind":"property_identifier"},"stopBy":"neighbor"}},{"kind":"method_definition","all":[{"not":{"has":{"regex":"^get$","not":{"kind":"property_identifier"},"stopBy":"neighbor"}}},{"has":{"stopBy":"neighbor","any":[{"kind":"property_identifier","regex":"^set$"},{"kind":"string","regex":"^['\"]set['\"]$"},{"kind":"computed_property_name","has":{"stopBy":"neighbor","any":[{"kind":"string","regex":"^['\"]set['\"]$"},{"kind":"template_string","regex":"^`set`$"}]}}]}}],"inside":{"stopBy":"neighbor","matches":"descriptor"}},{"any":[{"kind":"function_expression"},{"kind":"generator_function"},{"kind":"arrow_function"}],"inside":{"kind":"pair","stopBy":"neighbor","has":{"stopBy":"neighbor","any":[{"kind":"property_identifier","regex":"^set$"},{"kind":"string","regex":"^['\"]set['\"]$"},{"kind":"computed_property_name","has":{"stopBy":"neighbor","any":[{"kind":"string","regex":"^['\"]set['\"]$"},{"kind":"template_string","regex":"^`set`$"}]}}],"not":{"follows":{"regex":"[\\s\\S]","stopBy":"neighbor"}}},"inside":{"stopBy":"neighbor","matches":"descriptor"}}}]}}}},"violation":{"anchor":"witness.span","code":"no-setter-return","message":"Put this setter's arrow body in braces so it returns nothing; a setter's return value is ignored.","suppress":{"eslint":{"rules":["no-setter-return"]},"oxlint":{"rules":["no-setter-return"]},"biome":{"rules":["lint/correctness/noSetterReturn"]}}}}]}
@@ -3,7 +3,7 @@
3
3
  "id": "eslint-no-sparse-arrays",
4
4
  "revision": 3,
5
5
  "mode": "steer",
6
- "description": "Port of ESLint's `no-sparse-arrays` rule (https://eslint.org/docs/latest/rules/no-sparse-arrays). Reports, at the comma, every hole in an array literal: a comma whose previous non-comment sibling is `[` or another comma.",
6
+ "description": "Avoid holes in array literals from consecutive commas; they create sparse arrays and usually come from a typo.",
7
7
  "scope": {
8
8
  "include": [
9
9
  "**/*"
@@ -3,7 +3,7 @@
3
3
  "id": "eslint-no-template-curly-in-string",
4
4
  "revision": 4,
5
5
  "mode": "steer",
6
- "description": "ESLint 10.11.0 no-template-curly-in-string, default options. Port of ESLint's `no-template-curly-in-string` rule (https://eslint.org/docs/latest/rules/no-template-curly-in-string). Flags a string literal whose value contains `${...}`: cooked, or for a JSX attribute string raw with HTML character references decoded.",
6
+ "description": "Don't put template placeholders inside ordinary quoted strings; they are not interpolated, so use a template literal instead.",
7
7
  "scope": {
8
8
  "include": [
9
9
  "**/*.ts",
@@ -34,7 +34,7 @@
34
34
  "violation": {
35
35
  "anchor": "witness.span",
36
36
  "code": "no-template-curly-in-string",
37
- "message": "Unexpected template string expression.",
37
+ "message": "Change these quotes to backticks so the ${...} is interpolated, or escape the $ if the text is meant literally.",
38
38
  "suppress": {
39
39
  "eslint": {
40
40
  "rules": [
@@ -3,7 +3,7 @@
3
3
  "id": "eslint-no-ternary",
4
4
  "revision": 3,
5
5
  "mode": "steer",
6
- "description": "Port of ESLint's `no-ternary` rule (https://eslint.org/docs/latest/rules/no-ternary). Reports every conditional expression.",
6
+ "description": "Avoid the ternary conditional operator entirely; write an if statement instead.",
7
7
  "scope": {
8
8
  "include": [
9
9
  "**/*"
@@ -1 +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"]}}}}]}
1
+ {"format":"rerail.policy/v1","id":"eslint-no-unneeded-ternary","revision":4,"mode":"steer","description":"Replace ternaries that choose between true and false, or that fall back from a value to itself, with the condition or a logical OR.","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":"Replace this ternary with $B; both branches give the same value.","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":"Replace this ternary with $B, since both branches match, keeping the condition as a statement only if it has side effects.","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":"Replace this ternary with $L !== $R.","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":"Replace this ternary with $L === $R.","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":"Replace this ternary with $L != $R.","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":"Replace this ternary with $L == $R.","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":"Replace this ternary with !($T).","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":"Replace this ternary with !$T.","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":"Replace this ternary with its condition $T.","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":"Replace this ternary with !!($T).","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":"Replace this ternary with !!$T.","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":"Replace this ternary with $T || ($A).","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":"Replace this ternary with $T || $A.","fix":"$T || $A","suppress":{"eslint":{"rules":["no-unneeded-ternary"]},"oxlint":{"rules":["no-unneeded-ternary"]},"biome":{"rules":["lint/complexity/noUselessTernary"]}}}}]}
@@ -3,7 +3,7 @@
3
3
  "id": "eslint-no-unsafe-finally",
4
4
  "revision": 3,
5
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).",
6
+ "description": "Don't return, throw, break or continue out of a finally block; it silently overrides the result or exception of the try and catch blocks.",
7
7
  "scope": {
8
8
  "include": [
9
9
  "**/*"
@@ -58,7 +58,7 @@
58
58
  "violation": {
59
59
  "anchor": "witness.span",
60
60
  "code": "no-unsafe-finally",
61
- "message": "Unsafe usage of ReturnStatement.",
61
+ "message": "Move this return out of the finally block; it overrides the result or exception of the try and catch blocks.",
62
62
  "suppress": {
63
63
  "eslint": {
64
64
  "rules": [
@@ -125,7 +125,7 @@
125
125
  "violation": {
126
126
  "anchor": "witness.span",
127
127
  "code": "no-unsafe-finally",
128
- "message": "Unsafe usage of ThrowStatement.",
128
+ "message": "Move this throw out of the finally block; it replaces the result or exception of the try and catch blocks.",
129
129
  "suppress": {
130
130
  "eslint": {
131
131
  "rules": [
@@ -213,7 +213,7 @@
213
213
  "violation": {
214
214
  "anchor": "witness.span",
215
215
  "code": "no-unsafe-finally",
216
- "message": "Unsafe usage of BreakStatement.",
216
+ "message": "Move this break out of the finally block; it discards the result or exception of the try and catch blocks.",
217
217
  "suppress": {
218
218
  "eslint": {
219
219
  "rules": [
@@ -298,7 +298,7 @@
298
298
  "violation": {
299
299
  "anchor": "witness.span",
300
300
  "code": "no-unsafe-finally",
301
- "message": "Unsafe usage of ContinueStatement.",
301
+ "message": "Move this continue out of the finally block; it discards the result or exception of the try and catch blocks.",
302
302
  "suppress": {
303
303
  "eslint": {
304
304
  "rules": [
@@ -422,7 +422,7 @@
422
422
  "violation": {
423
423
  "anchor": "witness.span",
424
424
  "code": "no-unsafe-finally",
425
- "message": "Unsafe usage of BreakStatement.",
425
+ "message": "Move this break out of the finally block; it discards the result or exception of the try and catch blocks.",
426
426
  "suppress": {
427
427
  "eslint": {
428
428
  "rules": [
@@ -546,7 +546,7 @@
546
546
  "violation": {
547
547
  "anchor": "witness.span",
548
548
  "code": "no-unsafe-finally",
549
- "message": "Unsafe usage of ContinueStatement.",
549
+ "message": "Move this continue out of the finally block; it discards the result or exception of the try and catch blocks.",
550
550
  "suppress": {
551
551
  "eslint": {
552
552
  "rules": [
@@ -1 +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"]}}}}]}
1
+ {"format":"rerail.policy/v1","id":"eslint-no-unsafe-negation","revision":5,"mode":"steer","description":"Don't negate the left operand of in or instanceof in JavaScript; negate the whole parenthesized check, since the operator applies to the negated value.","scope":{"include":["**/*.js","**/*.jsx","**/*.mjs","**/*.cjs"],"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":"Negate the whole comparison, as in !(a < b), or write (!a) < b if negating the operand is intended.","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":"Negate the whole comparison, as in !(a > b), or write (!a) > b if negating the operand is intended.","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":"Negate the whole comparison, as in !(a <= b), or write (!a) <= b if negating the operand is intended.","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":"Negate the whole comparison, as in !(a >= b), or write (!a) >= b if negating the operand is intended.","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-unused-labels","revision":2,"mode":"steer","description":"Remove labels that no break or continue statement uses; they are dead code that confuses readers.","scope":{"include":["**/*"],"exclude":[]},"clauses":[{"id":"unused-label-fixable","forbid":{"ast":{"language":"typescript","rule":{"all":[{"matches":"unused"},{"matches":"body"},{"not":{"matches":"unfixable"}}]},"utils":{"unused":{"all":[{"kind":"labeled_statement"},{"has":{"kind":"statement_identifier","pattern":"$L","stopBy":"neighbor"}},{"not":{"has":{"stopBy":{"any":[{"kind":"function_declaration"},{"kind":"function_expression"},{"kind":"arrow_function"},{"kind":"generator_function_declaration"},{"kind":"generator_function"},{"kind":"method_definition"},{"kind":"class_static_block"}]},"any":[{"kind":"break_statement"},{"kind":"continue_statement"}],"has":{"kind":"statement_identifier","pattern":"$L","stopBy":"neighbor"}}}}]},"body":{"has":{"stopBy":"neighbor","pattern":"$BODY","not":{"any":[{"kind":"statement_identifier"},{"kind":"comment"}]}}},"directive-body":{"all":[{"kind":"expression_statement"},{"has":{"stopBy":"neighbor","any":[{"kind":"string"},{"kind":"template_string","not":{"has":{"kind":"template_substitution","stopBy":"neighbor"}}},{"kind":"parenthesized_expression","has":{"stopBy":"neighbor","any":[{"kind":"string"},{"kind":"template_string","not":{"has":{"kind":"template_substitution","stopBy":"neighbor"}}}]}}]}}]},"unfixable":{"any":[{"has":{"kind":"comment","stopBy":"neighbor"}},{"all":[{"has":{"stopBy":"neighbor","matches":"directive-body"}},{"inside":{"stopBy":{"not":{"kind":"labeled_statement"}},"any":[{"kind":"program"},{"kind":"statement_block","inside":{"stopBy":"neighbor","any":[{"kind":"function_declaration"},{"kind":"function_expression"},{"kind":"arrow_function"},{"kind":"generator_function_declaration"},{"kind":"generator_function"},{"kind":"method_definition"}]}}]}}]},{"all":[{"has":{"stopBy":"neighbor","not":{"any":[{"kind":"statement_identifier"},{"kind":"comment"}]},"regex":"^[(\\[\\-+/`]"}},{"follows":{"stopBy":{"not":{"kind":"comment"}},"not":{"kind":"comment"},"regex":"[^;{:]$"}}]}]}}}},"violation":{"anchor":"capture.L","code":"no-unused-labels","message":"'$L:' is defined but never used.","fix":"$BODY","suppress":{"eslint":{"rules":["no-unused-labels"]},"oxlint":{"rules":["no-unused-labels"]},"biome":{"rules":["lint/correctness/noUnusedLabels"]}}}},{"id":"unused-label","forbid":{"ast":{"language":"typescript","rule":{"all":[{"matches":"unused"},{"matches":"unfixable"}]},"utils":{"unused":{"all":[{"kind":"labeled_statement"},{"has":{"kind":"statement_identifier","pattern":"$L","stopBy":"neighbor"}},{"not":{"has":{"stopBy":{"any":[{"kind":"function_declaration"},{"kind":"function_expression"},{"kind":"arrow_function"},{"kind":"generator_function_declaration"},{"kind":"generator_function"},{"kind":"method_definition"},{"kind":"class_static_block"}]},"any":[{"kind":"break_statement"},{"kind":"continue_statement"}],"has":{"kind":"statement_identifier","pattern":"$L","stopBy":"neighbor"}}}}]},"directive-body":{"all":[{"kind":"expression_statement"},{"has":{"stopBy":"neighbor","any":[{"kind":"string"},{"kind":"template_string","not":{"has":{"kind":"template_substitution","stopBy":"neighbor"}}},{"kind":"parenthesized_expression","has":{"stopBy":"neighbor","any":[{"kind":"string"},{"kind":"template_string","not":{"has":{"kind":"template_substitution","stopBy":"neighbor"}}}]}}]}}]},"unfixable":{"any":[{"has":{"kind":"comment","stopBy":"neighbor"}},{"all":[{"has":{"stopBy":"neighbor","matches":"directive-body"}},{"inside":{"stopBy":{"not":{"kind":"labeled_statement"}},"any":[{"kind":"program"},{"kind":"statement_block","inside":{"stopBy":"neighbor","any":[{"kind":"function_declaration"},{"kind":"function_expression"},{"kind":"arrow_function"},{"kind":"generator_function_declaration"},{"kind":"generator_function"},{"kind":"method_definition"}]}}]}}]},{"all":[{"has":{"stopBy":"neighbor","not":{"any":[{"kind":"statement_identifier"},{"kind":"comment"}]},"regex":"^[(\\[\\-+/`]"}},{"follows":{"stopBy":{"not":{"kind":"comment"}},"not":{"kind":"comment"},"regex":"[^;{:]$"}}]}]}}}},"violation":{"anchor":"capture.L","code":"no-unused-labels","message":"'$L:' is defined but never used.","suppress":{"eslint":{"rules":["no-unused-labels"]},"oxlint":{"rules":["no-unused-labels"]},"biome":{"rules":["lint/correctness/noUnusedLabels"]}}}}]}
@@ -0,0 +1,83 @@
1
+ {
2
+ "format": "rerail.policy/v1",
3
+ "id": "eslint-no-unused-private-class-members",
4
+ "revision": 2,
5
+ "mode": "steer",
6
+ "description": "Remove private class fields, methods and accessors that are never used inside the class; assignments alone don't count as use.",
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": "unused-private-member",
23
+ "forbid": {
24
+ "ast": {
25
+ "language": "typescript",
26
+ "rule": {
27
+ "kind": "private_property_identifier",
28
+ "pattern": "$N",
29
+ "binds": {
30
+ "used": false
31
+ },
32
+ "not": {
33
+ "inside": {
34
+ "stopBy": "neighbor",
35
+ "any": [
36
+ {
37
+ "kind": "public_field_definition"
38
+ },
39
+ {
40
+ "kind": "method_definition"
41
+ }
42
+ ],
43
+ "precedes": {
44
+ "stopBy": "end",
45
+ "any": [
46
+ {
47
+ "kind": "public_field_definition"
48
+ },
49
+ {
50
+ "kind": "method_definition"
51
+ }
52
+ ],
53
+ "has": {
54
+ "stopBy": "neighbor",
55
+ "kind": "private_property_identifier",
56
+ "pattern": "$N"
57
+ }
58
+ }
59
+ }
60
+ }
61
+ }
62
+ }
63
+ },
64
+ "violation": {
65
+ "anchor": "capture.N",
66
+ "code": "no-unused-private-class-members",
67
+ "message": "'$N' is defined but never used.",
68
+ "suppress": {
69
+ "eslint": {
70
+ "rules": [
71
+ "no-unused-private-class-members"
72
+ ]
73
+ },
74
+ "oxlint": {
75
+ "rules": [
76
+ "no-unused-private-class-members"
77
+ ]
78
+ }
79
+ }
80
+ }
81
+ }
82
+ ]
83
+ }
@@ -1 +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"]}}}}]}
1
+ {"format":"rerail.policy/v1","id":"eslint-no-useless-call","revision":3,"mode":"steer","description":"Call functions directly instead of through call() or apply() with the same this value they would get anyway.","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"]}}}}]}
@@ -3,7 +3,7 @@
3
3
  "id": "eslint-no-useless-catch",
4
4
  "revision": 3,
5
5
  "mode": "steer",
6
- "description": "Port of ESLint's `no-useless-catch` rule (https://eslint.org/docs/latest/rules/no-useless-catch). Flags a catch clause whose first statement rethrows its own identifier parameter: the whole try statement when there is no finally block, else the catch clause.",
6
+ "description": "Remove catch clauses that only rethrow the caught error; they add nothing but nesting.",
7
7
  "scope": {
8
8
  "include": [
9
9
  "**/*"
@@ -1 +1 @@
1
- {"format":"rerail.policy/v1","id":"eslint-no-useless-concat","revision":4,"mode":"steer","description":"Port of ESLint's `no-useless-concat` rule (https://eslint.org/docs/latest/rules/no-useless-concat). Flags a `+` whose nearest operands (through nested `+` chains and parentheses) are both string or template literals, the right one starting on the line where the left one ends (a `layout` gap to the left literal).","scope":{"include":["**/*"],"exclude":[]},"clauses":[{"id":"literal-concat","forbid":{"ast":{"language":"typescript","rule":{"regex":"^\\+$","inside":{"kind":"binary_expression","stopBy":"neighbor"},"follows":{"matches":"right-most-literal","stopBy":{"not":{"kind":"comment"}}},"precedes":{"matches":"left-most-literal","stopBy":{"not":{"kind":"comment"}}}},"utils":{"right-most-literal":{"any":[{"any":[{"kind":"string"},{"kind":"template_string"}],"pattern":"$L"},{"kind":"parenthesized_expression","has":{"matches":"right-most-literal","stopBy":"neighbor"}},{"kind":"binary_expression","all":[{"has":{"regex":"^\\+$","stopBy":"neighbor"}},{"has":{"matches":"right-most-literal","stopBy":"neighbor","not":{"precedes":{"regex":"[\\s\\S]","stopBy":"neighbor"}}}}]}]},"left-most-literal":{"any":[{"any":[{"kind":"string"},{"kind":"template_string"}],"layout":{"before":{"to":"capture.L","breaks":{"eq":0}}}},{"kind":"parenthesized_expression","has":{"matches":"left-most-literal","stopBy":"neighbor"}},{"kind":"binary_expression","all":[{"has":{"regex":"^\\+$","stopBy":"neighbor"}},{"has":{"matches":"left-most-literal","stopBy":"neighbor","not":{"follows":{"regex":"[\\s\\S]","stopBy":"neighbor"}}}}]}]}}}},"violation":{"anchor":"witness.span","code":"no-useless-concat","message":"Unexpected string concatenation of literals.","suppress":{"eslint":{"rules":["no-useless-concat"]},"oxlint":{"rules":["no-useless-concat"]},"biome":{"rules":["lint/complexity/noUselessStringConcat"]}}}}]}
1
+ {"format":"rerail.policy/v1","id":"eslint-no-useless-concat","revision":4,"mode":"steer","description":"Avoid concatenating two string literals on the same line in JavaScript; write them as a single string.","scope":{"include":["**/*"],"exclude":[]},"clauses":[{"id":"literal-concat","forbid":{"ast":{"language":"typescript","rule":{"regex":"^\\+$","inside":{"kind":"binary_expression","stopBy":"neighbor"},"follows":{"matches":"right-most-literal","stopBy":{"not":{"kind":"comment"}}},"precedes":{"matches":"left-most-literal","stopBy":{"not":{"kind":"comment"}}}},"utils":{"right-most-literal":{"any":[{"any":[{"kind":"string"},{"kind":"template_string"}],"pattern":"$L"},{"kind":"parenthesized_expression","has":{"matches":"right-most-literal","stopBy":"neighbor"}},{"kind":"binary_expression","all":[{"has":{"regex":"^\\+$","stopBy":"neighbor"}},{"has":{"matches":"right-most-literal","stopBy":"neighbor","not":{"precedes":{"regex":"[\\s\\S]","stopBy":"neighbor"}}}}]}]},"left-most-literal":{"any":[{"any":[{"kind":"string"},{"kind":"template_string"}],"layout":{"before":{"to":"capture.L","breaks":{"eq":0}}}},{"kind":"parenthesized_expression","has":{"matches":"left-most-literal","stopBy":"neighbor"}},{"kind":"binary_expression","all":[{"has":{"regex":"^\\+$","stopBy":"neighbor"}},{"has":{"matches":"left-most-literal","stopBy":"neighbor","not":{"follows":{"regex":"[\\s\\S]","stopBy":"neighbor"}}}}]}]}}}},"violation":{"anchor":"witness.span","code":"no-useless-concat","message":"Unexpected string concatenation of literals.","suppress":{"eslint":{"rules":["no-useless-concat"]},"oxlint":{"rules":["no-useless-concat"]},"biome":{"rules":["lint/complexity/noUselessStringConcat"]}}}}]}