Disallow parseInt() in favor of binary, octal, and hexadecimal literals
ProprietaryReplaces parseInt() and Number.parseInt() called with a string literal and a literal radix of 2, 8, or 16 by the equivalent 0b, 0o, or 0x numeric literal. Calls are left unchanged when the resulting literal would not evaluate to the same number parseInt returns, or when the call contains comments. Replicates the autofix of the ESLint rule prefer-numeric-literals under its default options.
org. openrewrite. javascript. cleanup. PreferNumericLiteralsmod run . --recipe= org. openrewrite. javascript. cleanup. PreferNumericLiteralsInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.