Skip to content

Latest commit

 

History

History
23 lines (16 loc) · 457 Bytes

escape-case.md

File metadata and controls

23 lines (16 loc) · 457 Bytes

Require escape sequences to use uppercase values

Enforces defining escape sequence values with uppercase characters rather than lowercase ones. This promotes readability by making the escaped value more distinguishable from the identifier.

Fail

const foo = '\xa9';
const foo = '\ud834';
const foo = '\u{1d306}';
const foo = '\ca';

Pass

const foo = '\xA9';
const foo = '\uD834';
const foo = '\u{1D306}';
const foo = '\cA';