|
1 |
| -export function testAdd(digit: number, second: number): number { |
2 |
| - return digit + second |
| 1 | +import type { UserConfig } from '@commitlint/types' |
| 2 | +import { RuleConfigSeverity } from '@commitlint/types' |
| 3 | + |
| 4 | +export const Configuration: UserConfig = { |
| 5 | + parserPreset: 'conventional-changelog-conventionalcommits', |
| 6 | + rules: { |
| 7 | + 'body-leading-blank': [RuleConfigSeverity.Warning, 'always'], |
| 8 | + 'body-max-line-length': [RuleConfigSeverity.Error, 'always', 100], |
| 9 | + 'footer-leading-blank': [RuleConfigSeverity.Warning, 'always'], |
| 10 | + 'footer-max-line-length': [RuleConfigSeverity.Error, 'always', 100], |
| 11 | + 'header-max-length': [RuleConfigSeverity.Error, 'always', 100], |
| 12 | + 'subject-case': [ |
| 13 | + RuleConfigSeverity.Error, |
| 14 | + 'never', |
| 15 | + ['sentence-case', 'start-case', 'pascal-case', 'upper-case'], |
| 16 | + ], |
| 17 | + 'subject-empty': [RuleConfigSeverity.Error, 'never'], |
| 18 | + 'subject-full-stop': [RuleConfigSeverity.Error, 'never', '.'], |
| 19 | + 'type-case': [RuleConfigSeverity.Error, 'always', 'lower-case'], |
| 20 | + 'type-empty': [RuleConfigSeverity.Error, 'never'], |
| 21 | + 'type-enum': [ |
| 22 | + RuleConfigSeverity.Error, |
| 23 | + 'always', |
| 24 | + [ |
| 25 | + 'build', |
| 26 | + 'chore', |
| 27 | + 'ci', |
| 28 | + 'docs', |
| 29 | + 'examples', |
| 30 | + 'feat', |
| 31 | + 'fix', |
| 32 | + 'perf', |
| 33 | + 'refactor', |
| 34 | + 'revert', |
| 35 | + 'style', |
| 36 | + 'test', |
| 37 | + 'types', |
| 38 | + 'wip', |
| 39 | + ], |
| 40 | + ], |
| 41 | + }, |
| 42 | + prompt: { |
| 43 | + questions: { |
| 44 | + type: { |
| 45 | + description: "Select the type of change that you're committing", |
| 46 | + enum: { |
| 47 | + feat: { |
| 48 | + description: 'A new feature or enhancement', |
| 49 | + title: 'Enhancements', |
| 50 | + emoji: '🚀', |
| 51 | + }, |
| 52 | + fix: { |
| 53 | + description: 'A bug fix', |
| 54 | + title: 'Fixes', |
| 55 | + emoji: '🩹', |
| 56 | + }, |
| 57 | + docs: { |
| 58 | + description: 'Documentation only changes', |
| 59 | + title: 'Documentation', |
| 60 | + emoji: '📖', |
| 61 | + }, |
| 62 | + style: { |
| 63 | + description: |
| 64 | + 'Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)', |
| 65 | + title: 'Styles', |
| 66 | + emoji: '🎨', |
| 67 | + }, |
| 68 | + refactor: { |
| 69 | + description: |
| 70 | + 'A code change that neither fixes a bug nor adds a feature', |
| 71 | + title: 'Code Refactoring', |
| 72 | + emoji: '💅', |
| 73 | + }, |
| 74 | + perf: { |
| 75 | + description: 'A code change that improves performance', |
| 76 | + title: 'Performance Improvements', |
| 77 | + emoji: '🔥', |
| 78 | + }, |
| 79 | + test: { |
| 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 | + types: { |
| 107 | + description: 'Changes to typescript types', |
| 108 | + title: 'Types', |
| 109 | + emoji: '🌊', |
| 110 | + }, |
| 111 | + examples: { |
| 112 | + description: 'Work on examples or demos', |
| 113 | + title: 'Examples', |
| 114 | + emoji: '🏀', |
| 115 | + }, |
| 116 | + wip: { |
| 117 | + description: 'WIP commits that should not be in the changelog', |
| 118 | + title: 'WIP Commits', |
| 119 | + emoji: '⛔️', |
| 120 | + }, |
| 121 | + }, |
| 122 | + }, |
| 123 | + scope: { |
| 124 | + description: |
| 125 | + 'What is the scope of this change (e.g. component or file name)', |
| 126 | + }, |
| 127 | + subject: { |
| 128 | + description: |
| 129 | + 'Write a short, imperative tense description of the change', |
| 130 | + }, |
| 131 | + body: { |
| 132 | + description: 'Provide a longer description of the change', |
| 133 | + }, |
| 134 | + isBreaking: { |
| 135 | + description: 'Are there any breaking changes?', |
| 136 | + }, |
| 137 | + breakingBody: { |
| 138 | + description: |
| 139 | + 'A BREAKING CHANGE commit requires a body. Please enter a longer description of the commit itself', |
| 140 | + }, |
| 141 | + breaking: { |
| 142 | + description: 'Describe the breaking changes', |
| 143 | + }, |
| 144 | + isIssueAffected: { |
| 145 | + description: 'Does this change affect any open issues?', |
| 146 | + }, |
| 147 | + issuesBody: { |
| 148 | + description: |
| 149 | + 'If issues are closed, the commit requires a body. Please enter a longer description of the commit itself', |
| 150 | + }, |
| 151 | + issues: { |
| 152 | + description: 'Add issue references (e.g. "fix #123", "re #123".)', |
| 153 | + }, |
| 154 | + }, |
| 155 | + }, |
3 | 156 | }
|
| 157 | + |
| 158 | +module.exports = Configuration |
0 commit comments