Skip to content

es-x/no-regexp-unicode-property-escapes-2023

disallow the new values of RegExp Unicode property escape sequences in ES2023

This rule reports the new values of ES2018 RegExp Unicode property escape sequences which were added in ES2023.

For example, the following patterns are valid in ES2023, but syntax error in ES2022 environments:

  • \p{Script=Kawi}
  • \p{Script=Nag_Mundari}
  • \p{Script=Nagm}

💡 Examples

⛔ Examples of incorrect code for this rule:

Now loading...

🚀 Version

This rule was introduced in v6.1.0.

📚 References