Skip to content

Commit c652f9c

Browse files
committed
🔧 Update husky config from v4 to v7
1 parent 28e5cf1 commit c652f9c

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

.husky/commit-msg

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
. "$(dirname "$0")/common.sh"
4+
5+
yarn commitlint --edit $1

.husky/common.sh

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
command_exists () {
2+
command -v "$1" >/dev/null 2>&1
3+
}
4+
5+
# Workaround for Windows 10, Git Bash and Yarn
6+
if command_exists winpty && test -t 1; then
7+
exec < /dev/tty
8+
fi

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"npm": ">=6.8.0"
1414
},
1515
"scripts": {
16+
"prepare": "husky install",
1617
"test": "echo \"Error: no test specified\" && exit 0",
1718
"updates": "npx ncu",
1819
"release": "np"

0 commit comments

Comments
 (0)