Skip to content

chore: add husky git hooks and update lint-staged config - #32

Merged
mpicciolli merged 2 commits into
mainfrom
chore/husky-git-hooks
Jul 21, 2026
Merged

chore: add husky git hooks and update lint-staged config#32
mpicciolli merged 2 commits into
mainfrom
chore/husky-git-hooks

Conversation

@mpicciolli

@mpicciolli mpicciolli commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

Sets up Git hooks with husky to enforce quality checks locally before code reaches CI.

  • Add pre-commit hook running lint-staged
  • Add pre-push hook running npm run build && npm test
  • Run biome lint --write alongside biome check --write in lint-staged
  • Update the prepare script to the husky v9+ syntax (husky instead of the deprecated husky install)

Hook scripts omit the legacy shebang and husky.sh sourcing lines, which are deprecated and will fail in husky v10.

- Add pre-commit hook running lint-staged
- Add pre-push hook running build and tests
- Run biome lint --write alongside biome check in lint-staged
- Update prepare script to husky v9+ syntax

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 21, 2026 21:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR sets up local Git hooks using Husky to run code-quality checks before changes reach CI, and updates lint-staged to run additional Biome steps.

Changes:

  • Update prepare script to use Husky v9+ (husky).
  • Add Husky pre-commit and pre-push hooks for lint-staged, build, and tests.
  • Expand lint-staged commands to run both biome check --write and biome lint --write.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
package.json Switch prepare to Husky v9+ invocation (husky).
.lintstagedrc.json Update lint-staged commands to run additional Biome steps.
.husky/pre-commit Add pre-commit hook to run lint-staged.
.husky/pre-push Add pre-push hook to run build and tests.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .lintstagedrc.json Outdated
Comment thread .husky/pre-commit Outdated
@mpicciolli
mpicciolli merged commit 48e078f into main Jul 21, 2026
3 checks passed
@mpicciolli
mpicciolli deleted the chore/husky-git-hooks branch July 21, 2026 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants