Luson045 / medi-connect

Medi-connect(now Med Space) is an online hospital appointment booking website. Visit our website, Make sure the check the announcement... Also while raising new issues make sure there is no such existing issue, and while giving PR mention the issue. NOT ACCEPTING ISSUES ON SUNDAYS!!
https://med-space.vercel.app/
MIT License
34 stars 81 forks source link

[Feat] : Implement Pre-commit Hooks for ESLint and Prettier in Backend #314

Open tejasbenibagde opened 19 hours ago

tejasbenibagde commented 19 hours ago

Is there an existing issue for this?

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

  1. Enforce Code Quality: Automatically catch errors before they hit the codebase.
  2. Consistent Formatting: Ensure everyone’s code looks the same for easier readability.
  3. Automated Fixes: Let ESLint and Prettier handle quick fixes, saving developers time.
  4. CI/CD Integration: Keep coding standards in check during merges and deployments.
  5. Better Team Collaboration: Promote a shared understanding of coding practices.
  6. Faster Code Reviews: Reviewers can focus on logic instead of formatting issues.

Benefits

  1. Improved Code Quality: Catch bugs early to reduce issues in production.
  2. Reduced Technical Debt: Prevent style inconsistencies from piling up.
  3. Increased Developer Productivity: Spend less time on manual formatting.
  4. Enhanced Collaboration: Help new team members onboard quickly.
  5. Clear Coding Standards: Document what’s expected from everyone.
  6. Continuous Feedback: Get immediate feedback on your code as you write.

Priority

Medium

Record

lade6501 commented 11 hours ago

Hi @tejasbenibagde we already have similar issue #274, if you would like to collaborate on same ?

Luson045 commented 1 hour ago

@tejasbenibagde there's already an issue on tht

tejasbenibagde commented 1 hour ago

Ok