githook-vcm

1.2.3 • Public • Published

@naughty/githook-vcm

用于验证 git-commit-msg,支持 huskyyorkie 设置的 githook

如何使用?

安装

$ npm install -D @naughty/githook-vcm

命令

githook-vcm [options]

格式

<type>(<scope>): <subject>

验证规则

/^(revert: )?(feat|fix|docs|style|refactor|perf|opt|test|workflow|ci|release|chore|types)(\(.+\)): .{1,50}/

选项

  • --allow-merge: 允许合并,默认禁用合并
  • --ignore-type: 忽略 type 的验证
  • --ignore-scope: 忽略 scope 的验证
  • --max: commit-msg的最大长度,默认为50

husky 一起使用,在 package.json 中添加:

"config": {
    "hooks": {
        "commit-msg": "githook-vcm"
    }
}

yorkie 一起使用,在 package.json 中添加:

"gitHooks": {
    "commit-msg": "githook-vcm"
}

Readme

Keywords

none

Package Sidebar

Install

npm i githook-vcm

Weekly Downloads

2

Version

1.2.3

License

none

Unpacked Size

4.91 kB

Total Files

9

Last publish

Collaborators

  • glaw