Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 678 Bytes

no-hex-escape.md

File metadata and controls

21 lines (14 loc) · 678 Bytes

Enforce the use of Unicode escapes instead of hexadecimal escapes

This rule is part of the recommended config.

🔧 This rule is auto-fixable.

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}`;