mirror of
https://github.com/fergalmoran/onearmy-community-platform.git
synced 2025-12-22 09:37:54 +00:00
fix(commitlint): husky hooks
This commit is contained in:
12
.husky/common.sh
Normal file
12
.husky/common.sh
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
# Common script to add support on windows
|
||||||
|
# https://typicode.github.io/husky/#/?id=yarn-on-windows
|
||||||
|
# https://github.com/commitizen/cz-cli/issues/627
|
||||||
|
|
||||||
|
command_exists () {
|
||||||
|
command -v "$1" >/dev/null 2>&1
|
||||||
|
}
|
||||||
|
|
||||||
|
# Workaround for Windows 10, Git Bash and Yarn
|
||||||
|
if command_exists winpty && test -t 1; then
|
||||||
|
exec < /dev/tty
|
||||||
|
fi
|
||||||
7
.husky/prepare-commit-msg
Normal file
7
.husky/prepare-commit-msg
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Call common windows fix
|
||||||
|
. "$(dirname "$0")/common.sh"
|
||||||
|
|
||||||
|
# Call commitlint from bin (faster than yarn)
|
||||||
|
node_modules/.bin/commitlint --edit $1
|
||||||
|
|
||||||
Reference in New Issue
Block a user