0
点赞
收藏
分享

微信扫一扫

jira项目笔记5-commitlint代码提交语句检查

代码小姐 2022-10-08 阅读 134

commitlint代码提交语句检查

  • 安装依赖

​​官方网址​​

yarn add --dev @commitlint/{config-conventional,cli}

  • 新建文件

echo "module.exports = {extends: ['@commitlint/config-conventional']}" > commitlint.config.js

  • 修改package.json

"husky": {
"hooks": {
"pre-commit": "lint-staged",
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
},

  • 提交信息模版

​​官方地址​​

[
'build',
'chore',
'ci',
'docs',
'feat',
'fix',
'perf',
'refactor',
'revert',
'style',
'test'
];
echo "foo: some message" # fails
echo "fix: some message" # passes



举报

相关推荐

0 条评论