From 6a3e34538a57d97b2b055be8d0612f8147da1d58 Mon Sep 17 00:00:00 2001 From: wang_fan_w <2547096351@qq.com> Date: Mon, 1 Apr 2024 23:57:08 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20husky=E5=BF=BD=E7=95=A5=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .husky/_/.gitignore | 0 .husky/_/applypatch-msg | 2 ++ .husky/_/commit-msg | 4 ++++ .husky/_/h | 20 ++++++++++++++++++++ .husky/_/husky.sh | 0 .husky/_/post-applypatch | 2 ++ .husky/_/post-checkout | 2 ++ .husky/_/post-commit | 2 ++ .husky/_/post-merge | 2 ++ .husky/_/post-rewrite | 2 ++ .husky/_/pre-applypatch | 2 ++ .husky/_/pre-auto-gc | 2 ++ .husky/_/pre-commit | 4 ++++ .husky/_/pre-push | 2 ++ .husky/_/pre-rebase | 2 ++ .husky/_/prepare-commit-msg | 2 ++ 16 files changed, 50 insertions(+) create mode 100644 .husky/_/.gitignore create mode 100644 .husky/_/applypatch-msg create mode 100644 .husky/_/commit-msg create mode 100644 .husky/_/h create mode 100644 .husky/_/husky.sh create mode 100644 .husky/_/post-applypatch create mode 100644 .husky/_/post-checkout create mode 100644 .husky/_/post-commit create mode 100644 .husky/_/post-merge create mode 100644 .husky/_/post-rewrite create mode 100644 .husky/_/pre-applypatch create mode 100644 .husky/_/pre-auto-gc create mode 100644 .husky/_/pre-commit create mode 100644 .husky/_/pre-push create mode 100644 .husky/_/pre-rebase create mode 100644 .husky/_/prepare-commit-msg diff --git a/.husky/_/.gitignore b/.husky/_/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/.husky/_/applypatch-msg b/.husky/_/applypatch-msg new file mode 100644 index 0000000..21c69a4 --- /dev/null +++ b/.husky/_/applypatch-msg @@ -0,0 +1,2 @@ +#!/usr/bin/env sh +. "${0%/*}/h" \ No newline at end of file diff --git a/.husky/_/commit-msg b/.husky/_/commit-msg new file mode 100644 index 0000000..94647a4 --- /dev/null +++ b/.husky/_/commit-msg @@ -0,0 +1,4 @@ +#!/usr/bin/env sh +. "$(dirname -- "$0")/husky.sh" + +npx --no-install commitlint --edit $1 \ No newline at end of file diff --git a/.husky/_/h b/.husky/_/h new file mode 100644 index 0000000..86bd0ba --- /dev/null +++ b/.husky/_/h @@ -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 \ No newline at end of file diff --git a/.husky/_/husky.sh b/.husky/_/husky.sh new file mode 100644 index 0000000..e69de29 diff --git a/.husky/_/post-applypatch b/.husky/_/post-applypatch new file mode 100644 index 0000000..21c69a4 --- /dev/null +++ b/.husky/_/post-applypatch @@ -0,0 +1,2 @@ +#!/usr/bin/env sh +. "${0%/*}/h" \ No newline at end of file diff --git a/.husky/_/post-checkout b/.husky/_/post-checkout new file mode 100644 index 0000000..21c69a4 --- /dev/null +++ b/.husky/_/post-checkout @@ -0,0 +1,2 @@ +#!/usr/bin/env sh +. "${0%/*}/h" \ No newline at end of file diff --git a/.husky/_/post-commit b/.husky/_/post-commit new file mode 100644 index 0000000..21c69a4 --- /dev/null +++ b/.husky/_/post-commit @@ -0,0 +1,2 @@ +#!/usr/bin/env sh +. "${0%/*}/h" \ No newline at end of file diff --git a/.husky/_/post-merge b/.husky/_/post-merge new file mode 100644 index 0000000..21c69a4 --- /dev/null +++ b/.husky/_/post-merge @@ -0,0 +1,2 @@ +#!/usr/bin/env sh +. "${0%/*}/h" \ No newline at end of file diff --git a/.husky/_/post-rewrite b/.husky/_/post-rewrite new file mode 100644 index 0000000..21c69a4 --- /dev/null +++ b/.husky/_/post-rewrite @@ -0,0 +1,2 @@ +#!/usr/bin/env sh +. "${0%/*}/h" \ No newline at end of file diff --git a/.husky/_/pre-applypatch b/.husky/_/pre-applypatch new file mode 100644 index 0000000..21c69a4 --- /dev/null +++ b/.husky/_/pre-applypatch @@ -0,0 +1,2 @@ +#!/usr/bin/env sh +. "${0%/*}/h" \ No newline at end of file diff --git a/.husky/_/pre-auto-gc b/.husky/_/pre-auto-gc new file mode 100644 index 0000000..21c69a4 --- /dev/null +++ b/.husky/_/pre-auto-gc @@ -0,0 +1,2 @@ +#!/usr/bin/env sh +. "${0%/*}/h" \ No newline at end of file diff --git a/.husky/_/pre-commit b/.husky/_/pre-commit new file mode 100644 index 0000000..3cd913c --- /dev/null +++ b/.husky/_/pre-commit @@ -0,0 +1,4 @@ +#!/usr/bin/env sh +. "$(dirname "$0")/husky.sh" + +npm run lint-staged \ No newline at end of file diff --git a/.husky/_/pre-push b/.husky/_/pre-push new file mode 100644 index 0000000..21c69a4 --- /dev/null +++ b/.husky/_/pre-push @@ -0,0 +1,2 @@ +#!/usr/bin/env sh +. "${0%/*}/h" \ No newline at end of file diff --git a/.husky/_/pre-rebase b/.husky/_/pre-rebase new file mode 100644 index 0000000..21c69a4 --- /dev/null +++ b/.husky/_/pre-rebase @@ -0,0 +1,2 @@ +#!/usr/bin/env sh +. "${0%/*}/h" \ No newline at end of file diff --git a/.husky/_/prepare-commit-msg b/.husky/_/prepare-commit-msg new file mode 100644 index 0000000..21c69a4 --- /dev/null +++ b/.husky/_/prepare-commit-msg @@ -0,0 +1,2 @@ +#!/usr/bin/env sh +. "${0%/*}/h" \ No newline at end of file