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
react/jsx-no-literals: Add config to allow a set of strings #2377
Comments
Is there a reason you can't do: |
That will cause the I made a codepen to maybe illustrate the problem more clearly: https://codepen.io/bhollander/pen/zgmGyj renders as |
ah right, then |
That would still fail the eslint rule in question. 😅 |
Gotcha. In that case, allowing an array of strings to ignore seems reasonable. |
I propose adding a config option to allow a specified list of strings to pass the
react/jsx-no-literals
rule. I'm finding myself writing code similar to the below pretty often.Semi-contrived examples
It could be convenient (at least in my use-case, which doesn't seem like it would be all that uncommon) to pass in a config like
The text was updated successfully, but these errors were encountered: