L

deno-replace-import-assertions

How to Use
Run this codemod on your codebase using one of the following commands

The easiest way to run this codemod without installing anything globally:

Documentation

This codemod helps migrate JavaScript/TypeScript files from using the deprecated
import assertions syntax to the updated import attributes syntax. The
change aligns with the updated proposal for import attributes and ensures
compatibility with newer versions of runtimes like Deno 2 and modern
browsers that have already removed support for import assertions.

This codemod turns import statements using assert into with for import
attributes.

Before

ts

After

ts

Ready to contribute?

Build your own codemod and share it with the community.