Codemod for updateing ReactNative projects by NetEase Cloud Music team
mrn-codemod transform [options] <sourceDirectory>
Commands:
transform [options] <sourceDirectory>
--f Bypass Git safety checks and forcibly run codemods
Examples:
$ mrn-codemod transform src
$ mrn-codemod transform src -f
- replace
Navigator
withreact-native-deprecated-custom-components
- Navigator.props.sceneStyle must be a plain object, not a stylesheet!
- Stop expose
Image.resizeMode
. Exposing this enum is essentially useless and at worst is a runtime cost that isn't necessary by just using the string.
- Export default declaration cannot be undefined.
- Image cannot contain children, instead of ImageBackground.
- Text cannot contain View.
- Replaces
React.PropTypes
references withprop-types
.
- Replaces
View.propTypes
references withViewPropTypes
and adds the appropriateimport
orrequire
statement. This codemod is intended for ReactNative 44+..