We're going to use the official Atom package for Prettier to help us make our code... prettier.
Go to Settings → Install and search for prettier-atom
. Remember the keyboard shortcut to bring up settings is ⌘,
. Click Install.
Once it's done install, you can click on the Settings button under prettier-atom
. The following settings are reccomended:
- Format files on Save: Yes
- Show in Status Bar: Yes, this gives you a quick toggle for enabling and disabling auto formatting on save at the bottom of your Atom window.
- Prettier Options: Set these to your personal preferences. Jason recommends:
- Single quotes: Yes
- Semicolons: No
- Print Width:
120