Default TypeScript stack for Lambda: pnpm workspaces + Turbo, strict TS, and sensible DX helpers.
npx playbooks add skill lambdamechanic/skills --skill typescript
Baseline setup to reuse across projects. We standardize on pnpm workspaces and Turborepo for task orchestration.
package.json: { "packageManager": "pnpm@9.x", "private": true }
pnpm-workspace.yaml with your package globs (e.g., packages/*).pnpm -r lint, pnpm -r test, pnpm -r build.turbo.json: {
"pipeline": {
"lint": { "outputs": [] },
"test": { "dependsOn": ["^build"], "outputs": [] },
"build": { "dependsOn": ["^build"], "outputs": ["dist/**"] }
}
}
pnpm turbo lint test build (or shorter aliases).lint, test, build, typecheck so Turbo and pnpm can compose them."type": "module"), target: ES2022+, moduleResolution: node16|bundler, strict: true, resolveJsonModule: true, skipLibCheck: true, sourceMap: true.tsconfig.base.json; each package extends it and sets rootDir: src, outDir: dist. Use composite: true + project references for multi-package builds and tsc -b.typecheck: tsc --noEmitlint: ESLint with @typescript-eslint/*build: tsc -b for libs/services; use tsup when you need bundled ESM+CJS + d.tstest: Vitest or Jest; keep typecheck separate so test runners don’t hide TS errorspnpm -r typecheck, pnpm -r lint, pnpm -r build, pnpm -r test; Turbo can wrap these when you want caching.tsx for local scripts (pnpm add -D tsx), avoid ts-node unless necessary.zod) to turn unknown into typed data.unknown over any; explicit return types on exports; keep strict green by fixing code, not loosening config.src/; never import from build outputs. Prefer ESM; use CJS only if the target requires it.Error subclasses with context; avoid silent catches. Use Promise.allSettled for fan-out when partial failure is acceptable.@typescript-eslint/parser and recommended configs; set parserOptions.project when rules need type info.lint-staged + simple-git-hooks, or enforce in CI.env.ts that validates and types process.env.Weekly roundup of top Claude Code skills, MCP servers, and AI coding tips.