Skip to content

TUNE-Archive/tune-codemods

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tune-codemods

A jscodeshift codemod library that we use at tune.

Install & Run

npm install -g jscodeshift
git clone https://github.com/AlexJuarez/tune-codemods.git
jscodeshift -t ./transforms/prefer-const <file>

Scripts

  • auto-unmock adds jest.unmock for all imports/ requires inside of files.
  • chai-to-jasmine converts chai chain and should expressions to jest compatible jasmine.
  • import-to-require converts all import statements to require statements.
  • mocha-mix-to-enzyme replaces mochaMix a tune testing library with enzyme matchers.
  • prefer-const converts let statements that are never reassigned to const.
  • rm-empty-beforeEach removes empty beforeEach blocks.
  • rm-unused-vars removes variableDeclarations that are never used in the file.
  • sinon-to-jasmine-spy converts all sinon type spys to jasmine and jest
  • sort-keys sorts all of the keys in object in ascending order.
  • order-imports sorts all the imports by rules laid out in eslint-plugin-import/order
  • global-return-to-export replaces top level return statements with export default

About

A collection of codemods we use at tune.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published