|
| 1 | +module.exports = { |
| 2 | + parserPreset: 'conventional-changelog-conventionalcommits', |
| 3 | + rules: { |
| 4 | + 'body-leading-blank': [1, 'always'], |
| 5 | + 'body-max-line-length': [2, 'always', 100], |
| 6 | + 'footer-leading-blank': [1, 'always'], |
| 7 | + 'footer-max-line-length': [2, 'always', 100], |
| 8 | + 'header-max-length': [2, 'always', 100], |
| 9 | + 'subject-case': [ |
| 10 | + 2, |
| 11 | + 'never', |
| 12 | + ['start-case', 'pascal-case', 'upper-case'], |
| 13 | + ], |
| 14 | + 'subject-empty': [2, 'never'], |
| 15 | + 'subject-full-stop': [2, 'never', '.'], |
| 16 | + 'type-case': [2, 'always', 'lower-case'], |
| 17 | + 'type-empty': [2, 'never'], |
| 18 | + 'type-enum': [ |
| 19 | + 2, |
| 20 | + 'always', |
| 21 | + [ |
| 22 | + 'build', |
| 23 | + 'chore', |
| 24 | + 'ci', |
| 25 | + 'docs', |
| 26 | + 'feat', |
| 27 | + 'fix', |
| 28 | + 'perf', |
| 29 | + 'refactor', |
| 30 | + 'revert', |
| 31 | + 'style', |
| 32 | + 'test', |
| 33 | + 'tests', |
| 34 | + ], |
| 35 | + ], |
| 36 | + }, |
| 37 | + prompt: { |
| 38 | + questions: { |
| 39 | + type: { |
| 40 | + description: "Select the type of change that you're committing", |
| 41 | + enum: { |
| 42 | + feat: { |
| 43 | + description: 'A new feature', |
| 44 | + title: 'Features', |
| 45 | + emoji: '✨', |
| 46 | + }, |
| 47 | + fix: { |
| 48 | + description: 'A bug fix', |
| 49 | + title: 'Bug Fixes', |
| 50 | + emoji: '🐛', |
| 51 | + }, |
| 52 | + docs: { |
| 53 | + description: 'Documentation only changes', |
| 54 | + title: 'Documentation', |
| 55 | + emoji: '📚', |
| 56 | + }, |
| 57 | + style: { |
| 58 | + description: |
| 59 | + 'Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)', |
| 60 | + title: 'Styles', |
| 61 | + emoji: '💎', |
| 62 | + }, |
| 63 | + refactor: { |
| 64 | + description: |
| 65 | + 'A code change that neither fixes a bug nor adds a feature', |
| 66 | + title: 'Code Refactoring', |
| 67 | + emoji: '📦', |
| 68 | + }, |
| 69 | + perf: { |
| 70 | + description: 'A code change that improves performance', |
| 71 | + title: 'Performance Improvements', |
| 72 | + emoji: '🚀', |
| 73 | + }, |
| 74 | + test: { |
| 75 | + description: 'Adding missing tests or correcting existing tests', |
| 76 | + title: 'Tests', |
| 77 | + emoji: '🚨', |
| 78 | + }, |
| 79 | + tests: { |
| 80 | + description: 'Adding missing tests or correcting existing tests', |
| 81 | + title: 'Tests', |
| 82 | + emoji: '🚨', |
| 83 | + }, |
| 84 | + build: { |
| 85 | + description: |
| 86 | + 'Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)', |
| 87 | + title: 'Builds', |
| 88 | + emoji: '🛠', |
| 89 | + }, |
| 90 | + ci: { |
| 91 | + description: |
| 92 | + 'Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)', |
| 93 | + title: 'Continuous Integrations', |
| 94 | + emoji: '⚙️', |
| 95 | + }, |
| 96 | + chore: { |
| 97 | + description: "Other changes that don't modify src or test files", |
| 98 | + title: 'Chores', |
| 99 | + emoji: '♻️', |
| 100 | + }, |
| 101 | + revert: { |
| 102 | + description: 'Reverts a previous commit', |
| 103 | + title: 'Reverts', |
| 104 | + emoji: '🗑', |
| 105 | + }, |
| 106 | + }, |
| 107 | + }, |
| 108 | + scope: { |
| 109 | + description: |
| 110 | + 'What is the scope of this change (e.g. component or file name)', |
| 111 | + }, |
| 112 | + subject: { |
| 113 | + description: |
| 114 | + 'Write a short, imperative tense description of the change', |
| 115 | + }, |
| 116 | + body: { |
| 117 | + description: 'Provide a longer description of the change', |
| 118 | + }, |
| 119 | + isBreaking: { |
| 120 | + description: 'Are there any breaking changes?', |
| 121 | + }, |
| 122 | + breakingBody: { |
| 123 | + description: |
| 124 | + 'A BREAKING CHANGE commit requires a body. Please enter a longer description of the commit itself', |
| 125 | + }, |
| 126 | + breaking: { |
| 127 | + description: 'Describe the breaking changes', |
| 128 | + }, |
| 129 | + isIssueAffected: { |
| 130 | + description: 'Does this change affect any open issues?', |
| 131 | + }, |
| 132 | + issuesBody: { |
| 133 | + description: |
| 134 | + 'If issues are closed, the commit requires a body. Please enter a longer description of the commit itself', |
| 135 | + }, |
| 136 | + issues: { |
| 137 | + description: 'Add issue references (e.g. "fix #123", "re #123".)', |
| 138 | + }, |
| 139 | + }, |
| 140 | + }, |
| 141 | +}; |
0 commit comments