-
Notifications
You must be signed in to change notification settings - Fork 51
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
Enforce usage of "composeStories" #143
Comments
Hey @donaldpipowitch that's an interesting idea! It does feel a little weird though because the eslint rules for this plugin only apply to storybook-specific files e.g. Maybe the plugin could have a rule that is not applied to any file, and users would have to manually apply such rule in an overrides field, like: {
overrides: [
{
files: ['*.test.@(ts|tsx|js|jsx|mjs|cjs)', '*.spec.@(ts|tsx|js|jsx|mjs|cjs)'],
rules: {
'storybook/use-compose-stories': 'warn'
},
},
]
} |
That sounds great! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
I always find it annoying that when my Storybook examples grow in complexity (e.g. decorators get added) I have to go back to test files and manually add
composeStories
. It would be way nicer if everyone in the project would start to write tests withcomposeStories
from the beginning.Describe the solution you'd like
It should not be possible to do something like this:
Only this should be allowed:
Describe alternatives you've considered
...
Additional context
...
The text was updated successfully, but these errors were encountered: