@jowtech/codemod

1.2.2 • Public • Published

@jowtech/codemod

NPM Version

Simple set of codemod transformations created by Jow's tech team.

Usage

npx @jowtech/codemod <transform> <path> [...options]
  • transform - name of transform, see available transforms below.
  • path - files or directory to transform (use quotes)
  • use the --dry option for a dry-run and use --print to print the output for comparison

This will start an interactive wizard, and then run the specified transform.

All jscodeshift's options are supported, and defaults are the same than the one of jscodeshift's CLI.

[!NOTE] jscodeshift's option defaults apply only to its CLI, its API has none, except the parser, which defaults to @babel/parser (see babel5Compat.js) All options are also passed to the transformer, which means you can supply custom options that are not listed here.

Included Transforms

Migrate to React 19

react.func-default-props-to-params

npx @jowtech/codemod react.func-default-props-to-params <path>

Converts functional components default props onto default parameters.

react.forward-ref-to-prop

npx @jowtech/codemod react.forward-ref-to-prop <path>

Converts forwardRef to regular ref prop.

Testing

yarn test:run
## or
yarn test:watch

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.2.21latest

Version History

VersionDownloads (Last 7 Days)Published
1.2.21
1.2.11
1.2.01
1.1.00
1.0.20
1.0.10

Package Sidebar

Install

npm i @jowtech/codemod

Weekly Downloads

3

Version

1.2.2

License

MIT

Unpacked Size

29.8 kB

Total Files

48

Last publish

Collaborators

  • jowapp