Files
vue-ts-example/.husky/pre-commit
严浩 15980dd551
Some checks failed
/ surge (push) Successful in 2m30s
/ build-and-deploy-to-vercel (push) Successful in 2m43s
/ lint-build-and-check (push) Successful in 4m53s
/ playwright (push) Failing after 19m31s
feat: 添加 husky 钩子,支持 commit-msg 和 post-merge 自动提示,更新 pre-commit 钩子中文提示
2025-04-01 19:18:31 +08:00

14 lines
456 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

echo "🔧 正在运行 pre-commit 钩子..."
pnpm -v
echo "✅ pnpm 已安装,正在执行 lint-staged..."
# if command -v pnpm >/dev/null 2>&1; then
# # 如果 pnpm 可用,直接使用它
# pnpm exec lint-staged
# else
# # 如果 pnpm 不可用,使用 $HOME/.local/bin/pnpm
# # ln -s $(which pnpm) $HOME/.local/bin/pnpm
# echo "找不到 pnpm使用 $HOME/.local/bin/pnpm"
# "$HOME"/.local/bin/pnpm exec lint-staged
# fi