Describe the bug
The no-redundant-story-name rule doesn't account for the whitespace that is automatically added by Storybook when it formats the story name for display, e.g. a story with the name H1 will be formatted for display as H 1, and adding H1.storyName = 'H1'; triggers this rule.
To Reproduce
Steps to reproduce the behavior:
Create a story with the name H1
Add H1.storyName = 'H1';
See that the rule is triggered
"Fix" the error so the rule is no longer triggered
Observe the displayed name is H 1 in the rendered Storybook
Expected behavior
I expect this rule to be aware of Storybook's formatting behavior, specifically when story names include a number.
Screenshots
I don't think any are needed, but happy to add some if my explanation is unclear.
Additional context
To me, this is an extremely low priority thing since I can easily ignore the rule on a couple lines in my Typography docs, but I wanted to mention it just in case.
Describe the bug The
no-redundant-story-name
rule doesn't account for the whitespace that is automatically added by Storybook when it formats the story name for display, e.g. a story with the nameH1
will be formatted for display asH 1
, and addingH1.storyName = 'H1';
triggers this rule.To Reproduce Steps to reproduce the behavior:
H1
H1.storyName = 'H1';
H 1
in the rendered StorybookExpected behavior I expect this rule to be aware of Storybook's formatting behavior, specifically when story names include a number.
Screenshots I don't think any are needed, but happy to add some if my explanation is unclear.
Additional context To me, this is an extremely low priority thing since I can easily ignore the rule on a couple lines in my Typography docs, but I wanted to mention it just in case.