@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/README.md
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
# Rerail rule pack: TypeScript
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
21 code rules for TypeScript, ported from typescript-eslint 8.70.1 (on ESLint 10.11.0), each with its default
|
|
4
4
|
options. 11 start off (`"on": false`): no approved typescript-eslint configuration turns them on, so they are
|
|
5
5
|
experimental. Each is scored against the tool's own findings on the tool's test fixtures and on a pinned corpus
|
|
6
6
|
(vscode), through the engine's production workspace path, with every disagreement declared in `divergences.json`
|
|
7
7
|
(none today). ESLint's core rules are in the [JavaScript pack](../javascript/README.md).
|
|
8
8
|
|
|
9
|
+
Every typescript-eslint rule runs on `.ts`, `.tsx`, `.mts` and `.cts` files only, and the vscode corpus is scored on
|
|
10
|
+
its TypeScript files only (`exclude` in `conformance.json`). On JavaScript a port steers CommonJS files away from
|
|
11
|
+
`require` (`no-require-imports` on `jest.config.js`), and with both packs added a port with an ESLint core twin would
|
|
12
|
+
report the same violation as the twin, which runs on JavaScript files only.
|
|
13
|
+
|
|
9
14
|
It is checked by `npx vitest run test/engine/catalog/packs.test.ts -t "pack typescript"`, against the
|
|
10
15
|
[pack structure and validation contract](../../docs/pack-format.md).
|
|
11
16
|
|
|
@@ -17,7 +22,7 @@ It is checked by `npx vitest run test/engine/catalog/packs.test.ts -t "pack type
|
|
|
17
22
|
| `divergences.json` | Declared disagreements with the tools |
|
|
18
23
|
| `upstream/<tool>/` | The tool's copied tests (`fixtures/`) and its recordings (`fixtures.expected.json`, `corpus-vscode.expected.json`); `upstream/eslint-plugin-vitest/UPSTREAM.md` lists the fixtures Rerail wrote (`fixtures/*/rerail-*`), which the recorder holds and records like the copied ones |
|
|
19
24
|
| `upstream/generate.mjs` | typescript-eslint's recorder; `upstream/eslint-plugin-vitest/generate.mjs` records @vitest/eslint-plugin |
|
|
20
|
-
| `candidates/rules/` | Ports still being evaluated, never shipped: typescript-eslint and @vitest/eslint-plugin 1.6.27 ports that fail a
|
|
25
|
+
| `candidates/rules/` | Ports still being evaluated, never shipped: typescript-eslint and @vitest/eslint-plugin 1.6.27 ports that fail a rule gate ([docs/port-readiness.md](../../docs/port-readiness.md)) or rerail's pack contract. Each but `prefer-optional-chain` (it requires type information, which the recordings do not have) and `no-explicit-any` (the fixtures recording does not cover it yet) is listed in `conformance.json`, scored and reported on the fixtures, never gated; the vscode recording covers the shipped rules only. The three `vitest-*.json` documents are generated: edit `scripts/generate/packs/typescript-vitest-policies.mjs`, not the JSON, and run `node scripts/generate/packs/typescript-vitest-policies.mjs` from the repository root |
|
|
21
26
|
| `licenses/<tool>/` | The tool's licence and `UPSTREAM.md`, listing every copied file |
|
|
22
27
|
|
|
23
28
|
Re-recording runs offline against the pinned tool versions (the recorder's header lists them):
|
|
@@ -101,3 +101,10 @@ Paths are relative to the pack directory, `packs/typescript/`.
|
|
|
101
101
|
| `upstream/eslint-plugin-vitest/fixtures/no-focused-tests/018.test.ts` | `tests/no-focused-tests.test.ts` | derived |
|
|
102
102
|
| `upstream/eslint-plugin-vitest/fixtures/no-focused-tests/019.test.ts` | `tests/no-focused-tests.test.ts` | derived |
|
|
103
103
|
| `upstream/eslint-plugin-vitest/fixtures/no-focused-tests/020.test.ts` | `tests/no-focused-tests.test.ts` | derived |
|
|
104
|
+
|
|
105
|
+
> `recording.json` is a port readiness recording, and no file of this pack, so it is recorded here rather than in the
|
|
106
|
+
> table above: the tool-pack's `recording.lock` names it and a GitHub release holds the bytes (docs/port-readiness.md).
|
|
107
|
+
> It carries excerpts of this upstream's tests (`tests/*.test.ts`: the `code` of each RuleTester case), redistributed
|
|
108
|
+
> under the licence above, together with Rerail's Apache-2.0; the LICENSE beside this file is this upstream's own, at
|
|
109
|
+
> the pinned commit.
|
|
110
|
+
|