1.5 KiB
1.5 KiB
Agents
Project Overview
TypeScript ESM boilerplate. Runtime-only via tsx, no build step.
Stack
- Runtime: Node 24+, tsx
- Package manager: pnpm
- Linting: @antfu/eslint-config v8 (eslint.config.mjs)
- Env: env-var + native
loadEnvFile - Container: Docker, node:24-alpine
Structure
src/
├── index.ts # entrypoint
└── shared/
└── config.ts # env config
Preferred Folder Structure
src/
├── index.ts # entrypoint
├── shared/ # cross-cutting concerns (config, types, utilities)
└── lib/ # third-party wrappers, adapters
Expand based on project type as needed. Keep src/index.ts as the single entrypoint.
Conventions
- ESM only (
"type": "module") - Path alias
@/*maps tosrc/*— imports must end with.jsextension (nodenext resolution) - No build step — tsx runs TS directly in dev and prod
cross-envfor cross-platform env vars in npm scripts- No useless comments
- Split code into multiple files rather than monoliths
Commands
pnpm dev— watch modepnpm start— production runpnpm lint— checkpnpm lint:fix— auto-fix
Lint Rules
no-console: off— console.log is allowedantfu/no-top-level-await: off- Stylistic: 2-space indent, single quotes
- JSON key ordering enforced (auto-fixed)
Docker
Single-stage, no build. Copies source, installs prod deps, runs via pnpm start.