One preset for each tool
TypeScript, oxlint, oxfmt, Vite, Vitest and TypeDoc each have a package of their own. Install the ones you use, and extend them.
Each repo of TypeScript packages needs a tsconfig, a lint config, a format config, a test config and a docs config. When you copy them from repo to repo, they drift apart, and a fix in one repo does not reach the others.
With @wtf/project, each config extends a shared preset, and states only what is different in your
repo. You install only the presets that you use. An update of a preset reaches every repo that
extends it.
// vitest.config.ts, at the rootimport { rootConfig } from '@wtf/project-vitest/config'
export default rootConfig(){ "extends": "@wtf/project-typescript/strict", "compilerOptions": { "composite": true, "rootDir": "src", "outDir": "dist" }, "include": ["src"]}You do not build before you test. The resolve hook runs the TypeScript of the workspace straight
from src, and the TypeScript, Vite and Vitest configs resolve each workspace package to its
source in the same way. In CI, the same tests run on the build, with coverage mapped back to the
source.
pnpm test # from the source, with nothing builtpnpm test:dist # from the build, as CI doesOne preset for each tool
TypeScript, oxlint, oxfmt, Vite, Vitest and TypeDoc each have a package of their own. Install the ones you use, and extend them.
No build before a test
Each package of your workspace exports its TypeScript by the @wtf/source condition. The
resolve hook, Vite and Vitest read it, so a test runs the source as it is.
Coverage of the build
CI tests what you publish, the build, and maps the coverage back to the source by the source maps.
Held to the standards
Run the Web Platform Tests of a standard in Vitest, at a pinned commit, with a list of the known failures of your implementation.