|
| 1 | +// The TEST-layer type-check program (#14062 — the `packages/plugins/**` family |
| 2 | +// adopting the mechanism #5286 set for `packages/spec`, #5449 generalised, |
| 3 | +// #12542 carried to `packages/rest` and #13176 to `packages/plugins/ |
| 4 | +// plugin-security`). `tsconfig.json` beside this one stays exactly as it is: it |
| 5 | +// is the BUILD config. This sibling puts the test layer in front of tsc under |
| 6 | +// the module semantics vitest really executes it with, and `package.json`'s |
| 7 | +// `typecheck` script NAMES it (via `check:test-typecheck --project`), because a |
| 8 | +// config no script invokes is exactly the phantom this whole change is about. |
| 9 | +// |
| 10 | +// The family was onboarded as a family by the director ruling of 2026-09-01 on |
| 11 | +// #14062 (maintainer verbatim: 「同意」), which also carries the #5286 |
| 12 | +// maintainer authority for the starting ledgers. The reason it is a family and |
| 13 | +// not one package: the ledger's shrink-only guarantee said NOTHING about a |
| 14 | +// third of the repo's runtime surface, and a guarantee with a silent hole is |
| 15 | +// worse than a narrower one honestly drawn, because readers generalise it. |
| 16 | +// |
| 17 | +// What differs from the build config, and what deliberately does NOT: |
| 18 | +// - MODULE SEMANTICS ONLY, plus `lib`. The tests are written and executed as |
| 19 | +// ESM by vitest (esbuild/vite). Matching that is FIDELITY, not laxity: it is the |
| 20 | +// same subtraction `packages/spec`, `packages/rest` and `plugin-security` |
| 21 | +// each made, and it removes a config-tier error pile that says nothing |
| 22 | +// about the tests. |
| 23 | +// - ⛔ STRICTNESS IS UNTOUCHED. `strict`, `noUnusedLocals`, |
| 24 | +// `noUnusedParameters`, `noImplicitReturns`, `noFallthroughCasesInSwitch`, |
| 25 | +// `rootDir`, `paths` and `types` are all INHERITED from `tsconfig.json` |
| 26 | +// (and through it the root config), and none of them is re-declared here. |
| 27 | +// ⚠️ A child that declared its own `paths` would REPLACE the parent map |
| 28 | +// rather than merge into it, silently sending a source-resolved specifier |
| 29 | +// back to `dist/` — a BUILD ARTIFACT — so this file declares none. |
| 30 | +// Nothing here may loosen a type rule; if a test does not compile, that is |
| 31 | +// the finding. |
| 32 | +// |
| 33 | +// - `lib: ["ES2022"]`, for the same reason `packages/rest` states: the root |
| 34 | +// config's `lib` is ES2020 and vitest runs on a Node that has es2022 |
| 35 | +// builtins, so the gap is reported as TS2550 about the CHECK. No `DOM`: |
| 36 | +// nothing in this layer touches a browser global. |
| 37 | +// |
| 38 | +// MEASURED at e80889095, workspace closure built first (`tsc --noEmit --pretty false |
| 39 | +// --listFiles -p tsconfig.test.json`, and the same command without `--listFiles`): |
| 40 | +// |
| 41 | +// files in this program 371 |
| 42 | +// own `src/**/*.test.ts` in it 1 |
| 43 | +// errors under BUILD semantics 0 |
| 44 | +// errors under THIS config 0 |
| 45 | +// |
| 46 | +// The two readings agree, so this package carried no config-tier pile at all. |
| 47 | +// |
| 48 | +// BEFORE THIS FILE: the build config does NOT exclude tests, so `tsc |
| 49 | +// --noEmit` already read this one file. This program is the family's |
| 50 | +// uniform instrument over the same file, not a new reader of it. |
| 51 | +// |
| 52 | +// There is NO `test-typecheck-debt.json` beside this config, and its ABSENCE is the |
| 53 | +// zero: `check:test-typecheck` reads a missing ledger as `{ entries: {} }`, under which |
| 54 | +// ANY error in ANY file here is red immediately, with no entry to be added to. That is |
| 55 | +// strictly stronger than a ledger holding nothing, and it is the same call |
| 56 | +// `plugin-security` recorded for itself in #13176. If this package ever acquires |
| 57 | +// residue that cannot be fixed in the PR that causes it, THAT is when a ledger and a |
| 58 | +// `gen:test-typecheck-debt` script are owed — and adding one is maintainer-only |
| 59 | +// (#5286), exactly as the gate says when it refuses. |
| 60 | +{ |
| 61 | + "extends": "./tsconfig.json", |
| 62 | + "compilerOptions": { |
| 63 | + "noEmit": true, |
| 64 | + "module": "esnext", |
| 65 | + "moduleResolution": "bundler", |
| 66 | + "lib": ["ES2022"] |
| 67 | + }, |
| 68 | + "include": ["src/**/*"], |
| 69 | + "exclude": ["node_modules", "dist"] |
| 70 | +} |
0 commit comments