Skip to content

Commit 359c84e

Browse files
committed
Add pre-push type check
1 parent f9bd544 commit 359c84e

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

.husky/pre-commit

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
1+
branch="$(git rev-parse --abbrev-ref HEAD)"
2+
3+
if [ "$branch" = "main" ]; then
4+
echo "You can't push directly to main - please check out a branch."
5+
exit 1
6+
fi
7+
18
pnpx lint-staged

.husky/pre-push

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
branch="$(git rev-parse --abbrev-ref HEAD)"
2+
3+
if [ "$branch" = "main" ]; then
4+
echo "You can't push directly to main - please check out a branch."
5+
exit 1
6+
fi
7+
8+
pnpm check-types

0 commit comments

Comments
 (0)