-
-
Notifications
You must be signed in to change notification settings - Fork 104
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 warning on unsupported methods missing object name #395
Comments
Same here...someone at my team used the es2021's Moreover, i have just tried that May i ask what's your config @gabriele-cannizzaro ? Here's my browserlist and config |
Same with @diegocr in production. So sad. |
|
Sorry @ljharb, I might have misunderstood your comment, but what do you mean by " https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/repeat |
@gabriele-cannizzaro hmm, I'm gonna go out on a limb here and guess that by " |
@ljharb for clarity, let's pretend OP said:
'string'.repeat(5); // false negative
new String().repeat(5); // ! ESLint: String.repeat() is not supported in IE 11(compat/compat)
Now the issue at hand is clear. |
@HansBrende thank you for the rewrite, that makes it indeed much clearer. Re-reading my original post and the thread I was obviously confusing things :-) |
It looks like the plugin can't identify the unsupported use of a method call that doesn't include the class name:
In this case the first use of repeat() is not flagged as incompatible with IE, while the second one is. Is there a way to flag any use of incompatible methods on string literals?
EDIT: changed the above to reflect the much clearer rewrite by @HansBrende in the comment below. Original:
It looks like the plugin can't identify the unsupported use of a method call that doesn't include the object name:In this case the first use of repeat() is not flagged as incompatible with IE, while the second one is. Is there a way to flag any use of incompatible methods?The text was updated successfully, but these errors were encountered: