-
Notifications
You must be signed in to change notification settings - Fork 39
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
"mode": 'jsx-only' forbids any string literal inside interpolation blocks #109
Comments
My initial thought is that people might make mistakes easily like <>hello world</> // error
// vs
<>{"hello world"}</> // but this's fine? |
Ok, I get it. In your example, both should be errors, indeed. The difference, I guess, is that in my example the "wrongly" detected error is inside a callback (for As a side question, is it ok that I need to specify
then |
The default mode is
Actually the behavior of mode Since the existing mode |
Do you think that a new mode is really necessary? I mean, in my original example, do you think there are cases using |
I gave it a try @edvardchen ! 😁 Please let me know what you think #110 🙏 |
It will be a breaking change since we change the behavior of mode Your proposal would make function calls Instead, I prefer to check or not to check these dynamic part at all. We can make a new mode named |
I'm using
"eslint-plugin-i18next": "6.0.1"
.My use case: I want to forbid string literals in children and aria-labels. So, this is my config:
This works fine, except that it detects any string literal inside an interpolation block as an error. For example:
The text was updated successfully, but these errors were encountered: