Aller au contenu
login
arrow_backRetour aux issues
bre4d777/twelve #8

Add git hooks with husky and lint-staged

ecoDébutant good first issue

descriptionDescription

## Description Implement git hooks using `husky` and `lint-staged` to enforce code quality standards before commits. This prevents unformatted or linted code from entering the repository. ## Goals - Automatically run `pnpm fix` on staged files before commit - Prevent commits if linting fails - Provide fast feedback to developers locally - Reduce CI/CD burden by catching issues early ## Implementation Details - Install `husky` and `lint-staged` - Create `.husky/pre-commit` hook - Configure `lint-staged` in `package.json` to run oxlint/oxfmt checks on TypeScript files - Update `package.json` scripts: `npm run prepare` for husky setup - Document setup in `CONTRIBUTING.md` ## Acceptance Criteria - [ ] Husky installed and initialized - [ ] Pre-commit hook runs lint and format checks - [ ] Lint-staged configured for `.ts` files - [ ] Hook prevents commit if checks fail - [ ] Setup documented for new contributors
codeOuvre sur GitHub