Skip to content

[CHORE] Add Husky and lint-staged for pre-commit hooks #404

Description

@github-actions

Problem Statement

Contributors sometimes commit code with TypeScript errors or bad formatting, which fails CI and clutters the commit history.

Proposed Solution

Install Husky and lint-staged. Configure a pre-commit hook that runs eslint --fix and prettier --write on staged files, and runs tsc --noEmit to catch type errors before the commit succeeds.

Alternatives Considered

Only relying on CI, but failing fast locally provides better developer experience.

Additional Context

Keep the hook fast. Only lint staged files, not the whole codebase.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ELUSOCELUSOC project submissionNEWBIEBeginner — 10 ptschore

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions