no-hex-escape
March 27, 2026 ยท View on GitHub
๐ Enforce the use of Unicode escapes instead of hexadecimal escapes.
๐ผ This rule is enabled in the following configs: โ
recommended, โ๏ธ unopinionated.
๐ง This rule is automatically fixable by the --fix CLI option.
Enforces a convention of using Unicode escapes instead of hexadecimal escapes for consistency and clarity.
Examples
// โ
const foo = '\x1B';
// โ
const foo = '\u001B';
// โ
const foo = `\x1B${bar}`;
// โ
const foo = `\u001B${bar}`;