{ // `tsconfig.json` deliberately covers only `src` — that is what `vite build` // compiles, and widening it would drag test-only globals into the app build. // But it also meant `tests/` and `scripts/` were never type-checked at all: a // test could reference a deleted export and only fail at runtime, and a // script could not fail at all until someone ran it. // // This config type-checks everything. Run it via `npm run typecheck:all`. "extends": "./tsconfig.json", "compilerOptions": { // vitest's `globals: true` (see vitest.config.ts) puts describe/it/expect on // the global scope; without this they are undeclared identifiers here. // `node` covers the `fs`/`path`/`process` use in scripts/ — the app bundle // never sees these, which is why the base config leaves them out. "types": ["vitest/globals", "node"], // tests/, scripts/ and build-plugins/ run on Node 26 and worker/ on // workerd, so they may use the newer built-ins the app's browser floor // keeps out of tsconfig.json. src/ is still held to that floor by // `npm run typecheck`. "lib": ["ES2025", "DOM"] }, "include": ["src", "tests", "scripts", "worker", "build-plugins"] }