-
Notifications
You must be signed in to change notification settings - Fork 13
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
ES2016 method 'Array.prototype.includes' is forbidden _eslint(ecmascript-compat/compat)_ #47
Comments
Is this another instance of #30 ? |
Yes, I expect so - because chrome 100 is now probably in "last 5 versions" |
Interesting, now when I run
But, then I'm guessing this is what issue #30 is fixing:
I'll close this issue as I cannot reproduce the original issue specifically with Chrome, but I can definitely reproduce issue #30, and @lamansky's fix in #46 fixes the Safari cases for me, at least. |
Released https://github.com/robatwilliams/es-compat/releases/tag/v3.0.0 including fix for #30 FYI @dossy |
I'm using
plugin:ecmascript-compat/recommended
and mybrowserslist
is set tolast 5 Chrome versions
which absolutely supports ES2016 andArray.prototype.includes
, yet ecma-compat/compat says this is forbidden?In
mdn/browser-compat-data
, it lists Array.prototype.includes as being added in Chrome 47, which is certainly older than the last 5 Chrome versions.If I'm reading things correctly, this is actually being picked up by eslint's
no-restricted-syntax
rule, as configured byeslint-plugin-ecmascript-compat
'ses2016.js
.Am I misunderstanding what this eslint plugin is supposed to do? Or is this a bug somewhere, because
Array.prototype.inclues
is definitely available in modern Chrome.I'm silencing the error with
eslint-disable-next-line ecmascript-compat/compat
for now, but is less than ideal.The text was updated successfully, but these errors were encountered: