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 49c9ecc commit 2809fbbCopy full SHA for 2809fbb
.husky/pre-commit
@@ -1,4 +1,14 @@
1
#!/bin/sh
2
+if git rev-parse --verify HEAD >/dev/null 2>&1
3
+then
4
+ against=HEAD
5
+else
6
+ # Initial commit: diff against an empty tree object
7
+ against=$(git hash-object -t tree /dev/null)
8
+fi
9
+
10
+exec git diff-index --check --cached $against --
11
12
. "$(dirname "$0")/_/husky.sh"
13
14
npx lint-staged
0 commit comments