@neralabs/rerail-pack-typescript 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -2
- package/licenses/eslint-plugin-vitest/UPSTREAM.md +7 -0
- package/licenses/typescript-eslint/UPSTREAM.md +1277 -1
- package/pack.json +7 -10
- package/package.json +1 -1
- package/rules/typescript-eslint-ban-tslint-comment.json +5 -2
- package/rules/typescript-eslint-consistent-type-definitions.json +1 -1
- package/rules/typescript-eslint-default-param-last.json +2 -2
- package/rules/typescript-eslint-no-array-constructor.json +5 -2
- package/rules/typescript-eslint-no-confusing-non-null-assertion.json +5 -2
- package/rules/typescript-eslint-no-dupe-class-members.json +1 -1
- package/rules/typescript-eslint-no-duplicate-enum-values.json +2 -6
- package/rules/typescript-eslint-no-empty-function.json +1 -1
- package/rules/typescript-eslint-no-extra-non-null-assertion.json +5 -2
- package/rules/typescript-eslint-no-import-type-side-effects.json +5 -2
- package/rules/typescript-eslint-no-namespace.json +2 -6
- package/rules/typescript-eslint-no-non-null-asserted-optional-chain.json +5 -2
- package/rules/typescript-eslint-no-non-null-assertion.json +2 -6
- package/rules/typescript-eslint-no-unnecessary-type-constraint.json +5 -2
- package/rules/typescript-eslint-no-unsafe-function-type.json +2 -6
- package/rules/typescript-eslint-no-unused-expressions.json +1 -1
- package/rules/typescript-eslint-no-useless-empty-export.json +2 -2
- package/rules/typescript-eslint-prefer-as-const.json +2 -6
- package/rules/typescript-eslint-prefer-enum-initializers.json +2 -2
- package/rules/typescript-eslint-prefer-literal-enum-member.json +1 -1
- package/rules/typescript-eslint-prefer-namespace-keyword.json +5 -2
- package/rules/typescript-eslint-no-wrapper-object-types.json +0 -628
package/pack.json
CHANGED
|
@@ -3,14 +3,17 @@
|
|
|
3
3
|
"id": "typescript",
|
|
4
4
|
"name": "TypeScript",
|
|
5
5
|
"category": "language",
|
|
6
|
-
"covers": "
|
|
6
|
+
"covers": "21 typescript-eslint rules ported to Rerail, 10 of them on and 11 off until turned on, each scored against the tool's own recorded findings on its test fixtures.",
|
|
7
7
|
"reason": "matches TypeScript",
|
|
8
8
|
"match": {
|
|
9
9
|
"any": [
|
|
10
10
|
{
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"ecosystem": "npm",
|
|
13
|
+
"names": [
|
|
14
|
+
"typescript"
|
|
15
|
+
]
|
|
16
|
+
}
|
|
14
17
|
},
|
|
15
18
|
{
|
|
16
19
|
"files": [
|
|
@@ -153,12 +156,6 @@
|
|
|
153
156
|
"group": "typescript-eslint",
|
|
154
157
|
"on": false
|
|
155
158
|
},
|
|
156
|
-
{
|
|
157
|
-
"id": "typescript-eslint-no-wrapper-object-types",
|
|
158
|
-
"document": "rules/typescript-eslint-no-wrapper-object-types.json",
|
|
159
|
-
"title": "typescript-eslint no-wrapper-object-types: Disallow using confusing built-in primitive class wrappers",
|
|
160
|
-
"group": "typescript-eslint"
|
|
161
|
-
},
|
|
162
159
|
{
|
|
163
160
|
"id": "typescript-eslint-prefer-as-const",
|
|
164
161
|
"document": "rules/typescript-eslint-prefer-as-const.json",
|
package/package.json
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"format": "rerail.policy/v1",
|
|
3
3
|
"id": "typescript-eslint-ban-tslint-comment",
|
|
4
|
-
"revision":
|
|
4
|
+
"revision": 3,
|
|
5
5
|
"mode": "steer",
|
|
6
6
|
"description": "Port of typescript-eslint's `ban-tslint-comment` (https://typescript-eslint.io/rules/ban-tslint-comment). Flags comments whose value matches TSLint's enable/disable directive regex; the fix deletes the comment.",
|
|
7
7
|
"scope": {
|
|
8
8
|
"include": [
|
|
9
|
-
"
|
|
9
|
+
"**/*.ts",
|
|
10
|
+
"**/*.tsx",
|
|
11
|
+
"**/*.mts",
|
|
12
|
+
"**/*.cts"
|
|
10
13
|
],
|
|
11
14
|
"exclude": []
|
|
12
15
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"format":"rerail.policy/v1","id":"typescript-eslint-consistent-type-definitions","revision":
|
|
1
|
+
{"format":"rerail.policy/v1","id":"typescript-eslint-consistent-type-definitions","revision":5,"mode":"steer","description":"Port of typescript-eslint's `consistent-type-definitions` rule with its default option `interface` (https://typescript-eslint.io/rules/consistent-type-definitions). Flags type aliases whose type is an object literal type (through any parentheses) and fixes them to interfaces. Options are declared in the `options` define (the rule's defaults); a variant is a config patch.","scope":{"include":["**/*.ts","**/*.tsx","**/*.mts","**/*.cts"],"exclude":[]},"clauses":[{"id":"options","define":{"options":{"option":{"type":"string","nullable":true,"default":null}}}},{"id":"shared","define":{"language":"typescript","utils":{"r1":{"any":[{"has":{"kind":"type_parameters","pattern":"$TP","stopBy":"neighbor"}},{"not":{"has":{"kind":"type_parameters","stopBy":"neighbor"}}}]},"r2":{"inside":{"has":{"regex":"^global$","stopBy":"neighbor"},"kind":"ambient_declaration","stopBy":"end"}},"r3":{"has":{"kind":"type_identifier","pattern":"$N","stopBy":"neighbor"}},"r4":{"has":{"kind":"extends_type_clause","stopBy":"neighbor"}},"r5":{"has":{"kind":"interface_body","pattern":"$B","stopBy":"neighbor"}}}}},{"id":"interface-over-type","forbid":{"ast":{"language":"typescript","rule":{"kind":"type_alias_declaration","all":[{"matches":"r3"},{"has":{"matches":"object-type","stopBy":"neighbor"}},{"matches":"r1"}]},"utils":{"object-type":{"any":[{"kind":"object_type","pattern":"$B","not":{"has":{"kind":"index_signature","stopBy":"neighbor","has":{"kind":"mapped_type_clause","stopBy":"neighbor"}}}},{"kind":"parenthesized_type","has":{"matches":"object-type","stopBy":"neighbor"}}]}},"when":{"option":{"option":{"in":[null,"interface"]}}}}},"violation":{"anchor":"capture.N","code":"@typescript-eslint/consistent-type-definitions","message":"Use an `interface` instead of a `type`.","fix":"interface $N$TP $B","suppress":{"eslint":{"rules":["@typescript-eslint/consistent-type-definitions"]},"oxlint":{"rules":["consistent-type-definitions"]},"biome":{"rules":["lint/style/useConsistentTypeDefinitions"]}}}},{"id":"type-over-interface","forbid":{"ast":{"language":"typescript","rule":{"kind":"interface_declaration","all":[{"matches":"r3"},{"matches":"r5"},{"matches":"r1"},{"not":{"any":[{"matches":"r4"},{"inside":{"kind":"export_statement","stopBy":"neighbor","has":{"regex":"^default$","stopBy":"neighbor"}}},{"matches":"r2"}]}}]},"when":{"option":{"option":"type"}}}},"violation":{"anchor":"capture.N","code":"@typescript-eslint/consistent-type-definitions","message":"Use a `type` instead of an `interface`.","fix":"type $N$TP = $B","suppress":{"eslint":{"rules":["@typescript-eslint/consistent-type-definitions"]},"oxlint":{"rules":["consistent-type-definitions"]},"biome":{"rules":["lint/style/useConsistentTypeDefinitions"]}}}},{"id":"type-over-interface-unfixed","forbid":{"ast":{"language":"typescript","rule":{"kind":"interface_declaration","all":[{"matches":"r3"},{"any":[{"matches":"r4"},{"matches":"r2"}]}]},"when":{"option":{"option":"type"}}}},"violation":{"anchor":"capture.N","code":"@typescript-eslint/consistent-type-definitions","message":"Use a `type` instead of an `interface`.","suppress":{"eslint":{"rules":["@typescript-eslint/consistent-type-definitions"]},"oxlint":{"rules":["consistent-type-definitions"]},"biome":{"rules":["lint/style/useConsistentTypeDefinitions"]}}}},{"id":"type-over-interface-export-default","forbid":{"ast":{"language":"typescript","rule":{"kind":"export_statement","all":[{"has":{"regex":"^default$","stopBy":"neighbor"}},{"has":{"kind":"interface_declaration","stopBy":"neighbor","all":[{"matches":"r3"},{"matches":"r5"},{"matches":"r1"},{"not":{"any":[{"matches":"r4"},{"matches":"r2"}]}}]}}]},"when":{"option":{"option":"type"}}}},"violation":{"anchor":"capture.N","code":"@typescript-eslint/consistent-type-definitions","message":"Use a `type` instead of an `interface`.","fix":"type $N$TP = $B\nexport default $N","suppress":{"eslint":{"rules":["@typescript-eslint/consistent-type-definitions"]},"oxlint":{"rules":["consistent-type-definitions"]},"biome":{"rules":["lint/style/useConsistentTypeDefinitions"]}}}}]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"format": "rerail.policy/v1",
|
|
3
3
|
"id": "typescript-eslint-default-param-last",
|
|
4
|
-
"revision":
|
|
4
|
+
"revision": 4,
|
|
5
5
|
"mode": "steer",
|
|
6
6
|
"description": "Port of typescript-eslint's `default-param-last` rule (https://typescript-eslint.io/rules/default-param-last), identical to the ESLint base port. Reports a defaulted or optional parameter of a function with a body that is followed by a required, non-rest parameter.",
|
|
7
|
-
"scope": { "include": ["
|
|
7
|
+
"scope": { "include": ["**/*.ts", "**/*.tsx", "**/*.mts", "**/*.cts"], "exclude": [] },
|
|
8
8
|
"clauses": [
|
|
9
9
|
{
|
|
10
10
|
"id": "default-param-not-last",
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"format": "rerail.policy/v1",
|
|
3
3
|
"id": "typescript-eslint-no-array-constructor",
|
|
4
|
-
"revision":
|
|
4
|
+
"revision": 4,
|
|
5
5
|
"mode": "steer",
|
|
6
6
|
"description": "Port of typescript-eslint's `no-array-constructor` rule (https://typescript-eslint.io/rules/no-array-constructor). Flags `Array(...)` / `new Array(...)` unless called with exactly one argument or type arguments (no scope check: typescript-eslint's version does not resolve `Array`), and fixes to an array literal. Comments inside the argument list are not carried by the `$$$A` capture, so those calls get no fix.",
|
|
7
7
|
"scope": {
|
|
8
8
|
"include": [
|
|
9
|
-
"
|
|
9
|
+
"**/*.ts",
|
|
10
|
+
"**/*.tsx",
|
|
11
|
+
"**/*.mts",
|
|
12
|
+
"**/*.cts"
|
|
10
13
|
],
|
|
11
14
|
"exclude": []
|
|
12
15
|
},
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"format": "rerail.policy/v1",
|
|
3
3
|
"id": "typescript-eslint-no-confusing-non-null-assertion",
|
|
4
|
-
"revision":
|
|
4
|
+
"revision": 3,
|
|
5
5
|
"mode": "steer",
|
|
6
6
|
"description": "Port of typescript-eslint's `no-confusing-non-null-assertion` rule (https://typescript-eslint.io/rules/no-confusing-non-null-assertion). Flags `=`, `==`, `===`, `in` and `instanceof` expressions whose left operand ends in a non-null assertion `!` (outside parentheses).",
|
|
7
7
|
"scope": {
|
|
8
8
|
"include": [
|
|
9
|
-
"
|
|
9
|
+
"**/*.ts",
|
|
10
|
+
"**/*.tsx",
|
|
11
|
+
"**/*.mts",
|
|
12
|
+
"**/*.cts"
|
|
10
13
|
],
|
|
11
14
|
"exclude": []
|
|
12
15
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"format":"rerail.policy/v1","id":"typescript-eslint-no-dupe-class-members","revision":
|
|
1
|
+
{"format":"rerail.policy/v1","id":"typescript-eslint-no-dupe-class-members","revision":7,"mode":"steer","description":"Port of typescript-eslint's `no-dupe-class-members` rule (https://typescript-eslint.io/rules/no-dupe-class-members). ESLint's base rule over non-computed members only, ignoring overload signatures: flags a class member whose static name (`compare` text `key`) repeats an earlier member of the same class and staticness; a getter may pair with a setter.","scope":{"include":["**/*.ts","**/*.tsx","**/*.mts","**/*.cts"],"exclude":[]},"clauses":[{"id":"duplicate-member","forbid":{"ast":{"language":"typescript","rule":{"all":[{"matches":"member"},{"pattern":"$P"},{"any":[{"has":{"stopBy":"neighbor","matches":"key","not":{"kind":"computed_property_name"},"pattern":"$K"}},{"has":{"stopBy":"neighbor","matches":"key","kind":"computed_property_name","has":{"stopBy":"neighbor","not":{"regex":"^[\\[\\]]$"},"pattern":"$K"}}}]},{"any":[{"all":[{"matches":"static"},{"matches":"get"},{"count":{"follows":{"stopBy":"end","all":[{"matches":"member"},{"matches":"static"},{"not":{"matches":"set"}}],"pattern":"$Q","compare":{"left":"Q","op":"eq","right":"P","text":"key"}},"min":1}}]},{"all":[{"matches":"static"},{"matches":"set"},{"count":{"follows":{"stopBy":"end","all":[{"matches":"member"},{"matches":"static"},{"not":{"matches":"get"}}],"pattern":"$Q","compare":{"left":"Q","op":"eq","right":"P","text":"key"}},"min":1}}]},{"all":[{"matches":"static"},{"all":[{"not":{"matches":"get"}},{"not":{"matches":"set"}}]},{"count":{"follows":{"stopBy":"end","all":[{"matches":"member"},{"matches":"static"}],"pattern":"$Q","compare":{"left":"Q","op":"eq","right":"P","text":"key"}},"min":1}}]},{"all":[{"not":{"matches":"static"}},{"matches":"get"},{"count":{"follows":{"stopBy":"end","all":[{"matches":"member"},{"not":{"matches":"static"}},{"not":{"matches":"set"}}],"pattern":"$Q","compare":{"left":"Q","op":"eq","right":"P","text":"key"}},"min":1}}]},{"all":[{"not":{"matches":"static"}},{"matches":"set"},{"count":{"follows":{"stopBy":"end","all":[{"matches":"member"},{"not":{"matches":"static"}},{"not":{"matches":"get"}}],"pattern":"$Q","compare":{"left":"Q","op":"eq","right":"P","text":"key"}},"min":1}}]},{"all":[{"not":{"matches":"static"}},{"all":[{"not":{"matches":"get"}},{"not":{"matches":"set"}}]},{"count":{"follows":{"stopBy":"end","all":[{"matches":"member"},{"not":{"matches":"static"}}],"pattern":"$Q","compare":{"left":"Q","op":"eq","right":"P","text":"key"}},"min":1}}]}]}]},"utils":{"member":{"all":[{"any":[{"kind":"method_definition"},{"kind":"public_field_definition"}]},{"inside":{"kind":"class_body","stopBy":"neighbor"}},{"not":{"matches":"ctor"}},{"not":{"has":{"stopBy":"neighbor","regex":"^abstract$","not":{"kind":"property_identifier"}}}},{"not":{"has":{"stopBy":"neighbor","regex":"^accessor$","not":{"kind":"property_identifier"}}}},{"not":{"has":{"stopBy":"neighbor","kind":"computed_property_name"}}}]},"key":{"any":[{"kind":"property_identifier"},{"kind":"string"},{"kind":"number"},{"kind":"computed_property_name"},{"kind":"private_property_identifier"}],"not":{"follows":{"stopBy":"end","regex":"^[=(]$"}}},"static":{"has":{"stopBy":"neighbor","regex":"^static$","not":{"kind":"property_identifier"}}},"get":{"kind":"method_definition","has":{"stopBy":"neighbor","regex":"^get$","not":{"kind":"property_identifier"}}},"set":{"kind":"method_definition","has":{"stopBy":"neighbor","regex":"^set$","not":{"kind":"property_identifier"}}},"ctor":{"kind":"method_definition","not":{"has":{"stopBy":"neighbor","regex":"^static$","not":{"kind":"property_identifier"}}},"has":{"stopBy":"neighbor","matches":"key","any":[{"kind":"property_identifier","regex":"^constructor$"},{"kind":"string","value":{"eq":"constructor"}}]}}},"transform":{"KT":{"substring":{"source":"$K","value":true}}}}},"violation":{"anchor":"capture.K","code":"@typescript-eslint/no-dupe-class-members","message":"Duplicate name '$KT'.","suppress":{"eslint":{"rules":["@typescript-eslint/no-dupe-class-members"]},"oxlint":{"rules":["no-dupe-class-members"]},"biome":{"rules":["lint/suspicious/noDuplicateClassMembers"]}}}}]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"format": "rerail.policy/v1",
|
|
3
3
|
"id": "typescript-eslint-no-duplicate-enum-values",
|
|
4
|
-
"revision":
|
|
4
|
+
"revision": 6,
|
|
5
5
|
"mode": "steer",
|
|
6
6
|
"description": "typescript-eslint 8.70.1 @typescript-eslint/no-duplicate-enum-values, default options. Port of typescript-eslint's `no-duplicate-enum-values` rule (https://typescript-eslint.io/rules/no-duplicate-enum-values). Flags an enum member whose initializer (a string, number or static template literal under any chain of unary + and -) has the same value, by Object.is, as an earlier member's; NaN values and other initializers are ignored.",
|
|
7
7
|
"scope": {
|
|
@@ -9,11 +9,7 @@
|
|
|
9
9
|
"**/*.ts",
|
|
10
10
|
"**/*.tsx",
|
|
11
11
|
"**/*.mts",
|
|
12
|
-
"**/*.cts"
|
|
13
|
-
"**/*.js",
|
|
14
|
-
"**/*.jsx",
|
|
15
|
-
"**/*.mjs",
|
|
16
|
-
"**/*.cjs"
|
|
12
|
+
"**/*.cts"
|
|
17
13
|
],
|
|
18
14
|
"exclude": []
|
|
19
15
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"format":"rerail.policy/v1","id":"typescript-eslint-no-empty-function","revision":
|
|
1
|
+
{"format":"rerail.policy/v1","id":"typescript-eslint-no-empty-function","revision":7,"mode":"steer","description":"Port of typescript-eslint's `no-empty-function` rule (https://typescript-eslint.io/rules/no-empty-function). Reports a function, method or arrow body `{}` that holds no statement and no comment; constructors with parameter properties are exempt. Default options (allow: []). Options are declared in the `options` define (the rule's defaults); a variant is a config patch.","scope":{"include":["**/*.ts","**/*.tsx","**/*.mts","**/*.cts"],"exclude":[]},"clauses":[{"id":"options","define":{"options":{"allow":{"type":"array","items":"string","default":[]}}}},{"id":"shared","define":{"language":"typescript","utils":{"r1":{"any":[{"kind":"identifier"},{"kind":"property_identifier"}]},"r2":{"any":[{"kind":"property_identifier","pattern":"$NAME"},{"kind":"number","pattern":"$NAME"},{"kind":"string","pattern":"$NAME"},{"has":{"any":[{"kind":"string"},{"kind":"number"},{"kind":"template_string","not":{"has":{"kind":"template_substitution"}}}],"pattern":"$NAME"},"kind":"computed_property_name"}]},"r3":{"all":[{"kind":"method_definition"},{"not":{"has":{"not":{"matches":"r1"},"regex":"^static$"}}},{"has":{"any":[{"kind":"property_identifier","regex":"^constructor$"},{"has":{"kind":"string_fragment","regex":"^constructor$"},"kind":"string"}],"field":"name"}},{"inside":{"kind":"class_body"}}]},"r4":{"any":[{"kind":"function_expression"},{"kind":"function_declaration"}]},"r5":{"has":{"not":{"matches":"r1"},"regex":"^async$"}},"r6":{"any":[{"matches":"r13"},{"regex":"^"}]},"r7":{"not":{"inside":{"any":[{"kind":"pair"},{"kind":"public_field_definition"}],"field":"value","stopBy":{"not":{"kind":"parenthesized_expression"}}}}},"r8":{"has":{"field":"name","kind":"identifier","pattern":"$FID"}},"r9":{"kind":"private_property_identifier","pattern":"$PN"},"r10":{"any":[{"kind":"generator_function"},{"kind":"generator_function_declaration"}]},"r11":{"has":{"not":{"matches":"r1"},"pattern":"$$ST","regex":"^static$"}},"r12":{"follows":{"kind":"decorator","stopBy":{"not":{"kind":"comment"}}}},"r13":{"has":{"not":{"matches":"r1"},"pattern":"$$AS","regex":"^async$"}},"r14":{"any":[{"has":{"pattern":"$$GN","regex":"^\\*$"}},{"regex":"^"}]},"r15":{"all":[{"matches":"r4"},{"not":{"matches":"r5"}}]},"r16":{"has":{"not":{"matches":"r1"},"regex":"^get$"}},"r17":{"has":{"not":{"matches":"r1"},"regex":"^set$"}}}}},{"id":"method","forbid":{"ast":{"language":"typescript","rule":{"kind":"statement_block","regex":"^\\{\\s*\\}","inside":{"field":"body","all":[{"kind":"method_definition"},{"not":{"matches":"r3"}},{"any":[{"matches":"r16"},{"matches":"r17"},{"has":{"regex":"^\\*$"}},{"all":[{"matches":"r5"},{"not":{"has":{"regex":"^\\*$"}}}]},{"$option":"allow","cases":{"[\"methods\"]":[]},"default":[{"all":[{"not":{"matches":"r16"}},{"not":{"matches":"r17"}},{"not":{"has":{"regex":"^\\*$"}}},{"not":{"matches":"r5"}}]}],"spread":true}]},{"any":[{"matches":"r11"},{"kind":"method_definition"}]},{"any":[{"matches":"r13"},{"kind":"method_definition"}]},{"any":[{"has":{"regex":"^\\*$","pattern":"$$GN"}},{"kind":"method_definition"}]},{"any":[{"has":{"regex":"^[gs]et$","not":{"matches":"r1"},"pattern":"$$KW"}},{"has":{"field":"parameters","pattern":"$$KW"}}]},{"any":[{"has":{"field":"name","matches":"r9"}},{"has":{"field":"name","matches":"r2"}},{"regex":"^"}]},{"$option":"allow","cases":{"[\"decoratedFunctions\"]":[{"not":{"$option":"allow","cases":{"[\"overrideMethods\"]":{"has":{"kind":"override_modifier"}}},"default":{"matches":"r12"}}}],"[\"overrideMethods\"]":[{"not":{"$option":"allow","cases":{"[\"overrideMethods\"]":{"has":{"kind":"override_modifier"}}},"default":{"matches":"r12"}}}]},"default":[],"spread":true}]}},"transform":{"STW":{"replace":{"source":"$ST","replace":"^.+$","by":"static "}},"PW":{"replace":{"source":"$PN","replace":"^.+$","by":"private "}},"PNQ":{"replace":{"source":"$PN","replace":"^(.+)$","by":" ${1}"}},"ASW":{"replace":{"source":"$AS","replace":"^.+$","by":"async "}},"GNW":{"replace":{"source":"$GN","replace":"^.+$","by":"generator "}},"NQ":{"replace":{"source":"$NAME","value":true,"replace":"(?s)^(.*)$","by":" '${1}'"}},"KWW":{"replace":{"source":"$KW","replace":"(?s)^\\(.*$","by":"method"}},"KWX":{"replace":{"source":"$KWW","replace":"^([gs])et$","by":"${1}etter"}}}}},"violation":{"anchor":"witness.span","code":"@typescript-eslint/no-empty-function","message":"Unexpected empty $STW$PW$ASW$GNW$KWX$NQ$PNQ.","suppress":{"eslint":{"rules":["@typescript-eslint/no-empty-function"]},"oxlint":{"rules":["no-empty-function"]},"biome":{"rules":["lint/suspicious/noEmptyBlockStatements"]}}}},{"id":"constructor","forbid":{"ast":{"language":"typescript","rule":{"kind":"statement_block","regex":"^\\{\\s*\\}","inside":{"field":"body","all":[{"matches":"r3"},{"not":{"has":{"field":"parameters","has":{"any":[{"kind":"required_parameter"},{"kind":"optional_parameter"}],"has":{"any":[{"kind":"accessibility_modifier"},{"kind":"override_modifier"},{"regex":"^readonly$","not":{"matches":"r1"}}]}}}}},{"$option":"allow","cases":{"[\"private-constructors\"]":[{"not":{"has":{"kind":"accessibility_modifier","regex":{"$option":"allow","cases":{"[\"protected-constructors\"]":"^protected$"},"default":"^private$"}}}}],"[\"protected-constructors\"]":[{"not":{"has":{"kind":"accessibility_modifier","regex":{"$option":"allow","cases":{"[\"protected-constructors\"]":"^protected$"},"default":"^private$"}}}}]},"default":[],"spread":true}]}},"when":{"option":{"allow":{"in":[[],["methods"],["private-constructors"],["protected-constructors"],["decoratedFunctions"],["overrideMethods"]]}}}}},"violation":{"anchor":"witness.span","code":"@typescript-eslint/no-empty-function","message":"Unexpected empty constructor.","suppress":{"eslint":{"rules":["@typescript-eslint/no-empty-function"]},"oxlint":{"rules":["no-empty-function"]},"biome":{"rules":["lint/suspicious/noEmptyBlockStatements"]}}}},{"id":"member-function","forbid":{"ast":{"language":"typescript","rule":{"kind":"statement_block","regex":"^\\{\\s*\\}","inside":{"field":"body","all":[{"any":[{"matches":"r15"},{"all":[{"matches":"r4"},{"matches":"r5"}]},{"matches":"r10"},{"kind":"arrow_function"}]},{"matches":"r6"},{"matches":"r14"},{"inside":{"field":"value","stopBy":{"not":{"kind":"parenthesized_expression"}},"any":[{"kind":"pair"},{"kind":"public_field_definition"}],"all":[{"any":[{"matches":"r11"},{"regex":"^"}]},{"any":[{"all":[{"kind":"pair"},{"any":[{"has":{"field":"key","matches":"r9"}},{"has":{"field":"key","matches":"r2"}},{"has":{"field":"value","matches":"r8"}},{"regex":"^"}]}]},{"all":[{"kind":"public_field_definition"},{"any":[{"has":{"field":"name","matches":"r9"}},{"has":{"field":"name","matches":"r2"}},{"has":{"field":"value","matches":"r8"}},{"regex":"^"}]}]}]}]}}]}},"transform":{"STW":{"replace":{"source":"$ST","replace":"^.+$","by":"static "}},"PW":{"replace":{"source":"$PN","replace":"^.+$","by":"private "}},"PNQ":{"replace":{"source":"$PN","replace":"^(.+)$","by":" ${1}"}},"ASW":{"replace":{"source":"$AS","replace":"^.+$","by":"async "}},"GNW":{"replace":{"source":"$GN","replace":"^.+$","by":"generator "}},"NQ":{"replace":{"source":"$NAME","value":true,"replace":"(?s)^(.*)$","by":" '${1}'"}},"FQ":{"replace":{"source":"$FID","replace":"^(.+)$","by":" '${1}'"}}}}},"violation":{"anchor":"witness.span","code":"@typescript-eslint/no-empty-function","message":"Unexpected empty $STW$PW$ASW$GNWmethod$NQ$PNQ$FQ.","suppress":{"eslint":{"rules":["@typescript-eslint/no-empty-function"]},"oxlint":{"rules":["no-empty-function"]},"biome":{"rules":["lint/suspicious/noEmptyBlockStatements"]}}}},{"id":"function","forbid":{"ast":{"language":"typescript","rule":{"kind":"statement_block","regex":"^\\{\\s*\\}","inside":{"field":"body","all":[{"any":[{"matches":"r15"},{"all":[{"matches":"r4"},{"matches":"r5"}]},{"matches":"r10"}]},{"matches":"r7"},{"matches":"r6"},{"matches":"r14"},{"any":[{"matches":"r8"},{"regex":"^"}]}]}},"transform":{"ASW":{"replace":{"source":"$AS","replace":"^.+$","by":"async "}},"GNW":{"replace":{"source":"$GN","replace":"^.+$","by":"generator "}},"FQ":{"replace":{"source":"$FID","replace":"^(.+)$","by":" '${1}'"}}}}},"violation":{"anchor":"witness.span","code":"@typescript-eslint/no-empty-function","message":"Unexpected empty $ASW$GNWfunction$FQ.","suppress":{"eslint":{"rules":["@typescript-eslint/no-empty-function"]},"oxlint":{"rules":["no-empty-function"]},"biome":{"rules":["lint/suspicious/noEmptyBlockStatements"]}}}},{"id":"arrow-function","forbid":{"ast":{"language":"typescript","rule":{"kind":"statement_block","regex":"^\\{\\s*\\}","inside":{"field":"body","all":[{"kind":"arrow_function"},{"matches":"r7"},{"matches":"r6"}]}},"transform":{"ASW":{"replace":{"source":"$AS","replace":"^.+$","by":"async "}}}}},"violation":{"anchor":"witness.span","code":"@typescript-eslint/no-empty-function","message":"Unexpected empty $ASWarrow function.","suppress":{"eslint":{"rules":["@typescript-eslint/no-empty-function"]},"oxlint":{"rules":["no-empty-function"]},"biome":{"rules":["lint/suspicious/noEmptyBlockStatements"]}}}}]}
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"format": "rerail.policy/v1",
|
|
3
3
|
"id": "typescript-eslint-no-extra-non-null-assertion",
|
|
4
|
-
"revision":
|
|
4
|
+
"revision": 4,
|
|
5
5
|
"mode": "steer",
|
|
6
6
|
"description": "Port of typescript-eslint's `no-extra-non-null-assertion` rule (https://typescript-eslint.io/rules/no-extra-non-null-assertion). Flags a non-null assertion that is itself asserted non-null again, or that is the object/callee of an optional chain (parentheses are transparent, as in ESTree).",
|
|
7
7
|
"scope": {
|
|
8
8
|
"include": [
|
|
9
|
-
"
|
|
9
|
+
"**/*.ts",
|
|
10
|
+
"**/*.tsx",
|
|
11
|
+
"**/*.mts",
|
|
12
|
+
"**/*.cts"
|
|
10
13
|
],
|
|
11
14
|
"exclude": []
|
|
12
15
|
},
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"format": "rerail.policy/v1",
|
|
3
3
|
"id": "typescript-eslint-no-import-type-side-effects",
|
|
4
|
-
"revision":
|
|
4
|
+
"revision": 3,
|
|
5
5
|
"mode": "steer",
|
|
6
6
|
"description": "Port of typescript-eslint's `no-import-type-side-effects` rule (https://typescript-eslint.io/rules/no-import-type-side-effects). Flags an import whose specifiers are all inline `type` specifiers.",
|
|
7
7
|
"scope": {
|
|
8
8
|
"include": [
|
|
9
|
-
"
|
|
9
|
+
"**/*.ts",
|
|
10
|
+
"**/*.tsx",
|
|
11
|
+
"**/*.mts",
|
|
12
|
+
"**/*.cts"
|
|
10
13
|
],
|
|
11
14
|
"exclude": []
|
|
12
15
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"format": "rerail.policy/v1",
|
|
3
3
|
"id": "typescript-eslint-no-namespace",
|
|
4
|
-
"revision":
|
|
4
|
+
"revision": 7,
|
|
5
5
|
"mode": "steer",
|
|
6
6
|
"description": "typescript-eslint 8.70.1 @typescript-eslint/no-namespace, default options. allowDefinitionFiles is fixed at its default (true): a file whose name typescript-eslint's isDefinitionFile matches (`\\.d\\.(ts|cts|mts|.*\\.ts)$`) is not checked. Port of typescript-eslint's `no-namespace` rule (https://typescript-eslint.io/rules/no-namespace). Flags `namespace X {}` and `module X {}` (not `declare global`, `global {}` inside `declare module 'name'`, or `declare module 'name'`) with its defaults: declared namespaces are flagged, and definition files (*.d.ts, *.d.cts, *.d.mts, *.d.*.ts) are exempt through the document scope. Options are declared in the `options` define (the rule's defaults); a variant is a config patch.",
|
|
7
7
|
"scope": {
|
|
@@ -9,11 +9,7 @@
|
|
|
9
9
|
"**/*.ts",
|
|
10
10
|
"**/*.tsx",
|
|
11
11
|
"**/*.mts",
|
|
12
|
-
"**/*.cts"
|
|
13
|
-
"**/*.js",
|
|
14
|
-
"**/*.jsx",
|
|
15
|
-
"**/*.mjs",
|
|
16
|
-
"**/*.cjs"
|
|
12
|
+
"**/*.cts"
|
|
17
13
|
],
|
|
18
14
|
"exclude": []
|
|
19
15
|
},
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"format": "rerail.policy/v1",
|
|
3
3
|
"id": "typescript-eslint-no-non-null-asserted-optional-chain",
|
|
4
|
-
"revision":
|
|
4
|
+
"revision": 4,
|
|
5
5
|
"mode": "steer",
|
|
6
6
|
"description": "Port of typescript-eslint's `no-non-null-asserted-optional-chain` rule (https://typescript-eslint.io/rules/no-non-null-asserted-optional-chain). Flags a non-null assertion that ends an optional chain (`x?.y!`), and a parenthesized optional chain that is non-null asserted (`(x?.y)!`, reported at the chain).",
|
|
7
7
|
"scope": {
|
|
8
8
|
"include": [
|
|
9
|
-
"
|
|
9
|
+
"**/*.ts",
|
|
10
|
+
"**/*.tsx",
|
|
11
|
+
"**/*.mts",
|
|
12
|
+
"**/*.cts"
|
|
10
13
|
],
|
|
11
14
|
"exclude": []
|
|
12
15
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"format": "rerail.policy/v1",
|
|
3
3
|
"id": "typescript-eslint-no-non-null-assertion",
|
|
4
|
-
"revision":
|
|
4
|
+
"revision": 4,
|
|
5
5
|
"mode": "steer",
|
|
6
6
|
"description": "typescript-eslint 8.70.1 @typescript-eslint/no-non-null-assertion, default options. Port of typescript-eslint's `no-non-null-assertion` rule (https://typescript-eslint.io/rules/no-non-null-assertion). Flags every non-null assertion `x!`. Where the grammar misparses a prefix operator applied to an assertion (`!x!` as `(!x)!`), the finding starts at the real operand.",
|
|
7
7
|
"scope": {
|
|
@@ -9,11 +9,7 @@
|
|
|
9
9
|
"**/*.ts",
|
|
10
10
|
"**/*.tsx",
|
|
11
11
|
"**/*.mts",
|
|
12
|
-
"**/*.cts"
|
|
13
|
-
"**/*.js",
|
|
14
|
-
"**/*.jsx",
|
|
15
|
-
"**/*.mjs",
|
|
16
|
-
"**/*.cjs"
|
|
12
|
+
"**/*.cts"
|
|
17
13
|
],
|
|
18
14
|
"exclude": []
|
|
19
15
|
},
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"format": "rerail.policy/v1",
|
|
3
3
|
"id": "typescript-eslint-no-unnecessary-type-constraint",
|
|
4
|
-
"revision":
|
|
4
|
+
"revision": 4,
|
|
5
5
|
"mode": "steer",
|
|
6
6
|
"description": "Port of typescript-eslint's `no-unnecessary-type-constraint` (https://typescript-eslint.io/rules/no-unnecessary-type-constraint). Flags type parameters constrained to `any` or `unknown`.",
|
|
7
7
|
"scope": {
|
|
8
8
|
"include": [
|
|
9
|
-
"
|
|
9
|
+
"**/*.ts",
|
|
10
|
+
"**/*.tsx",
|
|
11
|
+
"**/*.mts",
|
|
12
|
+
"**/*.cts"
|
|
10
13
|
],
|
|
11
14
|
"exclude": []
|
|
12
15
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"format": "rerail.policy/v1",
|
|
3
3
|
"id": "typescript-eslint-no-unsafe-function-type",
|
|
4
|
-
"revision":
|
|
4
|
+
"revision": 3,
|
|
5
5
|
"mode": "steer",
|
|
6
6
|
"description": "typescript-eslint 8.70.1 @typescript-eslint/no-unsafe-function-type, default options. Port of typescript-eslint's `no-unsafe-function-type` rule (https://typescript-eslint.io/rules/no-unsafe-function-type). Flags the global `Function` type used as a type reference, class implements or interface extends: a `type_identifier` reference that `resolves` to no file-local type binding.",
|
|
7
7
|
"scope": {
|
|
@@ -9,11 +9,7 @@
|
|
|
9
9
|
"**/*.ts",
|
|
10
10
|
"**/*.tsx",
|
|
11
11
|
"**/*.mts",
|
|
12
|
-
"**/*.cts"
|
|
13
|
-
"**/*.js",
|
|
14
|
-
"**/*.jsx",
|
|
15
|
-
"**/*.mjs",
|
|
16
|
-
"**/*.cjs"
|
|
12
|
+
"**/*.cts"
|
|
17
13
|
],
|
|
18
14
|
"exclude": []
|
|
19
15
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"format":"rerail.policy/v1","id":"typescript-eslint-no-unused-expressions","revision":
|
|
1
|
+
{"format":"rerail.policy/v1","id":"typescript-eslint-no-unused-expressions","revision":5,"mode":"steer","description":"Port of typescript-eslint's `no-unused-expressions` (https://typescript-eslint.io/rules/no-unused-expressions), an extension of ESLint's rule,; same document shape as the ESLint port. Flags an expression statement whose expression (through parentheses and TS `as`/`<T>`/`!`/instantiation wrappers) is not a call, `new`, assignment, update, `await`, `yield`, `import()`, `void` or `delete`; directive prologue strings are exempt. tree-sitter reads `e as A.B.C` and `e satisfies A.B.C` (a type name with two or more dots) as a member access on `e as A.B` / `e satisfies A.B`; such a member access is treated as the `as` (unwrapped) or `satisfies` (never flagged, as upstream) it is. Options are declared in the `options` define (the rule's defaults); a variant is a config patch.","scope":{"include":["**/*.ts","**/*.tsx","**/*.mts","**/*.cts"],"exclude":[]},"clauses":[{"id":"options","define":{"options":{"allowShortCircuit":{"type":"boolean","nullable":true,"default":null},"allowTernary":{"type":"boolean","nullable":true,"default":null}}}},{"id":"unused-expression","forbid":{"ast":{"language":"typescript","rule":{"kind":"expression_statement","all":[{"not":{"matches":"directive"}},{"has":{"stopBy":"neighbor","matches":"disallowed"}}]},"utils":{"disallowed":{"any":[{"kind":"array"},{"kind":"arrow_function"},{"kind":"class"},{"kind":"function_expression"},{"kind":"generator_function"},{"kind":"identifier"},{"kind":"undefined"},{"kind":"number"},{"kind":"string"},{"kind":"true"},{"kind":"false"},{"kind":"null"},{"kind":"regex"},{"kind":"template_string"},{"kind":"member_expression","not":{"has":{"field":"object","stopBy":"neighbor","any":[{"kind":"as_expression"},{"kind":"satisfies_expression"}]}}},{"kind":"member_expression","has":{"field":"object","stopBy":"neighbor","kind":"as_expression","has":{"stopBy":"neighbor","all":[{"not":{"kind":"type_arguments"}},{"matches":"disallowed"}]}}},{"kind":"subscript_expression"},{"kind":"meta_property"},{"kind":"object"},{"kind":"sequence_expression"},{"kind":"this"},{"kind":"super"},{"kind":"unary_expression","not":{"has":{"regex":"^(void|delete)$","stopBy":"neighbor"}}},{"kind":"parenthesized_expression","has":{"stopBy":"neighbor","all":[{"not":{"kind":"type_arguments"}},{"matches":"disallowed"}]}},{"kind":"as_expression","has":{"stopBy":"neighbor","all":[{"not":{"kind":"type_arguments"}},{"matches":"disallowed"}]}},{"kind":"type_assertion","has":{"stopBy":"neighbor","all":[{"not":{"kind":"type_arguments"}},{"matches":"disallowed"}]}},{"kind":"non_null_expression","has":{"stopBy":"neighbor","all":[{"not":{"kind":"type_arguments"}},{"matches":"disallowed"}]}},{"kind":"instantiation_expression","has":{"stopBy":"neighbor","all":[{"not":{"kind":"type_arguments"}},{"matches":"disallowed"}]}},{"$option":"allowShortCircuit","cases":{"true":[]},"default":[{"kind":"binary_expression"}],"spread":true},{"$option":"allowShortCircuit","cases":{"true":[{"kind":"binary_expression","not":{"has":{"regex":"^(&&|\\|\\||\\?\\?)$","stopBy":"neighbor"}}}]},"default":[],"spread":true},{"$option":"allowShortCircuit","cases":{"true":[{"kind":"binary_expression","has":{"stopBy":"neighbor","follows":{"regex":"^(&&|\\|\\||\\?\\?)$","stopBy":"neighbor"},"matches":"disallowed"}}]},"default":[],"spread":true},{"$option":"allowTernary","cases":{"true":[]},"default":[{"kind":"ternary_expression"}],"spread":true},{"$option":"allowTernary","cases":{"true":[{"kind":"ternary_expression","has":{"stopBy":"neighbor","matches":"disallowed","follows":{"regex":"^[?:]$","stopBy":"neighbor"}}}]},"default":[],"spread":true},{"kind":"call_expression","has":{"kind":"template_string","stopBy":"neighbor"}}]},"directive-like":{"kind":"expression_statement","has":{"kind":"string","stopBy":"neighbor"}},"directive":{"all":[{"matches":"directive-like"},{"inside":{"stopBy":"neighbor","any":[{"kind":"program"},{"kind":"statement_block","inside":{"stopBy":"neighbor","any":[{"kind":"function_declaration"},{"kind":"function_expression"},{"kind":"arrow_function"},{"kind":"generator_function"},{"kind":"generator_function_declaration"},{"kind":"method_definition"},{"kind":"module"},{"kind":"internal_module"}]}}]}},{"not":{"follows":{"stopBy":"end","all":[{"not":{"kind":"comment"}},{"not":{"kind":"hash_bang_line"}},{"not":{"regex":"^\\{$"}},{"not":{"matches":"directive-like"}}]}}}]}}}},"violation":{"anchor":"witness.span","code":"@typescript-eslint/no-unused-expressions","message":"Expected an assignment or function call and instead saw an expression.","suppress":{"eslint":{"rules":["@typescript-eslint/no-unused-expressions"]},"oxlint":{"rules":["no-unused-expressions"]}}}}]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"format": "rerail.policy/v1",
|
|
3
3
|
"id": "typescript-eslint-no-useless-empty-export",
|
|
4
|
-
"revision":
|
|
4
|
+
"revision": 4,
|
|
5
5
|
"mode": "steer",
|
|
6
6
|
"description": "Port of typescript-eslint's `no-useless-empty-export` rule (https://typescript-eslint.io/rules/no-useless-empty-export). Flags `export {}` when a sibling statement of the same module body is already an import or export; declaration files are excluded by scope.",
|
|
7
|
-
"scope": { "include": ["
|
|
7
|
+
"scope": { "include": ["**/*.ts", "**/*.tsx", "**/*.mts", "**/*.cts"], "exclude": ["**/*.d.ts", "**/*.d.mts", "**/*.d.cts"] },
|
|
8
8
|
"clauses": [
|
|
9
9
|
{
|
|
10
10
|
"id": "useless-empty-export",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"format": "rerail.policy/v1",
|
|
3
3
|
"id": "typescript-eslint-prefer-as-const",
|
|
4
|
-
"revision":
|
|
4
|
+
"revision": 4,
|
|
5
5
|
"mode": "steer",
|
|
6
6
|
"description": "typescript-eslint 8.70.1 @typescript-eslint/prefer-as-const, default options. Port of typescript-eslint's `prefer-as-const` rule (https://typescript-eslint.io/rules/prefer-as-const). Flags a literal type that repeats the raw text of the literal it asserts (`x as 'a'`, `<'a'>x`) or annotates (`let v: 'a' = 'a'`, class fields); assertions are fixed to `const`.",
|
|
7
7
|
"scope": {
|
|
@@ -9,11 +9,7 @@
|
|
|
9
9
|
"**/*.ts",
|
|
10
10
|
"**/*.tsx",
|
|
11
11
|
"**/*.mts",
|
|
12
|
-
"**/*.cts"
|
|
13
|
-
"**/*.js",
|
|
14
|
-
"**/*.jsx",
|
|
15
|
-
"**/*.mjs",
|
|
16
|
-
"**/*.cjs"
|
|
12
|
+
"**/*.cts"
|
|
17
13
|
],
|
|
18
14
|
"exclude": []
|
|
19
15
|
},
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"format": "rerail.policy/v1",
|
|
3
3
|
"id": "typescript-eslint-prefer-enum-initializers",
|
|
4
|
-
"revision":
|
|
4
|
+
"revision": 4,
|
|
5
5
|
"mode": "steer",
|
|
6
6
|
"description": "Port of typescript-eslint's `prefer-enum-initializers` rule (https://typescript-eslint.io/rules/prefer-enum-initializers). Flags enum members without an initializer.",
|
|
7
|
-
"scope": { "include": ["
|
|
7
|
+
"scope": { "include": ["**/*.ts", "**/*.tsx", "**/*.mts", "**/*.cts"], "exclude": [] },
|
|
8
8
|
"clauses": [
|
|
9
9
|
{
|
|
10
10
|
"id": "enum-member-without-initializer",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"format":"rerail.policy/v1","id":"typescript-eslint-prefer-literal-enum-member","revision":
|
|
1
|
+
{"format":"rerail.policy/v1","id":"typescript-eslint-prefer-literal-enum-member","revision":5,"mode":"steer","description":"Port of typescript-eslint's `prefer-literal-enum-member` rule (https://typescript-eslint.io/rules/prefer-literal-enum-member). Reports an enum member initialized with anything but a literal, a template literal without substitutions, or a signed one. Options are declared in the `options` define (the rule's defaults); a variant is a config patch.","scope":{"include":["**/*.ts","**/*.tsx","**/*.mts","**/*.cts"],"exclude":[]},"clauses":[{"id":"options","define":{"options":{"allowBitwiseExpressions":{"type":"boolean","nullable":true,"default":null}}}},{"id":"shared","define":{"language":"typescript","utils":{"r1":{"any":[{"kind":"comment"},{"regex":"^(&|\\^|<<|>>|>>>|\\|)$"},{"regex":"^[-+~()]$"}]},"r2":{"has":{"kind":"string_fragment","pattern":"$SM","stopBy":"neighbor"},"kind":"string"},"r3":{"has":{"kind":"identifier","pattern":"$EN","stopBy":"neighbor"}},"r4":{"has":{"regex":"^(&|\\^|<<|>>|>>>|\\|)$","stopBy":"neighbor"}}}}},{"id":"non-literal-member","forbid":{"ast":{"language":"typescript","utils":{"literal":{"any":[{"kind":"number"},{"kind":"string"},{"kind":"true"},{"kind":"false"},{"kind":"null"},{"kind":"regex"},{"kind":"template_string","not":{"has":{"kind":"template_substitution","stopBy":"neighbor"}}}]},"allowed":{"any":[{"kind":"parenthesized_expression","all":[{"not":{"has":{"not":{"matches":"r1"},"all":[{"not":{"matches":"allowed"}}],"stopBy":"neighbor"}}}]},{"matches":"literal"},{"kind":"unary_expression","all":[{"has":{"regex":"^[-+]$","stopBy":"neighbor"}},{"not":{"has":{"not":{"matches":"r1"},"all":[{"not":{"matches":"allowed"}}],"stopBy":"neighbor"}}}]},{"$option":"allowBitwiseExpressions","cases":{"true":[{"kind":"unary_expression","all":[{"has":{"regex":"^~$","stopBy":"neighbor"}},{"not":{"has":{"not":{"matches":"r1"},"all":[{"not":{"matches":"allowed-bitwise"}}],"stopBy":"neighbor"}}}]}]},"default":[],"spread":true},{"$option":"allowBitwiseExpressions","cases":{"true":[{"kind":"binary_expression","all":[{"matches":"r4"},{"not":{"has":{"not":{"matches":"r1"},"all":[{"not":{"matches":"allowed-bitwise"}}],"stopBy":"neighbor"}}}]}]},"default":[],"spread":true}]},"allowed-bitwise":{"any":[{"kind":"parenthesized_expression","all":[{"not":{"has":{"not":{"matches":"r1"},"all":[{"not":{"matches":"allowed-bitwise"}}],"stopBy":"neighbor"}}}]},{"matches":"literal"},{"kind":"unary_expression","all":[{"has":{"regex":"^[-+]$","stopBy":"neighbor"}},{"not":{"has":{"not":{"matches":"r1"},"all":[{"not":{"matches":"allowed-bitwise"}}],"stopBy":"neighbor"}}}]},{"kind":"unary_expression","all":[{"has":{"regex":"^~$","stopBy":"neighbor"}},{"not":{"has":{"not":{"matches":"r1"},"all":[{"not":{"matches":"allowed-bitwise"}}],"stopBy":"neighbor"}}}]},{"kind":"binary_expression","all":[{"matches":"r4"},{"not":{"has":{"not":{"matches":"r1"},"all":[{"not":{"matches":"allowed-bitwise"}}],"stopBy":"neighbor"}}}]},{"matches":"self-member"}]},"member-named":{"any":[{"kind":"property_identifier","pattern":"$SM"},{"matches":"r2"},{"kind":"enum_assignment","has":{"any":[{"kind":"property_identifier","pattern":"$SM"},{"matches":"r2"}],"stopBy":"neighbor"}}]},"self-member":{"any":[{"kind":"identifier","pattern":"$SM","inside":{"stopBy":"end","kind":"enum_body","has":{"matches":"member-named","stopBy":"neighbor"}}},{"all":[{"any":[{"kind":"member_expression","has":{"kind":"property_identifier","pattern":"$SM","stopBy":"neighbor"}},{"kind":"subscript_expression","has":{"stopBy":"neighbor","matches":"r2"}}]},{"matches":"r3"},{"inside":{"stopBy":"end","kind":"enum_declaration","all":[{"matches":"r3"},{"has":{"kind":"enum_body","has":{"matches":"member-named","stopBy":"neighbor"},"stopBy":"neighbor"}}]}}]}]}},"rule":{"kind":"enum_assignment","all":[{"has":{"any":[{"kind":"property_identifier"},{"kind":"string"},{"kind":"computed_property_name"},{"kind":"number"}],"pattern":"$NAME","precedes":{"regex":"^=$","stopBy":"end"},"stopBy":"neighbor"}},{"has":{"not":{"kind":"comment"},"follows":{"regex":"^=$","stopBy":"end"},"all":[{"not":{"matches":"allowed"}}],"stopBy":"neighbor"}}]}}},"violation":{"anchor":"capture.NAME","code":"@typescript-eslint/prefer-literal-enum-member","message":{"$option":"allowBitwiseExpressions","cases":{"true":"Explicit enum value must only be a literal value (string or number) or a bitwise expression."},"default":"Explicit enum value must only be a literal value (string or number)."},"suppress":{"eslint":{"rules":["@typescript-eslint/prefer-literal-enum-member"]},"oxlint":{"rules":["prefer-literal-enum-member"]},"biome":{"rules":["lint/style/useLiteralEnumMembers"]}}}}]}
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"format": "rerail.policy/v1",
|
|
3
3
|
"id": "typescript-eslint-prefer-namespace-keyword",
|
|
4
|
-
"revision":
|
|
4
|
+
"revision": 4,
|
|
5
5
|
"mode": "steer",
|
|
6
6
|
"description": "Port of typescript-eslint's `prefer-namespace-keyword` rule (https://typescript-eslint.io/rules/prefer-namespace-keyword). Flags `module Name {}` declarations with an identifier name; reports the whole declaration (from `declare` when present) and fixes the keyword.",
|
|
7
7
|
"scope": {
|
|
8
8
|
"include": [
|
|
9
|
-
"
|
|
9
|
+
"**/*.ts",
|
|
10
|
+
"**/*.tsx",
|
|
11
|
+
"**/*.mts",
|
|
12
|
+
"**/*.cts"
|
|
10
13
|
],
|
|
11
14
|
"exclude": []
|
|
12
15
|
},
|