Registry
K

import-add-js-extensions

No description available

kamilogorek78 executions

  • Legacy
  • migration
Connect a repo
npx codemod import-add-js-extensions

import-add-js-extensions

This codemod adds .js file extension to relative, top-level imports.

Before

js
import foo from "package-import";
import custom from "@/custom/path";
import { bar } from "./relative-import";
import type Baz from "../parent-import";
import { type Qoux } from "./nested/import";
import * as existing from "./already-existing.js";

After

js
import foo from "package-import";
import custom from "@/custom/path";
import { bar } from "./relative-import.js";
import type Baz from "../parent-import.js";
import { type Qoux } from "./nested/import.js";
import * as existing from "./already-existing.js";

Ready to evolve your codebase?

Build tailored, compiler-aware skills to assess, plan, and automate complex codebase changes.