Skip to content


🔧 This rule is automatically fixable by the --fix CLI option.

enforce consistent usage of hexadecimal escape

📖 Rule Details

Characters that can use hexadecimal escape can use both hexadecimal escape and unicode escape.

This rule aims to enforce the consistent use of hexadecimal escapes.

Now loading...

🔧 Options

  "regexp/hexadecimal-escape": [
    "always", // or "never"
  • "always" ... Unicode escape characters that can use hexadecimal escape must always use hexadecimal escape. This is default.
  • "never" ... Disallows the use of hexadecimal escapes on all characters.


Now loading...

🚀 Version

This rule was introduced in eslint-plugin-regexp v0.9.0

🔍 Implementation