iot-ui-vue/.commitlintrc.cjs

37 lines
966 B
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'type-enum': [
2,
'always',
[
'build', // 编译相关修改(新版本发布)
'feat', // 新功能
'fix', // 修复bug
'update', // 更新某功能
'refactor', // 重构
'docs', // 文档
'chore', // 增加依赖或库
'style', // 格式(不影响代码变动)
'revert', // 撤销commit 回滚上一版本
'perf', // 性能优化
'remove', //删除
'release', //
]
],
'scope-case': [0],
},
plugins: [
{
rules: {
"commit-rule": ({ raw }) => {
return [
/^\[(build|feat|fix|update|refactor|docs|chore|style|revert|perf|remove|release)].+/g.test(raw),
`commit备注信息格式错误格式为 <[type] 修改内容>type支持${types.join(",")}`
]
}
}
}
]
}