Skip to content

[FEAT] Add husky #85

@binit2-1

Description

@binit2-1

Is your feature request related to a problem? Please describe.
Currently, code quality checks (linting, formatting, type checking) rely entirely on developers remembering to run them manually before pushing. This often leads to failed CI pipelines or inconsistent code styles making it into the repository because a step was skipped locally.

Describe the solution you'd like
I would like to integrate Husky to handle Git hooks automatically.

  • pre-commit: Should run lint-staged (formatting and linting) to ensure no bad code is committed.
  • pre-push: (Optional but recommended) Should run type checks or unit tests to prevent broken builds from reaching the remote.

Describe alternatives you've considered

  • Relying solely on CI/CD pipelines (feedback loop is too slow; developers have to wait for the build to fail).
  • Manual enforcement (prone to human error).

Additional context

  • We are using a Monorepo, so Husky needs to be configured at the root but trigger scripts capable of handling the workspace structure.

✅ Proof of Work

  • Install Husky: npm install --save-dev husky
  • Initialize: npx husky init
  • Update package.json scripts to include a prepare script.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions