Skip to content

Add pre-commit hooks for ESLint & Prettier using Husky + lint-staged #424

Open

Description

@revaarathore11

Feature Description

Add pre-commit hooks to automatically run ESLint and Prettier on staged files before commits using Husky and lint-staged.

This ensures code quality and consistent formatting by catching issues early in the development workflow.

Motivation

Currently, linting and formatting checks rely on developers running ESLint and Prettier manually. This can lead to inconsistent formatting or lint issues being committed unintentionally.

Adding automated pre-commit checks would improve code quality and developer experience by catching issues early.

Expected Behavior

  • ESLint should run with auto-fix on staged .ts files under
  • Prettier should format staged source files, JSON, Markdown, and YAML
  • The checks should run automatically on git commit
  • Commits should be blocked if unfixable lint errors are found
  • No impact on runtime, build, or production behavior

Additional Information
This can be implemented using Husky and lint-staged with the modern (v9+) Husky setup.
The checks should only run on staged files to keep commits fast.

This would be a developer-only tooling improvement.

Activity

  1. changed the title [-]triage:[/-] [+]Add pre-commit hooks for ESLint & Prettier using Husky + lint-staged[/+] on Jan 27, 2026
  2. revaarathore11 commented on Jan 27, 2026

    @revaarathore11
    Author

    @uniqueg @anuragxxd I'm working on this please assign me, thanks

  3. anuragxxd commented on Jan 27, 2026

    @anuragxxd
    Member

    Hey @revaarathore11 , feel free to assign this to you and work on it!

  4. added
    status: triage
    and removed on Nov 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

status: triage

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions