The "type-empty" rule does not work properly.
See original GitHub issueWhen using the type-empty
rule the separator :
is still required.
Expected Behavior
If the type is empty and the scope, there is no need to specify the :
separator.
echo 'Toto' | commitlint #true
echo ': Toto' | commitlint #false
Current Behavior
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'type-empty': [2, 'always'],
},
}
echo 'Toto' | commitlint #false
echo ': Toto' | commitlint #true
Affected packages
- cli
- core
- prompt
- config-angular
Possible Solution
A solution would be either to add a new rule (separator-empty) or to make the type-empty
rule remove the :
separator.
Your Environment
Executable | Version |
---|---|
commitlint --version |
@commitlint/cli@16.2.1 |
git --version |
git version 2.32.0 |
node --version |
v17.5.0 |
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
husky - Strange error when attempting to commit. [subject-empty]
There is a package called husky that defines a certain template for your commit messages. If the template is not fulfilled, one gets...
Read more >Commitlint: Write more organized code - LogRocket Blog
Make your life easier as a developer by using commitlint to format, standardize, and organize code and messages.
Read more >GNU make
Invoking make from makefiles. • Canned Recipes, Defining canned recipes. • Empty Recipes, Defining useful, do-nothing recipes. Recipe ...
Read more >Google JavaScript Style Guide
Like other programming style guides, the issues covered span not only aesthetic issues of formatting, but other types of conventions or coding standards...
Read more >Effective Dart: Usage - Dart programming language
DON'T explicitly initialize variables to null . Linter rule: avoid_init_to_null. If a variable has a non-nullable type, Dart reports a compile error if...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks! You think it would be good to mention it i.e. here?: https://commitlint.js.org/#/reference-community-projects
https://www.npmjs.com/package/commitlint-config-gitmoji