Modernize octal escape sequences
Recipe ID
org.openrewrite.javascript.migrate.es6.modernize-octal-escape-sequencesArtifact@openrewrite/rewriteConvert old-style octal escape sequences (e.g., \0, \123) to modern hex escape sequences (e.g., \x00, \x53) or Unicode escape sequences (e.g., \u0000, \u0053).
Single recipeMSAL
Usage
This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.
mod run . --recipe org.openrewrite.javascript.migrate.es6.modernize-octal-escape-sequencesIf the recipe isn’t available locally, install it with:
mod config recipes npm install @openrewrite/rewriteOptions
| Name | Type | Description |
|---|---|---|
useUnicodeEscapes | | Use Unicode escape sequences (\uXXXX) instead of hex escape sequences (\xXX). Default is false.e.g. true |