@neralabs/rerail-pack-typescript 0.1.1 → 0.1.3
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 +179 -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 +7 -4
- package/rules/typescript-eslint-consistent-type-definitions.json +1 -1
- package/rules/typescript-eslint-default-param-last.json +3 -3
- package/rules/typescript-eslint-no-array-constructor.json +6 -3
- package/rules/typescript-eslint-no-confusing-non-null-assertion.json +9 -6
- package/rules/typescript-eslint-no-dupe-class-members.json +1 -1
- package/rules/typescript-eslint-no-duplicate-enum-values.json +3 -7
- package/rules/typescript-eslint-no-empty-function.json +1 -1
- package/rules/typescript-eslint-no-extra-non-null-assertion.json +6 -3
- package/rules/typescript-eslint-no-import-type-side-effects.json +9 -6
- package/rules/typescript-eslint-no-namespace.json +3 -7
- package/rules/typescript-eslint-no-non-null-asserted-optional-chain.json +6 -3
- package/rules/typescript-eslint-no-non-null-assertion.json +5 -9
- package/rules/typescript-eslint-no-unnecessary-type-constraint.json +6 -3
- package/rules/typescript-eslint-no-unsafe-function-type.json +3 -7
- package/rules/typescript-eslint-no-unused-expressions.json +1 -1
- package/rules/typescript-eslint-no-useless-empty-export.json +3 -3
- package/rules/typescript-eslint-prefer-as-const.json +3 -7
- package/rules/typescript-eslint-prefer-enum-initializers.json +3 -3
- package/rules/typescript-eslint-prefer-literal-enum-member.json +1 -1
- package/rules/typescript-eslint-prefer-namespace-keyword.json +6 -3
- package/rules/typescript-eslint-no-wrapper-object-types.json +0 -628
|
@@ -1,19 +1,15 @@
|
|
|
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
|
-
"description": "
|
|
6
|
+
"description": "Use as const instead of repeating a literal as its own type, in assertions or annotations; it states the intent without duplication.",
|
|
7
7
|
"scope": {
|
|
8
8
|
"include": [
|
|
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
|
-
"description": "
|
|
7
|
-
"scope": { "include": ["
|
|
6
|
+
"description": "Give every TypeScript enum member an explicit value; implicit numbering shifts when members are added or reordered.",
|
|
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":"Initialize TypeScript enum members only with literal strings or numbers, not computed values or references to other members.","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
|
-
"description": "
|
|
6
|
+
"description": "Use the namespace keyword instead of module to declare custom TypeScript namespaces; module is reserved for external module declarations.",
|
|
7
7
|
"scope": {
|
|
8
8
|
"include": [
|
|
9
|
-
"
|
|
9
|
+
"**/*.ts",
|
|
10
|
+
"**/*.tsx",
|
|
11
|
+
"**/*.mts",
|
|
12
|
+
"**/*.cts"
|
|
10
13
|
],
|
|
11
14
|
"exclude": []
|
|
12
15
|
},
|