Add pre-commit validation (Husky/lint-staged)
Débutant
good first issuetype:devex
1 ★
Poids du clone léger
Mise à jour
Description
## Problem
It's easy to accidentally commit unformatted or broken code. We want to catch linting errors before a commit is finalized.
## Goal
Add pre-commit validation using Husky and lint-staged.
## Where to Look
- `package.json`
## Suggested Approach
1. Install `husky` and `lint-staged`.
2. Initialize Husky.
3. Configure lint-staged in `package.json` to run `eslint` and `prettier` on staged files.
## Acceptance Criteria
- [ ] Husky is initialized.
- [ ] `lint-staged` is configured for `.ts` and `.tsx` files.
- [ ] Attempting to commit a poorly formatted file automatically formats it or blocks the commit.
## Testing
Stage a file with a linting error, run `git commit`, and verify that Husky stops the commit.
## Difficulty
`Beginner`
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