Experimental tool to fix inline styles in react native components.
-
yarn global add jscodeshift -
git clone https://github.com/ignacioola/react-native-fix-inline-styles.git -
Run
yarn installin the react-native-fix-inline-styles directory -
jscodeshift -t path/to/react-native-fix-inline-styles/transform.js <path>path- files or directory to transform;- use the
-doption for a dry-run and use-pto print the output for comparison; - use the
--extensionsoption if your files have different extensions than.js(for example,--extensions js,jsx); - if you use flowtype, you might also need to use
--parser=flow; - see all available jscodeshift options.
- As this tool is experimental, before running have all your changes commited so you can compare the results.