This project includes scripts and hook tweaks that keep commits fast while still running the important checks.
- Run
pnpm commit:stageto stage changes (excludingcoverage/andreports/) and executelint-staged. - If you need to stage coverage or report artifacts manually, add them after running the shortcut.
- Coverage tests (
pnpm run test:coverage) execute on every commit, but failures only emit a warning so you can keep moving when the suite is flaky. - Security scans (
pnpm run security:scan) behave the same way—warnings, no commit block. The scan currently runs Trivy, Opengrep, and OWASP baseline. - Coverage and security results are archived automatically; the directories are
ignored via
.gitignoreso historical reports stay out of the repo.
lint-stagedruns after the archive steps. It now invokespnpm exec biome format --writeon staged files; keep Biome installed (@biomejs/biomeas a dev dependency) so the command resolves.- The
.husky/pre-commithook must NOT include the legacy shebang andhusky.sh; removing them prevents Husky v10 from overwriting the custom script logic. - The
.husky/commit-msghook runscommitlintusing the conventional config (commitlint.config.cjs). Follow<type>(<scope>): <subject>using the provided FE-oriented type/scope lists.