module.exports = function (file, api, options) { const { source, path } = file; // `source` is the source code in file at `path` const { jscodeshift, stats } = api; // use `jscodeshift` to access the API // `stats` is a function to collect statistics // during --dry runs // do some magic here... // return the changed source as string return source; };