Language support JavaScript / TypeScript

Refactor JavaScript and TypeScript semantically, across every repo.

The first type-attributed refactoring engine for JavaScript and TypeScript. Coordinate React, Angular, Next.js, and Node.js modernization alongside the Java backend on one LST.

Why JS / TS at Moderne

Type-attributed refactoring, not syntax matching.

JavaScript and TypeScript are first-class citizens in the Lossless Semantic Tree. Type information, symbols, and imports are resolved end-to-end before any recipe runs.

Type-attributed by default.

The LST resolves symbols, traces dependencies, and follows imports across files. Lookalike methods are distinguished by their actual types, not by name.

One platform above the codemod ecosystem.

jscodeshift, ts-morph, and ESLint codemods all operate on raw syntax within a single repo. Moderne runs above them and executes the curated codemod ecosystem through one platform.

Full-stack coordination.

JavaScript, TypeScript, and Java share one LST and one execution model. A single campaign can trace data flow from a React form through a Spring controller, or remediate a CVE that touches both npm and Maven dependencies.

What you can migrate

Concrete JS and TS migration paths.

Native LST recipes ship in five categories today, with a codemod compatibility layer for jscodeshift, ts-morph, and ESLint.

Runtime

Node.js version upgrades

Recipes handle deprecated APIs, import updates, and breaking changes at each step. The Node.js 20-to-24 migration replaces every deprecated util.isX() call with the correct native equivalent.

Frontend

React class → function components

Class-to-function migration plus hooks adoption shipped as curated codemods through the Moderne execution layer.

Frontend

Angular and Next.js upgrades

AngularJS to modern Angular, Angular version upgrades, Next.js framework upgrades, and App Router migrations.

Language

ES5 → ES6

Var to let / const, function expressions to arrows, template literals, destructuring, and module-system migrations.

Language

JavaScript → TypeScript

Migration paths from .js to .ts are part of the native recipe catalog. Type information lands as recipes run.

Dependencies

npm updates and CVE remediation

npm dependency updates and audits. A single campaign can remediate a CVE that spans both npm and Maven dependencies.

Quality

Cleanup and formatting

Native LST recipes for cleanup, formatting, and search are organized into the same catalog as the migration recipes.

Coordination

Frontend + backend in one campaign

Pair a backend API rename with frontend fetch updates. Trace control flow end-to-end from React through Spring through API response.

Our developers now spend less time worrying about legacy code and more time focusing on value-driven work.
Jason Simpson VP of Engineering, Choice Hotels Read the case study

How it works

Three steps, every language.

  1. Ingest the LST.

    Moderne parses every .js, .ts, .jsx, and .tsx file across every repo into a Lossless Semantic Tree. Types, symbols, imports, and formatting are preserved.

  2. Run the recipe.

    Recipes execute against the LST. Type-attributed transformations apply deterministically across every affected file, regardless of CommonJS or ES6 import style.

  3. Review and merge.

    Reviewable pull requests open across every repo touched. Your team merges. Moderne tracks coverage across the front-end and back-end portfolio together.

Questions

JavaScript and TypeScript, answered.

Type-attributed refactoring means the platform understands the actual types of every value, parameter, and return, not just the syntax of the code. Moderne represents JavaScript and TypeScript in a Lossless Semantic Tree that resolves symbols, traces dependencies, and follows imports across files.

jscodeshift, ts-morph, and ESLint codemods all operate on raw syntax trees within a single repository. Moderne runs above them: it provides type-attributed semantic understanding, executes the curated codemod ecosystem through one platform, and coordinates change across thousands of repositories with shared reporting and reviewable pull requests.

Yes. JavaScript and TypeScript are both first-class citizens in the OpenRewrite Lossless Semantic Tree, with type information preserved in both languages. Recipes work across .js, .ts, .jsx, and .tsx files, and migration paths from JavaScript to TypeScript are part of the native recipe catalog.

Yes. Moderne ships curated codemods covering React (hooks adoption, class-to-function migration), Angular (AngularJS to modern Angular, version upgrades), and Next.js (framework upgrades, App Router migrations).

Moderne automates Node.js version migrations as recipes that handle the deprecated APIs, import updates, and breaking changes at each step. The Node.js 20 to 24 migration, for example, replaces every deprecated util.isX() call with the correct native equivalent and updates imports consistently.

Yes. JavaScript, TypeScript, and Java share one Lossless Semantic Tree and one execution model in Moderne. That means a single campaign can trace data flow from a React form through a Spring controller, pair a backend API rename with frontend fetch updates, or remediate a CVE that touches both npm and Maven dependencies.

Yes. The Lossless Semantic Tree captures whitespace, comments, and existing formatting alongside syntax and types. When recipes apply changes, the surrounding code is preserved exactly as written, so reviewers see only the actual transformation, not a diff full of formatting noise.

Get started

Refactor JavaScript once. Run the same campaign next quarter.

Recipes lock in the upgrade. Future framework jumps and CVE patches run on the same engine, on the same review workflow.