1.0.8 • Published 5 years ago
mrn-codemod v1.0.8
MRN-CODEMOD
Description
Codemod for updateing ReactNative projects by NetEase Cloud Music team
Usage
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 -fIncluded Transform Rules
Navigator
- replace
Navigatorwithreact-native-deprecated-custom-components - Navigator.props.sceneStyle must be a plain object, not a stylesheet!
Image.resizeMode
- 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
- Export default declaration cannot be undefined.
image-children
- Image cannot contain children, instead of ImageBackground.
nest
- Text cannot contain View.
PropTypes
- Replaces
React.PropTypesreferences withprop-types.
view-propTypes
- Replaces
View.propTypesreferences withViewPropTypesand adds the appropriateimportorrequirestatement. This codemod is intended for ReactNative 44+..