es-x/no-regexp-unicode-property-escapes-2023
disallow the new values of RegExp Unicode property escape sequences in ES2023
- ✅ The following configurations enable this rule: no-new-in-es2023, restrict-to-es3, restrict-to-es5, restrict-to-es2015, restrict-to-es2016, restrict-to-es2017, restrict-to-es2018, restrict-to-es2019, restrict-to-es2020, restrict-to-es2021, and restrict-to-es2022
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:
🚀 Version
This rule was introduced in v6.1.0.