Skip to content
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

Detect use of "sticky" RegExp flag #275

Open
anandthakker opened this issue Nov 18, 2019 · 1 comment
Open

Detect use of "sticky" RegExp flag #275

anandthakker opened this issue Nov 18, 2019 · 1 comment

Comments

@anandthakker
Copy link

anandthakker commented Nov 18, 2019

IE 11 does not support the "sticky" flag for regular expressions, but eslint-plugin-compat does not seem to detect its use either as /.../y or RegExp('...', 'y')

This would be an especially helpful one to catch, since AFAIK there isn't a readily available polyfill for it. In particular, core-js, which is what Babel uses for polyfills, doesn't support it: zloirock/core-js#372.

Looks like ast-metadata-inferer specifically excludes RegExp entries: https://github.com/amilajack/ast-metadata-inferer/blob/aa3032e68afd950aecfd35590fe6d8618115df01/src/providers/index.js#L28

@brettz9
Copy link
Contributor

brettz9 commented Apr 1, 2020

I think this should be closed in favor of the more generic #206 (letting that apply to all ES features).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants