commitlint.config.js 957 B

1234567891011121314151617181920212223242526272829303132
  1. module.exports = {
  2. ignores: [(commit) => commit.includes('init')],
  3. extends: ['@commitlint/config-conventional'],
  4. rules: {
  5. 'body-leading-blank': [2, 'always'],
  6. 'footer-leading-blank': [1, 'always'],
  7. 'header-max-length': [2, 'always', 108],
  8. 'subject-empty': [2, 'never'],
  9. 'type-empty': [2, 'never'],
  10. 'subject-case': [0],
  11. 'type-enum': [
  12. 2,
  13. 'always',
  14. [
  15. 'feat', //增加新功能
  16. 'fix', //修复问题/BUG
  17. 'style', //代码风格相关无影响运行结果的
  18. 'perf', //优化/性能提升
  19. 'refactor', //重构
  20. 'revert', //撤销修改
  21. 'test', //测试相关
  22. 'docs', //文档/注释
  23. 'chore', //依赖更新/脚手架配置修改等
  24. 'workflow', //工作流改进
  25. 'ci', //持续集成
  26. 'types', //类型定义文件更改
  27. 'wip', //开发中
  28. 'build', //修改项目构建系统
  29. ],
  30. ],
  31. },
  32. };