← All recipes
Moderne licensed

Modernize octal literals

Recipe IDorg.openrewrite.javascript.migrate.es6.modernize-octal-literalsArtifact@openrewrite/rewrite

Convert old-style octal literals (e.g., 0777) to modern ES6 syntax (e.g., 0o777).

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-literals

If the recipe isn’t available locally, install it with:

mod config recipes npm install @openrewrite/rewrite