Install @codemod/cli
globally:
$ npm install -g @codemod/cli
# or
$ yarn global add @codemod/cli
This package works out of the box with most code bases, because it comes bundled with @babel/preset-env
and @babel/preset-typescript
. If you need other presets or plugins for parsing your source code you can use a custom Babel config as well. Note that the codemod will not apply the transformations from these presets and plugins - they are only used for parsing. Therefor you keep your TypeScript types in your source code for example. Formatting will be kept the same as much as possible.