- Build:
pnpm build - Lint:
pnpm lint - Type check:
pnpm tsc - Format:
pnpm format - Run all tests:
pnpm test - Run single test:
pnpm test src/path/to/file.test.ts - Run test with pattern:
pnpm test -t "test description"
- Imports: Use named exports, ES module syntax with
.jsextension in imports - Types: Strict TypeScript with interfaces for object types
- Formatting: Prettier for consistent style; use semicolons, double quotes
- Naming: camelCase for variables/functions, PascalCase for types/interfaces
- Error Handling: Use typed error objects, avoid generic catch blocks
- Testing: Vitest with mocks for dependencies, test all edge cases
- Functions: Prefer pure functions, use parameter objects for multiple options
- Module Structure: Single responsibility, explicit exports via index.ts
This project uses ESM modules, TypeScript with strict type checking, and follows modern Node.js best practices.