-
Notifications
You must be signed in to change notification settings - Fork 53
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
Add rule to check name property is a string literal #111
Comments
I also have #74 open, which I think is the same as this. So I closed it out. |
That repro should be self-explanatory. What's your take on this ? Should it be supported or should we create another ESLint rule to warn users who use this pattern that specifying a I personally do not see any obvious technical reason (performance or code convenience, maybe ?) which prevents us from supporting this, assuming any export ineluctably refers to an actual Story. @shilman sorry to ping you, just leaving this question here until you find some time, but really nothing urgent :) |
@Dschungelabenteuer If we support that export construct but it doesn't respect the |
Fair enough! I'll stick to the original issue for now and see what I can do, thanks! |
Just for the record, here is another scenario I think I did not mention earlier. |
Is your feature request related to a problem? Please describe.
When overriding a story name it must be a string literal. Not a variable and not a template literal.
https://discord.com/channels/486522875931656193/1054051640946208768/1055259413415481394
Describe the solution you'd like
Check for this and warn the user. Ideally provide fix.
Describe alternatives you've considered
Making CsfFile smarter. But since there will always be limitations to static analysis, we need some kind of linting regardless
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: