GitHunt
AT

atabel/proptypes-to-flow-codemod

Codemod to tranform react proptypes to flow

PropTypes to Flow codemod

Setup and usage

Before usage of the codemod you should install jscodeshift first.

  1. Clone repo
    git clone https://github.com/mikhail-hatsilau/proptypes-to-flow-codemod.git

  2. Run npm install inside codemod directory

  3. Run npm run build to transpile javascript

  4. Run jscodeshift -t proptypes-to-flow-codemod/dist/propsToFlow.js <path>

Options

By default codemod leaves proptypes statements. But you can pass remove-prop-types option: jscodeshift -t proptypes-to-flow-codemod/dist/propsToFlow.js <path> --remove-prop-types=true. It will remove proptypes statements and import declaration

Languages

JavaScript100.0%

Contributors

Created March 24, 2018
Updated September 11, 2018