Skip to content

chore: add pre-commit hooks with husky and lint-staged #36

@PaulGrimshaw

Description

@PaulGrimshaw

Context

There are no pre-commit hooks. Contributors can push code that fails lint/format checks, causing noisy CI failures.

Change required

pnpm add -Dw husky lint-staged
pnpm exec husky init

.husky/pre-commit:

pnpm exec lint-staged

Root package.json:

"lint-staged": {
  "**/*.ts": ["eslint --fix", "prettier --write"]
}

This catches formatting and lint issues locally before they hit CI.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions