Are you annoyed with Visual Studio Code’s formatter when working with JSX?
It can turned the code like this…
transformed to this ugly guy…
Now you can work without worry that formatter will breaks your JSX.
*But wait … Do I need to do these steps on every .js files?
Go to user settings. In Windows and Linux go to menu File > Preferences > Settings In MacOS go to Code > Preferences > Settings
Search for files.associations, the files associations setting will be shown as the first result, click on Edit in settings.json
In the left panel it will be default user settings, which is usually empty, and in the right panel will contains user settings that will overrides the system settings. Your settings should be like example below.
This make our life easier! I hope this guide will be helpful to you guys. Happy coding!