Skip to content

Latest commit

 

History

History
24 lines (16 loc) · 844 Bytes

no-hex-escape.md

File metadata and controls

24 lines (16 loc) · 844 Bytes

Enforce the use of Unicode escapes instead of hexadecimal escapes

💼 This rule is enabled in the ✅ recommended config.

🔧 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.

Fail

const foo = '\x1B';
const foo = `\x1B${bar}`;

Pass

const foo = '\u001B';
const foo = `\u001B${bar}`;