-
Notifications
You must be signed in to change notification settings - Fork 934
Unable to commit when type-enum is overridden #2384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@johanvergeer @escapedcat this is not a bug, your configuration is incorrect, as enum values you must provide array, not array of arrays module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'type-enum': [
2,
'always',
[
- [
- 'feat', 'fix', 'docs', 'style', 'refactor', 'test', 'revert', 'content', // For articles, tutorials, etc...
- ],
+ 'feat', 'fix', 'docs', 'style', 'refactor', 'test', 'revert', 'content', // For articles, tutorials, etc...
],
],
},
};
|
Ugh, thanks @armano2 ! @johanvergeer can you check and close if this solves your issue? Thanks |
I feel like a real noob right now. Thanks @armano2 |
@johanvergeer welcome to my world :D |
@armano2 thanks for you answer, it helped me to understad how I can extend the commitlint rules |
I'm not able to do a commit when I override the
type-enum
rule incommitlint.config.js
.When I don't override the
type-enum
rule a commit is not blocked.Expected Behavior
The commit should be done.
Current Behavior
When I do a commit with using an approved type, I still get an error message:
Affected packages
Possible Solution
Steps to Reproduce (for bugs)
commitlint.config.js
```js module.exports = { extends: ['@commitlint/config-conventional'], rules: { 'type-enum': [ 2, 'always', [ [ 'feat', 'fix', 'docs', 'style', 'refactor', 'test', 'revert', 'content', // For articles, tutorials, etc... ], ], ], }, } ```Context
I would like to create a custom type for articles and tutorials on my blog.
Your Environment
commitlint --version
git --version
node --version
The text was updated successfully, but these errors were encountered: