3.2.0 • Published 2 years ago

@change-org/change-codemod v3.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

change-codemod

Codemods for automated JS code maintenance.

Setup

npm install

Available codemods

lodash-to-object-spread

TARGET=path/to/your/js/repo npm run lodash-to-object-spread

Description

Converts non-mutating usees of _.extend and _.assignIn to use object spread syntax.

Associated lint rule

change/prefer-object-spread-to-lodash

Development

Run tests

npm test

Creating a new codemod

Writing your codemod

TODO

https://astexplorer.net/ is very helpful here.

Testing your codemod

See https://github.com/facebook/jscodeshift#unit-testing

Implementing an npm script for your codemod

    "lodash-to-object-spread": "TRANSFORM_PATH=path/to/your/transform.js npm run codemod && TRANSFORM_PATH=path/to/another/transform.js npm run codemod"
3.2.0

2 years ago

3.1.0

2 years ago

3.0.1

2 years ago

3.0.0

2 years ago

2.0.0

3 years ago

1.0.0

5 years ago