commitlint.config.cjs 671 B

12345678910111213141516171819202122232425
  1. module.exports = {
  2. extends: ['@commitlint/config-conventional'],
  3. rules: {
  4. // type 类型定义
  5. 'type-enum': [
  6. 2,
  7. 'always',
  8. [
  9. 'feat', // 新功能
  10. 'fix', // 修复 bug
  11. 'docs', // 文档变更
  12. 'style', // 代码格式(不影响功能)
  13. 'refactor', // 重构(既不是新功能也不是修复 bug)
  14. 'perf', // 性能优化
  15. 'test', // 添加测试
  16. 'build', // 构建系统或外部依赖项的更改
  17. 'ci', // CI 配置更改
  18. 'chore', // 其他杂项
  19. 'revert' // 回滚
  20. ]
  21. ],
  22. // subject 大小写不做校验
  23. 'subject-case': [0]
  24. }
  25. }