A minimal Node.js template for building ESM applications with TypeScript 7, pnpm, tsx, oxlint, and oxfmt.
- TypeScript 7 with strict compiler settings
- Native ESM output
- Fast local development with
tsx watch - Linting with
oxlint - Formatting with
oxfmt - pnpm package manager pinning via
packageManager
If pnpm is not installed, enable it with Corepack:
corepack enable pnpmgit clone https://github.com/sezRR/nodejs-typescript-template.git
cd nodejs-typescript-template
pnpm installRun the app in development mode with file watching:
pnpm devBuild TypeScript from src/ into dist/:
pnpm buildRun the built app:
pnpm prodLint the project:
pnpm lintFix lint issues where possible:
pnpm lint:fixFormat files:
pnpm fmtCheck formatting without writing changes:
pnpm fmt:checkThe pnpm test script is still the default placeholder and should be replaced when tests are added.
.
|-- src/
| |-- helloWorld.ts
| `-- index.ts
|-- .oxfmtrc.json
|-- .oxlintrc.json
|-- package.json
|-- pnpm-workspace.yaml
`-- tsconfig.json
tsconfig.jsoncompilessrc/todist/usingESNextmodules,bundlermodule resolution, source maps, and strict type checking..oxlintrc.jsonenables oxlint with TypeScript, Unicorn, and OXC plugins..oxfmtrc.jsonconfigures oxfmt.pnpm-workspace.yamlallows the esbuild build step used by dependencies and excludes TypeScript platform packages from the minimum release age rule.