使用husky规范commit记录

2020-01-14 17:55:25 浏览数 (1)

mark下,懒得每次需要的时候又去找

commitlint

代码语言:javascript复制
npm install --save-dev @commitlint/{config-conventional,cli}
npm install --save-dev husky
代码语言:javascript复制
{
  "husky": {
    "hooks": {
      "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
    }  
  }
}

提交规范

代码语言:javascript复制
type(scope?): subject  #scope is optional

chore: run tests on travis ci

feat(blog): add comment section

fix(server): send cors headers

0 人点赞