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
no-redundant-story-name
case insensitivity
#94
Comments
Hey @benedfit thanks for opening this issue! I am not sure how valid this request is, given that there is a difference between the scenarios which you described:
They will yield different results in the sidebar. People might actually want to specify names to be lower case, whilst the story name is upper case. |
@yannbf I agree that there would be scenarios where folks want to specify lower case, so that's why it would be great for it to be an optional settings, and for it to work as it currently does by default |
Is your feature request related to a problem? Please describe.
Warn/error when
storyName
is a case-insensitive variant of the name generated by the export name:e.g.
WithText.storyName = 'With Text';
will currently warn/error butWithText.storyName = 'with text';
will notDescribe the solution you'd like
The ability to configure the
no-redundant-story-name
rule to use/ignore case when determining in the name is redundantDescribe alternatives you've considered
Would also be open to this being the default behaviour if that's easier.
Additional context
I am working on a codebase where we used the storybook provided codemon to migrate our old
storiesOf
stories toCSF
. Due to most of our old story names being all in lower-case, we now have a lot of instances wherePascalCase.storyName = 'lower case'
. Engineers are then copying this format and spreading the issue. So while I can fix the existing set, I'd like a way to catch any future instancesThe text was updated successfully, but these errors were encountered: