/codemod-proptypes-to-flow

Removes React.PropTypes and attempts to transform to flowtypes

Primary LanguageJavaScriptMIT LicenseMIT

codemod-proptypes-to-flow Build Status codecov

Removes React.PropTypes and attempts to transform to Flow.

Setup & Run

  • npm install -g jscodeshift
  • git clone https://github.com/billyvg/codemod-proptypes-to-flow
  • jscodeshift -t codemod-proptypes-to-flow/src/index.js <path>
  • Use the -d option for a dry-run and use -p to print the output for comparison

Not working/Implemented yet

  • Custom validators
  • React.createClass
  • Use of importing PropTypes

Contributors

  • Thanks to @skovhus for adding support for functional components and modernizing the codebase a bit (a lot)