Skip to content

Latest commit

 

History

History
28 lines (20 loc) · 846 Bytes

escape-case.md

File metadata and controls

28 lines (20 loc) · 846 Bytes

Require escape sequences to use uppercase values

💼 This rule is enabled in the ✅ recommended config.

🔧 This rule is automatically fixable by the --fix CLI option.

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';