This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Codemod to convert class methods to properties, and remove `.bind(this)` in JSX props. | |
| // Doesn't support Flow annotations yet | |
| export default function(file, api) { | |
| const j = api.jscodeshift; | |
| const isReactClass = p => { | |
| const extended = p.node.superClass; | |
| return ( | |
| extended && ( | |
| extended.type === 'MemberExpression' && |