conventional-changelog/commitlint
View on GitHubUsing Periods With Start Case In Subject Fails
Open
#3294 opened on Aug 8, 2022
bughelp wanted
Description
Expected Behavior
When using the start-case option in the config for subject-case entering a message such as Feat: Add Module 1.0.0 or Fix: Remove Invalid Return Value In Core.js should pass.
Current Behavior
A problem is found in the current version not allowing for messages with periods to be added unless quoted such as Feat: Add Module "1.0.0" or Fix: Remove Invalid Return Value In "Core.js"
Affected packages
- cli
- core
Steps to Reproduce (for bugs)
- Set the
commitlint.config.jsas per the below snippet. - In a terminal enter
echo Feat: Add Module 1.0.0 | commitlint -V - Observe the following error output:
⧗ input: Feat: Add Module 1.0.0
✖ subject must be start-case [subject-case]
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'body-case': [2, 'always', 'sentence-case'],
'header-max-length': [2, 'always', 72],
'subject-case': [2, 'always', 'start-case'],
'subject-empty': [2, 'never'],
'subject-full-stop': [2, 'never', '.'],
'type-case': [2, 'always', 'start-case'],
'type-empty': [2, 'never'],
'type-enum': [
2,
'always',
[
'Feat',
'Fix'
],
],
},
};
Context
I'd like to be able to use start case subject messages and also be able to include semantic versioning without it failing.
Your Environment
| Executable | Version |
|---|---|
commitlint --version |
17.0.3 |
git --version |
2.25.1 |
node --version |
16.14.2 |