Commit 976471f9 by chunhong.mu

chore: 添加 husky git 钩子配置

parents
Showing with 20 additions and 0 deletions
#!/usr/bin/env sh
(
# 检查是否在 git 目录
if [ -z "$GIT_DIR" ]; then
GIT_DIR=$(git rev-parse --git-dir)
fi
# 运行 commitlint
npx --no -- commitlint --edit ${1}
)
#!/usr/bin/env sh
(
# 检查是否在 git 目录
if [ -z "$GIT_DIR" ]; then
GIT_DIR=$(git rev-parse --git-dir)
fi
# 运行 lint-staged
npx lint-staged
)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment