-
Notifications
You must be signed in to change notification settings - Fork 931
Addition of story as commit type #808
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
I think this is also relevant for you. I haven't got around to update commitlint to the latest conventional commits specification, but basically in a later (probably major) version the default conventional config should be updated without strict type enums. This is because the original spec doesn't "forbid" to use any type other than I know this doesn't help you right now, but I hope this gives you some info for the near future 😄 |
Thanks for the response! Sounds good |
My pleasure! 😄 If you want a fix now, I'd recommend adding your own set of enums to your project. You can still "extend" from the configuration but only overwrite the type enums 😄 Here is a config for that: module.exports = {
extends: '@commitlint/config-conventional',
rules: {
'type-enum': [2, 'always', [
'build',
'chore',
'ci',
'docs',
'feat',
'fix',
'perf',
'refactor',
'revert',
'style',
'test',
'story',
]],
},
}; or a more complex approach, without the need of defining everything again: const config = require('@commitlint/config-conventional');
const types = config.rules['type-enum'][2];
config.rules['type-enum'][2] = ['story'].concat(types);
module.exports = config; |
That is super helpful! Thank you so much! |
Closing this |
conventional-changelog provides an enum of available commit type values. With the prevalence of storybook in projects, this ticket is advocating for another type to be added to the enum for
story
to represent commits that contain the addition of storybook stories being added to the repo.Affected packages
Context
With the addition of storybook to many repos I am working on, I would like to continue to be able to use commitlint and conventional-changelog to enforce good commit hygiene. The addition of a
story
type, I feel more accurately reflects commits to my repo where I am adding stories.Your Environment
commitlint --version
git --version
node --version
The text was updated successfully, but these errors were encountered: