chore: 添加 husky 并配置 pre-commit 钩子

- 添加 husky 依赖用于 Git 钩子管理
- 配置 pre-commit 钩子自动执行 eslint 检查
- 在 package.json 中添加 prepare 脚本自动安装 husky
This commit is contained in:
feige996
2025-06-03 18:44:23 +08:00
parent 604dab5f38
commit c5a1b1cd9c
3 changed files with 15 additions and 1 deletions

2
.husky/pre-commit Normal file
View File

@@ -0,0 +1,2 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"