Posted on 14th January 2020
I've been watching a few React tutorial videos and a common theme amongst them is the use of the code formatter plugin Prettier. I can see real benefit in having VS Code tidy up after me, so I decided to set it up using the Prettier VS Code extension
I've added a
.prettierrc file to my workspace and set a couple of opinionated tweaks later, it was working nicely when firing it from the command palette.
The next thing I wanted to do was make it run prettier automatically on save, meaning even less keys to press when working. Rather than have it run for every project I'm working on, for now I just want it to be confined to this workspace, which was done by adding
"editor.formatOnSave": true, to my workspace file.
Final thing I did after all this, was to install a nicer theme. For the longest time I've been using the default Dark theme that comes with VS Code, but for this workspace I've opted to use the React Theme by Mikael Kristiansson, it's quite pleasant.
Enjoyed this post? Feel free to share it with your audience using the links below:
Don't see your favourite social network on the list? Feel free to let me know and I'll get it added.