Add pre-push type check

This commit is contained in:
cte 2025-05-11 23:40:05 -07:00
parent f9bd544dba
commit 359c84e855
2 changed files with 15 additions and 0 deletions

View file

@ -1 +1,8 @@
branch="$(git rev-parse --abbrev-ref HEAD)"
if [ "$branch" = "main" ]; then
echo "You can't push directly to main - please check out a branch."
exit 1
fi
pnpx lint-staged

8
.husky/pre-push Normal file
View file

@ -0,0 +1,8 @@
branch="$(git rev-parse --abbrev-ref HEAD)"
if [ "$branch" = "main" ]; then
echo "You can't push directly to main - please check out a branch."
exit 1
fi
pnpm check-types