Reference
Configuration
Site config, lint rules, TypeScript settings, and git hooks.
Site config
Branding lives in lib/site.ts — name, version, and the GitHub link shown in the top bar. Change it once and the header, landing page, and metadata all update.
export const siteConfig = {
name: "Docs",
brand: "acme",
version: "1.0.0",
github: "https://github.com/acme/docs-template",
} as constESLint
On top of the Next.js and TypeScript presets, two hard limits keep the codebase honest:
max-lines: no file longer than 500 lines.complexity: no function with cyclomatic complexity above 10.
TypeScript
tsconfig.json runs in strict mode with noUncheckedIndexedAccess enabled, so indexed lookups return T | undefined until proven safe.
Git hooks
Husky wires quality gates into git:
- pre-commit — lint-staged runs ESLint on staged files.
- commit-msg — commit messages must follow conventional commits (
feat:,fix:,chore:, ...). - pre-push — the full
preflightcheck (typecheck, lint, build) runs before anything leaves your machine.