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 RegExp \p escape sequence #192

Open
glenjamin opened this issue Feb 22, 2024 · 3 comments
Open

Detect use of RegExp \p escape sequence #192

glenjamin opened this issue Feb 22, 2024 · 3 comments

Comments

@glenjamin
Copy link

Requested Update

Detect and warn about use of the \p Regexp escape sequence in unsupported environments

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Regular_expressions/Unicode_character_class_escape

Why Is This Update Needed?

We recently managed to ship broken code after switching from babel to swc because the \p regex escape sequence was being used, and unlike babel swc doesn't translate them - so es-check was unable to warn us that the code would be incompatible

Are There Examples Of This Requested Update Elsewhere?

n/a

@yowainwright
Copy link
Owner

@glenjamin can be done, I think! I think we could add this to an optional config file along with several of the other issues here. Do you have time to assist with this? I'm happy to pair back and forth if so. 🙌

Sorry for the slow response btw.

@glenjamin
Copy link
Author

Thanks for the response on this, I ended up switching to https://github.com/eslint-community/eslint-plugin-es-x, which is a bit slower but has more detailed coverage of language and library features

@yowainwright
Copy link
Owner

Thanks for the share @glenjamin

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