@codemod/unicorn-escape-uppercase-sequences
Uppercases lowercase hex digits inside JavaScript and TypeScript escape sequences in string literals and template literal static segments.
It rewrites \\x, \\u, and \\u{} escapes such as "\\x1f" to "\\x1F" and `\\u{dead}` to `\\u{DEAD}` without changing runtime semantics.
What It Changes
- String literals in
*.js,*.jsx,*.cjs,*.mjs,*.ts, and*.tsx - Template literal static segments
- Directive literals such as
"use strict"when they contain matching escapes
What It Leaves Alone
- Regex literals such as
/\\x1f/ - Numeric-only payloads such as
"\\x12" - Already-uppercase escapes
- Tagged template raw text by default
Use the include-tagged-templates=true workflow param if you want tagged template static text normalized too.
Example
js
becomes:
js
Installation
bash
Usage
bash
Development
bash
License
MIT