commitlint.config.js 802 B

1234567891011121314151617181920212223242526
  1. module.exports = {
  2. // 继承的规则
  3. extends: ['@commitlint/config-conventional'],
  4. // 定义规则类型
  5. rules: {
  6. // type 类型定义,表示 git 提交的 type 必须在以下类型范围内
  7. 'type-enum': [
  8. 2,
  9. 'always',
  10. [
  11. 'feat', // 新功能 feature
  12. 'fix', // 修复 bug
  13. 'docs', // 文档注释
  14. 'style', // 代码格式(不影响代码运行的变动)
  15. 'refactor', // 重构(既不增加新功能,也不是修复bug)
  16. 'perf', // 性能优化
  17. 'test', // 增加测试
  18. 'chore', // 构建过程或辅助工具的变动
  19. 'revert', // 回退
  20. 'build' // 打包
  21. ]
  22. ],
  23. // subject 大小写不做校验
  24. 'subject-case': [0]
  25. }
  26. }