Skip to content

Conversation

@bhouston
Copy link
Member

@bhouston bhouston commented Mar 7, 2025

Add Husky pre-commit hook to ensure project builds

This PR implements a pre-commit hook using Husky that runs the build process before allowing commits. This ensures that build warnings and errors are caught early in the development process.

Changes Made

  • Added Husky and lint-staged as dev dependencies
  • Configured a pre-commit hook that runs npm run build
  • Added a pre-commit-check script to package.json
  • Updated README.md with information about the pre-commit hook

Testing

  • Verified that the pre-commit hook runs correctly when committing changes
  • Confirmed that the build process runs during the pre-commit hook

Notes

  • When this PR is merged, it will work together with PR Fix #23: Add missing tags to tags.yml #24 to prevent future tag-related warnings
  • The pre-commit hook will prevent commits if the build fails, ensuring code quality

Fixes #25

@bhouston bhouston merged commit 8514966 into main Mar 7, 2025
1 check failed
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.

Implement pre-commit hook with Husky to ensure project builds

2 participants