We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f52f6f5 commit 9a0f771Copy full SHA for 9a0f771
.husky/pre-commit
@@ -1,5 +1,15 @@
1
#!/usr/bin/env sh
2
. "$(dirname -- "$0")/_/husky.sh"
3
4
+print() {
5
+ echo " [PRECOMMIT]: $1" >&2
6
+}
7
+
8
+BRANCH=$(git symbolic-ref HEAD)
9
+if [ "$BRANCH" = "refs/heads/main" ]; then
10
+ print "You tried to commit to main, which is probably a mistake. Aborting commit."
11
+ exit 1
12
+fi
13
14
yarn lint-staged
15
yarn ts-check
.husky/pre-push
@@ -0,0 +1,11 @@
+#!/usr/bin/env sh
+ echo " [PREPUSH]: $1" >&2
+ print "You tried to push to main, which is probably a mistake. Aborting push."
0 commit comments