fanzhuan-commit-guard
v1.0.0
Published
Install a Husky commit-msg hook and validate commit messages.
Maintainers
Readme
fanzhuan-commit-guard
基于 Husky 的 commit-msg 校验 npm 插件。安装后会向项目注入 .husky/commit-msg,在 git commit 时校验提交信息格式,并自动给支持的类型补充 emoji。
安装
npm i -D fanzhuan-commit-guard插件包含 postinstall,安装时会尝试自动写入 .husky/commit-msg 并执行:
git config core.hooksPath .husky如果安装阶段没有自动注入,也可以手动执行:
npx fanzhuan-commit-guard install提交格式
feat: 新增登录功能
fix(user): 修复用户查询异常
docs: 更新 README支持的类型:
feat, fix, merge, style, perf, test, revert, build, chore, ci, refactor, docs, release本地调试
在本仓库内可以用 npm 本地路径安装到目标项目:
npm i -D ../fanzhuan-cli也可以直接在目标项目里执行:
node ../fanzhuan-cli/bin/fanzhuan-commit-guard.js install