Skip to content

Latest commit

 

History

History
24 lines (17 loc) · 808 Bytes

no-hex-escape.md

File metadata and controls

24 lines (17 loc) · 808 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}`;