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
no-array-index-key can be bypassed with toString #2140
Comments
There’s a lot of ways to bypass it; it’s not really practical to try to catch them all. The rule is meant as a helpful warning not to rely on indexes in a key, when your items have a unique signature. |
Ok, got it. Should I close this issue? |
I’m not sure. We can certainly detect this specific pattern, but I’m not sure how valuable it’d be, especially considering that |
Personally, as a naive Reacter, have used |
@kognise in all javascript, everywhere, including all "native" React (RN or React Web), |
You can bypass the
no-array-index-key
rule withtoString()
.In other words, this gives an error:
But this doesn't:
The text was updated successfully, but these errors were encountered: