Skip to content

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

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

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

For example, the following patterns are valid in ES2019, but syntax error in ES2018 environments:

  • \p{Extended_Pictographic}
  • \p{Script=Dogr}
  • \p{Script=Dogra}
  • \p{Script=Gong}
  • \p{Script=Gunjala_Gondi}
  • \p{Script=Hanifi_Rohingya}
  • \p{Script=Maka}
  • \p{Script=Makasar}
  • \p{Script=Medefaidrin}
  • \p{Script=Medf}
  • \p{Script=Old_Sogdian}
  • \p{Script=Rohg}
  • \p{Script=Sogd}
  • \p{Script=Sogdian}
  • \p{Script=Sogo}

💡 Examples

⛔ Examples of incorrect code for this rule:

Now loading...

🚀 Version

This rule was introduced in eslint-plugin-es v2.0.0.

📚 References