From the course: CSS: Refactoring Style Sheets

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Make Prettier work in Visual Studio Code

Make Prettier work in Visual Studio Code - CSS Tutorial

From the course: CSS: Refactoring Style Sheets

Start my 1-month free trial

Make Prettier work in Visual Studio Code

- [Instructor] Now we want stylelint and prettier to work together inside VS code to clean up the majority of these errors for us so we don't have to do it all by hand. To get that to work, we first have to install the prettier extension to VS code as done by going to extensions and searching for prettier. The first hit you'll get is prettier, the code formatter by Esben Petersun. Click install to install this extension. And then before we activate it, we're again going to go to the workspace settings, and remember that is control and comma or go to file, settings or applications and settings, and then preferences and settings. From here, go to workspace settings and here we need to add in some new feature. But if we go into the documentation for prettier code formatter, scroll down a bit, we'll see the first one it says here. Format on save, this is the key to this extension. We can get this extension to automatically apply prettier formatting anytime we save the file and then we can…

Contents