安装配置git commit hook
安装 husky 报错
注意:
虽然是新建项目,但请注意是否 git init
1.npx husky-init 安装husky
若有报错,一般为
"husky install" command already exists in prepare script, skipping.
fatal: not a git repository (or any of the parent directories): .git
检查是否 有 .git
git init
npx husky-init
2.npx mrm@2 lint-staged
若以下报错
解决: npx husky-init