es-check
es-check copied to clipboard
Detect use of RegExp `\p` escape sequence
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
@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.
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
Thanks for the share @glenjamin