tscodeshift is a toolkit for running codemods over multiple TS files. It borrows its ideas from jscodeshift in a shameless manner.
Usage: tscodeshift <path>... [options]
path Files or directory or glob to transform
Options:
-t FILE, --transform FILE Path to the transform file. Can be either a local path or url [./transform.js]
-d, --dry Dry run (no changes are made to files)
-p, --print Print output, useful for development
Convert mocha tests to jest tests:
$ npm install tscodeshift
$ ./node_modules/.bin/tscodeshift -t ./node_modules/tscodeshift/dist/src/transforms/mocha.js 'tests/**/*.ts'