Summary
There are no pre-commit hooks, so unformatted or lint-failing code can be committed. This creates noisy diffs and lets type errors slip into PRs.
Proposed Setup
// package.json additions
"lint-staged": {
"src/**/*.ts": ["eslint --fix", "prettier --write"],
"tests/**/*.ts": ["eslint --fix", "prettier --write"]
}
- Install
husky and lint-staged
husky install wired to prepare npm script
- Pre-commit hook runs
lint-staged
- Pre-push hook runs
npm run test -- --passWithNoTests
Acceptance Criteria
Summary
There are no pre-commit hooks, so unformatted or lint-failing code can be committed. This creates noisy diffs and lets type errors slip into PRs.
Proposed Setup
huskyandlint-stagedhusky installwired topreparenpm scriptlint-stagednpm run test -- --passWithNoTestsAcceptance Criteria
npm installsets up hooks automatically viapreparescript