[Feat] : Implement Pre-commit Hooks for ESLint and Prettier in Backend
Closed this issue · 3 comments
tejasbenibagde commented
Is there an existing issue for this?
- I have searched the existing issues
Feature Description
Problem:
Currently, our backend code lacks consistent formatting and linting, which can lead to code quality issues and increased difficulty in maintaining the codebase.
Proposed Solution:
I suggest implementing pre-commit hooks using Husky and lint-staged to ensure that both ESLint and Prettier run automatically before each commit. This will help maintain code quality by enforcing consistent styling and catching potential errors early in the development process.
Use Case
- Enforce Code Quality: Automatically catch errors before they hit the codebase.
- Consistent Formatting: Ensure everyone’s code looks the same for easier readability.
- Automated Fixes: Let ESLint and Prettier handle quick fixes, saving developers time.
- CI/CD Integration: Keep coding standards in check during merges and deployments.
- Better Team Collaboration: Promote a shared understanding of coding practices.
- Faster Code Reviews: Reviewers can focus on logic instead of formatting issues.
Benefits
- Improved Code Quality: Catch bugs early to reduce issues in production.
- Reduced Technical Debt: Prevent style inconsistencies from piling up.
- Increased Developer Productivity: Spend less time on manual formatting.
- Enhanced Collaboration: Help new team members onboard quickly.
- Clear Coding Standards: Document what’s expected from everyone.
- Continuous Feedback: Get immediate feedback on your code as you write.
Priority
Medium
Record
- I agree to follow this project's Code of Conduct
- I'm a GSSOC contributor
- I want to work on this issue
- I'm willing to provide further clarification or assistance if needed.
lade6501 commented
Hi @tejasbenibagde we already have similar issue #274, if you would like to collaborate on same ?
Luson045 commented
@tejasbenibagde there's already an issue on tht
tejasbenibagde commented
Ok