Add husky precommit check in the repo. (#171)

Signed-off-by: Tatsat Mishra <tamishra@microsoft.com>
This commit is contained in:
Tatsinnit 2025-07-03 10:55:16 +12:00 committed by GitHub
parent ff4789395b
commit 00ca972929
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 35 additions and 1 deletions

9
.husky/pre-commit Normal file
View file

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