Code Quality
Automated linting, formatting, and pre-commit enforcement with OXC and Husky.
BetterStarter enforces consistent code quality with zero-config tooling that runs automatically before every commit.
Tools
oxlint — Linter
oxlint is a fast Rust-based linter that replaces ESLint for the majority of rules.
pnpm lint # check
pnpm lint:fix # check + auto-fixConfig: .oxlintrc.json
oxfmt — Formatter
oxfmt is a fast TypeScript/JavaScript formatter that replaces Prettier.
pnpm format # check
pnpm format:fix # check + writeRun Both
pnpm lint-format # check lint + format
pnpm lint-format:fix # fix lint + formatHusky — Pre-commit Hooks
Husky runs lint-format:fix automatically before each git commit. This means no unformatted or unlinted code ever reaches the repo.
Environment Variable Check
BetterStarter uses Zod in src/env.ts to validate all environment variables at startup. If a required variable is missing, the app fails to start with a clear error message — rather than crashing silently at runtime.
# Example startup error when DATABASE_URL is missing:
❌ Invalid environment variables: { DATABASE_URL: [ 'Required' ] }TypeScript
All code is strictly typed. The project uses TypeScript strict mode with no any casts.
pnpm tsc --noEmit # type-check without building