commitlint.config.js 4.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. // 文档参考:https://cz-git.qbb.sh/zh/config/
  2. // cz.config.js kk
  3. /** @type {import('cz-git').CommitizenGitOptions} */
  4. module.exports = {
  5. ignores: [commit => commit.includes("init")],
  6. extends: ["@commitlint/config-conventional"],
  7. // alias: { fd: 'docs: fix typos' },
  8. // messages: {
  9. // type: 'Select the type of change that you\'re committing:',
  10. // scope: 'Denote the SCOPE of this change (optional):',
  11. // customScope: 'Denote the SCOPE of this chang e:',
  12. // subject: 'Write a SHORT, IMPERATIVE tense description of the change:\n',
  13. // body: 'Provide a LONGER description of the change (optional). Use "|" to break new line:\n',
  14. // breaking: 'List any BREAKING CHANGES (optional). Use "|" to break new line:\n',
  15. // footerPrefixsSelect: 'Select the ISSUES type of changeList by this change (optional):',
  16. // customFooterPrefixs: 'Input ISSUES prefix:',
  17. // footer: 'List any ISSUES by this change. E.g.: #31, #34:\n',
  18. // confirmCommit: 'Are you sure you want to proceed with the commit above?'
  19. // },
  20. prompt: {
  21. // 中英文对照版
  22. messages: {
  23. type: '选择你要提交的类型 :',
  24. scope: '选择一个提交范围(可选):',
  25. customScope: '请输入自定义的提交范围 :',
  26. subject: '填写简短精炼的变更描述 :\n',
  27. body: '填写更加详细的变更描述(可选)。使用 "|" 换行 :\n',
  28. breaking: '列举非兼容性重大的变更(可选)。使用 "|" 换行 :\n',
  29. footerPrefixesSelect: '选择关联issue前缀(可选):',
  30. customFooterPrefix: '输入自定义issue前缀 :',
  31. footer: '列举关联issue (可选) 例如: #31, #I3244 :\n',
  32. confirmCommit: '是否提交或修改commit ?'
  33. },
  34. types: [
  35. { value: '特性', name: '特性: 新增功能' },
  36. { value: '修复', name: '修复: 修复缺陷' },
  37. { value: '文档', name: '文档: 文档变更' },
  38. { value: '格式', name: '格式: 代码格式(不影响功能,例如空格、分号等格式修正)' },
  39. { value: '重构', name: '重构: 代码重构(不包括 bug 修复、功能新增)' },
  40. { value: '性能', name: '性能: 性能优化' },
  41. { value: '测试', name: '测试: 添加疏漏测试或已有测试改动' },
  42. { value: '构建', name: '构建: 构建流程、外部依赖变更(如升级 npm 包、修改 webpack 配置等)' },
  43. { value: '集成', name: '集成: 修改 CI 配置、脚本' },
  44. { value: '回退', name: '回退: 回滚 commit' },
  45. { value: '其他', name: '其他: 对构建过程或辅助工具和库的更改(不影响源文件、测试用例)' },
  46. ],
  47. // emptyScopesAlias: 'empty: 不填写',
  48. // customScopesAlias: 'custom: 自定义',
  49. useEmoji: true,
  50. // emojiAlign: 'center',
  51. themeColorCode: '',
  52. scopes: [],
  53. allowCustomScopes: true,
  54. allowEmptyScopes: true,
  55. customScopesAlign: 'bottom',
  56. customScopesAlias: 'custom',
  57. emptyScopesAlias: 'empty',
  58. upperCaseSubject: false,
  59. markBreakingChangeMode: false,
  60. allowBreakingChanges: ['feat', 'fix'],
  61. breaklineNumber: 100,
  62. breaklineChar: '|',
  63. skipQuestions: [],
  64. issuePrefixs: [{ value: 'closed', name: 'closed: ISSUES has been processed' }],
  65. customIssuePrefixsAlign: 'top',
  66. emptyIssuePrefixsAlias: 'skip',
  67. customIssuePrefixsAlias: 'custom',
  68. allowCustomIssuePrefixs: true,
  69. allowEmptyIssuePrefixs: true,
  70. confirmColorize: true,
  71. maxHeaderLength: Infinity,
  72. maxSubjectLength: Infinity,
  73. minSubjectLength: 0,
  74. scopeOverrides: undefined,
  75. defaultBody: '',
  76. defaultIssues: '',
  77. defaultScope: '',
  78. defaultSubject: ''
  79. }
  80. }