AOSSIE-Org / AOSSIE-Org/EduAid

Add Pre-commit Hook for Linting and Formatting with Husky

Aperta
#117 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
171
Fork
425
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

## Description:
Right now, there's nothing in place to catch linting or formatting issues before code gets committed. This means that sometimes broken or inconsistent code gets into the codebase, which leads to headaches in code reviews, CI failures, and slower development overall.

To solve this, I suggest adding a **Husky pre-commit hook** that runs **ESLint** for linting and **Prettier** for formatting checks before any code is committed. The hook will only run on **staged files**, so it will only check the changes that are actually about to be committed. This will help ensure that we don’t accidentally commit broken code or leave formatting issues behind, ultimately making the development process faster and smoother.

**Issue Type:**
- [x] Feature
- [ ] Bug
- [ ] Documentation
- [ ] Improvement
- [ ] Refactor
- [ ] Task

## Why This Is Needed:
- **Faster Development:** Catching issues before they get committed means fewer problems later on, reducing delays during code review and CI.

- **Consistent Code:** Ensures the codebase stays clean, properly formatted, and follows the same standards.

- **Avoiding Broken Code:** By running these checks only on staged files before committing, we prevent broken code from slipping through and causing issues down the line.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.