This is a collection of codemods I have written to help me automate certain tasks in the past.
Most use ast-grep but some may use jscodeshift or other tools.
sg scan -r path-to-codemod.yml path-to-source-code
Name | Description |
---|---|
add-extensions-to-imports | Add .js to extensionless imports |
chai-expect-to-node-assert | Convert chai expect assertions to node:assert assertions |
chai-should-to-expect | Convert should assertions to expect assertions |
sinon-to-tinyspy | Convert sinon spies to tinyspy spies |