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 install
in 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
-d
option for a dry-run and use-p
to print the output for comparison; - use the
--extensions
option 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.