Awesome Codemods
A curated list of awesome codemod resources for various languages, libraries and frameworks
Inspired by the awesome list thing.
Please read the contribution guidelines before contributing.
Table of Contents
- Javascript
- ESNext
- Typescript
- Frameworks
- Libraries
- Organization specific Codemods
- Editor Plugins
- Misc
- Awesome Lists
Javascript
- js-codemod - Codemod scripts to transform code to next generation JS.
- js-transforms - Some documented codemod experiments to help you learn.
- coffee-to-es2015-codemod - A set of JSCodeshift transforms that will help you transform your CoffeeScript codebase to ES2015
- 5to6-codemod - A collection of codemods that allow you to transform your js code from ES5 to ES6.
- es5-function-to-class-codemod - Transform ES5 Functions to ES6 Classes.
- webpack-babel-codemod - Convert anonymous webpack commonjs require statements to es2015 import statements.
- rm-debugger - Codemod for removing
debugger;
- AMD Transformer - converts JS into AMDified JS (by Atlassian)
- undecorate-codemod - Transformers experimental ESNext decorators syntax to simple currying
- jest-codemods Codemods for migrating to Jest
- refactoring-codemods Refactoring support for JavaScript via jscodeshift codemods
- sinon-codemod Codemod scripts that update Sinon APIs
- codemod-imports-sort Sort ES6 imports by type
- JamieMason/codemods A collection of transforms for use with JSCodeshift
- eslint-transforms Codemods for the ESLint ecosystem
- js-codemods Some codemod scripts to transform code for good styling
- class-props-codemod Transform old-style assigned static properties to class static properties
- flow-comments-codemod Convert flowtype syntax to valid JS
- async-await-codemod Codemod script for migrating promise-based functions to use async/await syntax
- sort-class-members-codemod A codemod for automatically fixing issues reported by eslint-plugin-sort-class-members
- relative-to-alias ๐ ๏ธ A codemod to do large-scale refactor of your relative path imports to alias.
- transform-imports Tools that make it easy to codemod imports/requires in your JS
- expect-js-to-assert A jscodeshift codemod that transforms from expect.js to Node assert
- optional-chaining-codemod
- chai-to-assert A jscodeshift codemod that transforms from chai to Node assert
- nikgraf/js-codemod A collection of codemods
- amd-to-commonjs-codemod A codemod to transform amd style includes into commonjs includes
- js-codemod-import-absolute Codemod to replace relative imports with absolute or custom paths
- relekang/codemods
- jest-expect-codemod CodeMods for migrating
chai.assert
,chai.expect
,assert
-based test assertions to jest'sexpect
assertions - vasco3/cuadrante-codemods Converts ES6 imports to commonJS requires
- immutablejs-eraser-codemod A codemod to rescue you from a Immutable.js abuse
- underscore-to-native Underscore to native codemods
- chai-to-jasmine A chai to jasmine codemod that includes additional transforms for jest migration
- node-dep-codemod A collection of JSCodeshift codemod scripts for migrating code that uses deprecated Node.js APIs
- styletron/codemods Codemods for styletron
- rxjs-codemod codemod scripts to transform older RxJS code to RxJS5-compatible code.
- cleaner-codemods Simple codemods to destructure prop types
- apitsummit-codemods
- dsgkirkby/js-codemods Wrap switch statements in a code block
- EDITD/codemods Radium to Glamour codemod
- bradencanderson/codemods
- peakon/codemods i18n Context, Locale, No immutable class codemods
- knoopx/codemods
- autobots Codemods for great good!
- ce-codemods Codemods for custom elements
- [bseber/codemods](codemods for jasmine refactoring) Codemods for Jasmine refactoring
- strudel-codemod Strudel codemod scripts
- co-to-async ๐ฆ Take the step from co.wrap to async/await automagically
- DrewML/codemods
- skratchdot-codemods a collection of utility codemods
ESNext
- 5to6 A collection of codemods that allow you to transform your js code from ES5 to ES6.
- async-await-codemod Codemod to add try catch to all the async await statements
- codemod-get-to-optional-member-expression Change Lodash
get
functions to ES7 optional member expressions - idx-to-optional-chaining JSCodeShift codemod that transforms usage of idx to the draft optional chaining standard.
- generator2async-codemod
- lebab-as-babel-plugins Codemod to transform ES5 code to ES6/7 and uses babel plugins
Typescript
- ts-codemod Typescript based codemods
- tscodeshift tscodeshift is a toolkit for running codemods over multiple TS files
- flowToTs Flow to Typescript codemods
- codemod-cli-ts CLI for generating codemods written in Typescript.
- tsmod Refactor TypScript code programmatically using codemods
- js-to-typescript-codemod A simple codemod for helping migrate from babel to typescript. Converts default imports to wildcards.
- riceburn A Typescript, JSON, and text file Code Mod Utility
- flowshift flow to typescript codemods
- ts-codemod-scripts collection of basic JS/React codemod scripts to prepare for TS on a codebase
Frameworks
React.js
- react-codemod - React codemod scripts to update React APIs.
- preact-codemod - Transform your React code to Preact.
- rackt-codemod - Codemod scripts for Rackt libraries.
- ast-18n Easily migrate your existing React codebase to use i18n
- codemod-react-proptypes-to-flow
- proptypes-to-flow Codemod to tranform react proptypes to flow
- react-hot-loader-codemod
- mst-codemod-to-0.10 A codemod to migrate to MobX-State-Tree 0.10 from previous versions
- babel-plugin-codemod-react-css-modules Converts React components using imported CSS stylesheets to equivalent CSS Modules syntax.
- metal-to-react Codemods for migrating metal-jsx to react
- rn-update-deprecated-modules Codemod to update import declarations as per react-native > 0.59.x deprecations.
- babel-plugin-hyperscript-to-jsx This plugin transforms react-hyperscript into JSX. Intended to be used as codemod.
- cjsx-codemod A codemod for migrating off of coffee-react CJSX
- over_react_codemod Codemods to help consumers of over_react automate the migration of UI component code.
- yannvr/codemods JS/React transforms because life is too short
- js2tsx A toolkit provide some codemod scripts based on jscodeshift to migrating react code base to typescript
- react-native-paper-codemod
- react-codemod-pure-component-to-class A react codemod to transform stateless/pure/functional components to class components.
- denvned/codemod Relay Mutation - didResolveProps
- mukeshsoni/codemods Adds a data-test-id attribute to all jsx html elements
- js-react-codemods A boilerplate of JS 5/6/7 transforms for react/redux/js/etc
- react-with-hooks-removal-codemod Remove the react-with-hooks library code when React 16.7.0 is released
- react-native-fix-inline-styles Fix inline styles in react native components
- react-style-px-suffix-codemod append px to shorthand values in style objects in react in prep for react 15 warning
Ember.js
- ember-codemods Official organization for Ember.js Codemods
- ember-watson An Ember.js codemod to make upgrades automatic.
- test-selectors-codemod A codemode for fixing the ember-test-selectors testSelector helper deprecation
- ember-i18n-to-intl-migrator Migrate ember-i18n to ember-intl
- lil-codemods Ember codemods
- jmdejno/ember-codemods Ember code Transforms
- react-destructuring-assignment-codemod A WIP jscodeshift codemod to destructure assignments of props, state, and context
- legacy-tests-codemod A collection of codemod's for legacy-tests-codemod.
- ember-action-codemods Codemods for converting uses of action to the {{on}} modifier
- ember-k-codemod Removes all usages of Ember.K
- ember-computed-decorators-codemod Codemod to update ember-computed-decorators to ember-decorators
- ember-cli-mirage-faker-codemod
- ember-component-jquery A codemod for migrating Ember Component code from
this.$()
to$(this.element)
Preact.js
- preact-codemod ๐ง Shave some bytes by using Preact.
Vue.js
- vue-codemods Collection of codemod scripts that help update and refactor Vue and JavaScript files.
Angular.js
- angular-codemods Codemods for refactoring legacy angular applications
Libraries
Lodash
- lodash-codemods Codemods to simplify upgrading Lodash versions
- lodash-to-lodash-amd-codemods - lodash to lodash-amd codemods
- optional-chaining-codemod Codemod to migrate from Lodash get and logical and expressions to optional chaining
- js-transforms Codemod to replace lodash for lodash/fp
- modular-lodash-codemod Makes all your lodash imports modular.
- kevinbarabash/codemods Lodash/Underscore to native
Mocha
- mocha-to-jest-codemod Convert Mochan TDD with Chai assert tests to Jest
- mocha2ava-codemod - A tranformer for migrating tests from Mocha to Ava.
AVA
- jscodeshift-ava-tester codeshift wrapper to write smaller and better tests for your codemods using AVA
Styled Components
- styled-components-codemods Automatic codemods to upgrade your styled-components code to newer versions.
- styled-components-v3-to-v4-codemod Codemod to migrate deprecated .extend API in favor of only styled functions.
Organization specific Codemods
This is the list of codemods used by a particular organization for their code transformations.
- @freshworks/ember-codemods A collection of codemods used in Freshworks
- shopify-codemod A collection of Codemods written with JSCodeshift that will help update our old, crusty JavaScript to nice, clean Javascript
- uber-codemods Because Code Changes and Evolves
- artsy/codemods Various codemods used around Artsy
- tune-codemods A collection of codemods we use at tune.
- yapp-codemods Yapp's codemods
- civicsource/codemod
Editor Plugins
- atom-codemod Atom plugin for running codemods
- vscodemod VSCode extension for doing codemod on selected text
- nmn/atom-codemod simple commands to apply specific Babel plugins/codemods on your code
Misc
- antd-codemod antd codemod scripts
- flow-codemod jscodeshift-powered [email protected] to [email protected] transformations
- mithril-codemods
- webpack-codemods JS Codemod to automatically convert webpack config from v1 to v2
- js-codemods Node.js/Javascript codemods used at @entria
- jasmine-to-chai-codemod ๐ต Codemod for jscodeshift to migrate your tests from Jasmine to Chai syntax
- closure-codemod Closure codemod scripts
- titanium-codemods Codemod scripts for Titanium Applications
- next-codemod codemod transformations to help upgrade Next.js codebases
- date-fns-upgrade-codemod Code mods for upgrading date-fns versions
- graphql2ts Transform .graphql to graphql-js typescript
- gen-codemod Generate codemods by specifying your starting -> desired JavaScript.
- ruby_crystal_codemod A codemod / transpiler that can help you convert Ruby into Crystal
- babel-plugin-localize codemod to localize static strings
- generator-codemod A generator to create codemods quickly.
- codemodes-tycoon
- codemod-v4 codemod cli for antd v4 upgrade
- pkg-upgrader easily build codemod CLIs using jscodeshift. fork of lib-upgrader
- can-migrate CLI & codemod scripts for upgrading to CanJS 3, 4 and 5
- create-codemod-app Create Codemod App, a codemod generator and runner
- babel-plugin-glamorous-to-emotion A codemod to migrate existing React or Preact codebases from glamorous to emotion.
- rxdart_codemod A collection of codemods to upgrade your RxDart code from one version to the next
- viewtools/codemods Helpers to migrate your code to newer versions of Views Tools
- PHP-Codeshift A small PHP toolkit for running codemods (code transformations) over multiple PHP files.
- gnome-shell-extension-es6-class-codemod A jscodeshift transform that helps migrating GNOME Shell extensions to 3.32
- direct-import-codemod Use direct imports to save JS bundle size
- d3-upgrade-codemods Codemods to upgrade d3 from version 3.x
- generator-jscodeshif A yeoman generator for a jscodeshift codemod.
- tds-codemod TELUS Design System
- gsa-codeshift GSA codemod scripts
- bottender-codemod Bottender codemod scripts