Add git hooks with husky and lint-staged
Débutant
good first issue
9 ★
Poids du clone léger
Mise à jour
Description
## 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
Issues similaires
Tout voir
TypeScript
Débutant
[Good First Issue] 🐡 Add new Japan Fact 251 - Beginner-Friendly Open-source Contribution
## 🟢 Good First Issue: Add Japan Fact #251 — Beginner-Friendly Open Source Contribution ![Time: <1 minute](h…
Mise à jour
TypeScript
Débutant
Error bucketing
It would be great to bucket the errors in different types i.e. Code exception, configuration exception, envir…
Mise à jour
TypeScript
Débutant
LP lock links omit the /token|lp/ URL segment, causing wrong-type lookups on the detail page
## Summary Lock detail links should include the lock's kind in the URL, e.g. `/app/lock/lp/:id` or `/app/loc…
Mise à jour