Skip to content

Latest commit

 

History

History
20 lines (14 loc) · 944 Bytes

README.md

File metadata and controls

20 lines (14 loc) · 944 Bytes

react-native-fix-inline-styles

Experimental tool to fix inline styles in react native components.

Setup & Run

  1. yarn global add jscodeshift

  2. git clone https://github.com/ignacioola/react-native-fix-inline-styles.git

  3. Run yarn install in the react-native-fix-inline-styles directory

  4. 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.

Recommendations

  • As this tool is experimental, before running have all your changes commited so you can compare the results.