Opinionated template for TypeScript libraries. ESM-only, strict types, fast tooling.
- Build: tsdown (Rolldown + oxc)
- Test: Vitest with v8 coverage
- Lint: oxlint
- Format: oxfmt
- Post-build: publint + arethetypeswrong
- CI: GitHub Actions (Linux + Windows, Node 22 + 24)
- Click Use this template on GitHub
- Clone your new repository
- Search and replace:
ts-lib-starterwith your package name2BADwith your name/organization (keep@2bad/tsconfigas-is)
pnpm install
pnpm build # compile to ESM + generate .d.ts
pnpm test # run all tests
pnpm test:unit # unit tests with coverage
pnpm test:integration # integration tests with coverage
pnpm check # lint + format check
pnpm fix # auto-fix lint + formattingsource/ # source code, tests co-located
build/ # compiled output (generated)
- Node.js >= 24
- pnpm >= 10
MIT