Skip to content

💡[Feature]: Add Husky pre-commit hooks for ESLint and Prettier #839

@sheikhlimon

Description

@sheikhlimon

Is there an existing issue for this?

  • I have searched the existing issues

Feature Description

Add Husky pre-commit hooks integrated with lint-staged to automatically run ESLint and Prettier on staged files before a commit. This ensures that all code adheres to the project’s linting and formatting rules.

Use Case

  • Developers commit code without manually running linting or formatting scripts.
  • Unformatted or non-compliant code could be pushed to the repository, creating inconsistent code style.
  • Contributors need a simple, automated way to ensure their changes are correctly formatted before committing.

Benefits

  • Guarantees code style consistency across the codebase.
  • Reduces the likelihood of linting errors in CI.
  • Saves time for contributors by automating repetitive lint/format tasks.
  • Improves code review experience, as PRs will focus on logic changes rather than formatting issues.

Add ScreenShots

No response

Priority

Medium

Record

  • I have read the Contributing Guidelines
  • Are you a GSSOC'25 contributor
  • I want to work on this issue

Metadata

Metadata

Assignees

Type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions