Add husky precommit check in the repo. (#171)
Signed-off-by: Tatsat Mishra <tamishra@microsoft.com>
This commit is contained in:
9
.husky/pre-commit
Normal file
9
.husky/pre-commit
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user