Skip to content

Commit

Permalink
fix: husky typicode/husky#850
Browse files Browse the repository at this point in the history
  • Loading branch information
corlys committed Oct 15, 2021
1 parent d0574d7 commit ffa3fe5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions .husky/commit-msg
@@ -1,4 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
. "$(dirname "$0")/common.sh"

yarn commitlint --edit $1
8 changes: 8 additions & 0 deletions .husky/common.sh
@@ -0,0 +1,8 @@
command_exists () {
command -v "$1" >/dev/null 2>&1
}

# Windows 10, Git Bash and Yarn workaround
if command_exists winpty && test -t 1; then
exec < /dev/tty
fi
1 change: 1 addition & 0 deletions .husky/pre-commit
@@ -1,4 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
. "$(dirname "$0")/common.sh"

yarn lint-staged

0 comments on commit ffa3fe5

Please sign in to comment.