feat: husky忽略文件修改

This commit is contained in:
wang_fan_w 2024-04-01 23:57:08 +08:00
parent 66f7c58ed4
commit 6a3e34538a
16 changed files with 50 additions and 0 deletions

0
.husky/_/.gitignore vendored Normal file
View File

2
.husky/_/applypatch-msg Normal file
View File

@ -0,0 +1,2 @@
#!/usr/bin/env sh
. "${0%/*}/h"

4
.husky/_/commit-msg Normal file
View File

@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/husky.sh"
npx --no-install commitlint --edit $1

20
.husky/_/h Normal file
View File

@ -0,0 +1,20 @@
#!/usr/bin/env sh
[ "$HUSKY" = "2" ] && set -x
h="${0##*/}"
s="${0%/*/*}/$h"
[ ! -f "$s" ] && exit 0
for f in "${XDG_CONFIG_HOME:-$HOME/.config}/husky/init.sh" "$HOME/.huskyrc"; do
# shellcheck disable=SC1090
[ -f "$f" ] && . "$f"
done
[ "${HUSKY-}" = "0" ] && exit 0
sh -e "$s" "$@"
c=$?
[ $c != 0 ] && echo "husky - $h script failed (code $c)"
[ $c = 127 ] && echo "husky - command not found in PATH=$PATH"
exit $c

0
.husky/_/husky.sh Normal file
View File

2
.husky/_/post-applypatch Normal file
View File

@ -0,0 +1,2 @@
#!/usr/bin/env sh
. "${0%/*}/h"

2
.husky/_/post-checkout Normal file
View File

@ -0,0 +1,2 @@
#!/usr/bin/env sh
. "${0%/*}/h"

2
.husky/_/post-commit Normal file
View File

@ -0,0 +1,2 @@
#!/usr/bin/env sh
. "${0%/*}/h"

2
.husky/_/post-merge Normal file
View File

@ -0,0 +1,2 @@
#!/usr/bin/env sh
. "${0%/*}/h"

2
.husky/_/post-rewrite Normal file
View File

@ -0,0 +1,2 @@
#!/usr/bin/env sh
. "${0%/*}/h"

2
.husky/_/pre-applypatch Normal file
View File

@ -0,0 +1,2 @@
#!/usr/bin/env sh
. "${0%/*}/h"

2
.husky/_/pre-auto-gc Normal file
View File

@ -0,0 +1,2 @@
#!/usr/bin/env sh
. "${0%/*}/h"

4
.husky/_/pre-commit Normal file
View File

@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname "$0")/husky.sh"
npm run lint-staged

2
.husky/_/pre-push Normal file
View File

@ -0,0 +1,2 @@
#!/usr/bin/env sh
. "${0%/*}/h"

2
.husky/_/pre-rebase Normal file
View File

@ -0,0 +1,2 @@
#!/usr/bin/env sh
. "${0%/*}/h"

View File

@ -0,0 +1,2 @@
#!/usr/bin/env sh
. "${0%/*}/h"