No warning on unsupported methods missing object name
See original GitHub issueIt looks like the plugin can’t identify the unsupported use of a method call that doesn’t include the class name:
'string'.repeat(5); // false negative
new String().repeat(5); // ! ESLint: String.repeat() is not supported in IE 11 (compat/compat)
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?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:6
- Comments:7
Top Results From Across the Web
Issues · amilajack/eslint-plugin-compat - GitHub
DataTransfer Constructor not detected for browsers like IE 10. #509 opened on Jan 30 by orosro ... No warning on unsupported methods missing...
Read more >KB5014754—Certificate-based authentication changes on ...
Before the May 10, 2022 security update, certificate-based authentication would not account for a dollar sign ($) at the end of a machine...
Read more >What is the list of valid @SuppressWarnings warning names ...
It depends on your IDE or compiler. Here is a list for Eclipse Galileo: all to suppress all warnings; boxing to suppress warnings...
Read more >NIM error and warning messages - IBM
Enter lsnim -O ObjectName for a list of valid operations that can be applied to the object. Message, 0042-027. Explanation, The specified object...
Read more >using-final-decorator-in-unsupported-version / W2602 - Pylint
using-final-decorator-in-unsupported-version / W2602#. Message emitted: typing.final is not supported by all versions included in the py-version setting.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@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 😃
Same here…someone at my team used the es2021’s
replaceAll()
method and there was no warning thrown from ESLint, the code ended up in production and disaster happened…Moreover, i have just tried that
String.repeat(5)
here and i am not even getting a warning, nothing, which is very odd…using latest public releases of every npm package at time of writing. 🤔May i ask what’s your config @gabriele-cannizzaro ? Here’s my browserlist and config