Skip to content

Commit 6c74890

Browse files
committed
🔧 Update husky config from v4 to v7
1 parent 4cfe380 commit 6c74890

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

.husky/commit-msg

Lines changed: 5 additions & 0 deletions
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

Lines changed: 8 additions & 0 deletions
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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"url": "git+https://github.com/patevs/powershell-profile.git"
1010
},
1111
"scripts": {
12+
"prepare": "husky install",
1213
"updates": "npx ncu",
1314
"release": "np"
1415
},
@@ -32,10 +33,5 @@
3233
"never"
3334
]
3435
}
35-
},
36-
"husky": {
37-
"hooks": {
38-
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
39-
}
4036
}
4137
}

0 commit comments

Comments
 (0)