Skip to content

chore: migrate to modern husky pre-commit hooks - #7

Merged
cyp3rius merged 2 commits into
mainfrom
cursor/modern-husky-pre-commit-cf70
Nov 3, 2026
Merged

cyp3rius merged 2 commits into
mainfrom
cursor/modern-husky-pre-commit-cf70

Conversation

@cyp3rius

@cyp3rius cyp3rius commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

📝 Description

Migrates from inactive legacy package.json → husky.hooks (ignored by Husky 5+) to modern husky 9 with an active .husky/pre-commit hook.

🔄 Changes

  • Upgrade husky 7.0.4 → ^9.1.7
  • Update prepare script: husky install → husky
  • Remove inactive husky.hooks from package.json
  • Add .husky/pre-commit that runs yarn test:run and yarn build

🧪 Testing

  • Confirmed the new pre-commit hook ran successfully on both commits (tests + build passed)
  • yarn test:run and yarn build verified locally

✅ Checklist

  • I have read and followed the Contributing Guidelines
  • I have read and agree with the Code of Conduct
  • My changes follow the code style of this project
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the documentation accordingly

🔗 Related Issues

N/A — from husky hooks audit (internal/husky-hooks-audit.md)

Open in Web Open in Cursor 

Replace inactive package.json husky.hooks with .husky/pre-commit
that runs yarn test:run and yarn build before each commit.
Align with husky 9 prepare script and slim .husky/pre-commit
(no legacy husky.sh shim). Pre-commit still runs tests and build.
@codecov

codecov Bot commented Nov 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (2a30f90) to head (d3e384b).

Additional details and impacted files
@@          Coverage Diff          @@
##            main      #7   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files         12      12           
  Lines         81      81           
  Branches       4       4           
=====================================
  Misses        81      81           
Flag Coverage Δ
unittest 0.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cyp3rius
cyp3rius merged commit fcad72a into main Nov 3, 2026
4 checks passed
@cyp3rius
cyp3rius deleted the cursor/modern-husky-pre-commit-cf70 branch November 3, 2026 12:57
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