|
| 1 | +module.exports = { |
| 2 | + parserPreset: { |
| 3 | + parserOpts: { headerPattern: /^(.*)(?:\((.*)\))?!?: (.*)$/ }, |
| 4 | + }, |
| 5 | + rules: { |
| 6 | + "body-leading-blank": [1, "always"], |
| 7 | + "body-max-line-length": [2, "always", 100], |
| 8 | + "footer-leading-blank": [1, "always"], |
| 9 | + "footer-max-line-length": [2, "always", 100], |
| 10 | + "header-max-length": [2, "always", 100], |
| 11 | + "subject-case": [ |
| 12 | + 2, |
| 13 | + "never", |
| 14 | + ["sentence-case", "start-case", "pascal-case", "upper-case"], |
| 15 | + ], |
| 16 | + "subject-empty": [2, "never"], |
| 17 | + "subject-full-stop": [2, "never", "."], |
| 18 | + "type-case": [2, "always", "lower-case"], |
| 19 | + "type-empty": [2, "never"], |
| 20 | + "type-enum": [ |
| 21 | + 2, |
| 22 | + "always", |
| 23 | + [ |
| 24 | + "✨feat", |
| 25 | + "🐛fix", |
| 26 | + "📚docs", |
| 27 | + "💎style", |
| 28 | + "📦refactor", |
| 29 | + "🚀perf", |
| 30 | + "🚨test", |
| 31 | + "🛠build", |
| 32 | + "⚙️ci", |
| 33 | + "🗑revert", |
| 34 | + ], |
| 35 | + ], |
| 36 | + }, |
| 37 | + |
| 38 | + prompt: { |
| 39 | + questions: { |
| 40 | + type: { |
| 41 | + description: "选择当前 commit 的类型", |
| 42 | + enum: { |
| 43 | + "✨feat": { |
| 44 | + description: "新功能", |
| 45 | + title: "✨Features", |
| 46 | + emoji: "✨", |
| 47 | + }, |
| 48 | + "🐛fix": { |
| 49 | + description: "修复bug", |
| 50 | + title: "🐛Bug Fixes", |
| 51 | + emoji: "🐛", |
| 52 | + }, |
| 53 | + "📚docs": { |
| 54 | + description: "文档更新", |
| 55 | + title: "📚Documentation", |
| 56 | + emoji: "📚", |
| 57 | + }, |
| 58 | + "💎style": { |
| 59 | + description: "代码风格的更改(空格,逗号,缺少分号等)", |
| 60 | + title: "💎Styles", |
| 61 | + emoji: "💎", |
| 62 | + }, |
| 63 | + "📦refactor": { |
| 64 | + description: "代码重构(即不修复bug也不增加新功能)", |
| 65 | + title: "📦Code Refactoring", |
| 66 | + emoji: "📦", |
| 67 | + }, |
| 68 | + "🚀perf": { |
| 69 | + description: "性能提升", |
| 70 | + title: "🚀Performance Improvements", |
| 71 | + emoji: "🚀", |
| 72 | + }, |
| 73 | + "🚨test": { |
| 74 | + description: "添加测试文件或者更改测试文件", |
| 75 | + title: "🚨Tests", |
| 76 | + emoji: "🚨", |
| 77 | + }, |
| 78 | + "🛠build": { |
| 79 | + description: |
| 80 | + "构建系统的更改或新的依赖更新,如webpack、gulp更改或者npm", |
| 81 | + title: "🛠Builds", |
| 82 | + emoji: "🛠", |
| 83 | + }, |
| 84 | + "⚙️ci": { |
| 85 | + description: "ci配置的更改,如 travis、gitlab-ci", |
| 86 | + title: "⚙️Continuous Integrations", |
| 87 | + emoji: "⚙️", |
| 88 | + }, |
| 89 | + "🗑revert": { |
| 90 | + description: "恢复以前的提交(如git revert)", |
| 91 | + title: "🗑Reverts", |
| 92 | + emoji: "🗑", |
| 93 | + }, |
| 94 | + }, |
| 95 | + }, |
| 96 | + scope: { |
| 97 | + description: "变动访问,模块或者文件名(可skip)", |
| 98 | + }, |
| 99 | + subject: { |
| 100 | + description: "写一个简短的描述", |
| 101 | + }, |
| 102 | + body: { |
| 103 | + description: "提供更改的详细说明(可skip)", |
| 104 | + }, |
| 105 | + isBreaking: { |
| 106 | + description: "是否有破坏性更新", |
| 107 | + }, |
| 108 | + breakingBody: { |
| 109 | + description: "破坏性变更的详细描述", |
| 110 | + }, |
| 111 | + breaking: { |
| 112 | + description: "破坏性变更的详细描述简短描述", |
| 113 | + }, |
| 114 | + }, |
| 115 | + }, |
| 116 | +}; |
0 commit comments