Skip to content

Instantly share code, notes, and snippets.

View cah-danmonroe's full-sized avatar

Dan Monroe cah-danmonroe

  • Cardinal Health
View GitHub Profile
@cah-danmonroe
cah-danmonroe / add-super-calls.js
Created March 7, 2017 15:14 — forked from Bestra/add-super-calls.js
codemod for adding this._super() calls to component lifecycle hooks
/**
To use this file you'll need to have `jscodeshift` (https://github.com/facebook/jscodeshift)
installed, which you can get through npm or yarn.
You can invoke it as follows:
`jscodeshift -t add-super-calls.js ~/path/to/js/files/`
You can pass `-d` to do a dry-run.
*/
const hookNames = [
'init',
'didInitAttrs',