Skip to content

Latest commit

 

History

History
19 lines (12 loc) · 440 Bytes

no-hex-escape.md

File metadata and controls

19 lines (12 loc) · 440 Bytes

Enforce the use of unicode escapes instead of hexadecimal escapes

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