Add pre-commit hook (#197)

This commit is contained in:
Suneha Bose
2025-07-02 14:53:58 -07:00
committed by GitHub
parent 8527f3ee39
commit 4eee2cd0ed
3 changed files with 27 additions and 1 deletions

7
.husky/pre-commit Normal file
View File

@ -0,0 +1,7 @@
npm test
npm run format-check || {
echo ""
echo "❌ Formatting check failed."
echo "💡 Run 'npm run format' or 'prettier --write .' to fix formatting issues."
exit 1
}