A jscodeshift codemod library that we use at tune.
npm install -g jscodeshift
git clone https://github.com/AlexJuarez/tune-codemods.git
jscodeshift -t ./transforms/prefer-const <file>auto-unmockadds jest.unmock for all imports/ requires inside of files.chai-to-jasmineconverts chai chain and should expressions to jest compatible jasmine.import-to-requireconverts all import statements to require statements.mocha-mix-to-enzymereplaces mochaMix a tune testing library with enzyme matchers.prefer-constconverts let statements that are never reassigned to const.rm-empty-beforeEachremoves empty beforeEach blocks.rm-unused-varsremoves variableDeclarations that are never used in the file.sinon-to-jasmine-spyconverts all sinon type spys to jasmine and jestsort-keyssorts all of the keys in object in ascending order.order-importssorts all the imports by rules laid out in eslint-plugin-import/orderglobal-return-to-exportreplaces top level return statements with export default