AOSSIE-Org / AOSSIE-Org/EduAid

Add Pre-commit Hook for Linting and Formatting with Husky

オープン
#117 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
JavaScript
スター
171
フォーク
425
PR マージ指標
30日以内にマージされた PR はありません

説明

## 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.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。