1. Select File -> Preferences -> Settings (Ctrl + comma) and search form formatter
  2. Set Prettiers as Default formatter.

If above does not work:

ctrl+shift+p > Format Document With... > Configure Default Formatter... > Prettier - Code formatter

This also work with ctrl+shift+I

Answer from Miha on Stack Overflow
🌐
Prettier
prettier.io
Prettier · Opinionated Code Formatter · Prettier
Try It OnlineInstall Prettier · Limited edition tshirts are now available to buy! $10 per tshirt goes to maintain the project. An opinionated code formatter · Supports many languages · Integrates with most editors · Has few options » · Your code is formatted on save ·
Blog
We're excited to announce that Prettier now fully supports the fresh features landing in Angular v21.1 (released today 🎉)! This update brings cleaner, more expressive templates with: Consecutive @case statements in @switch blocks. Spread elements (...) in array literals, object literals, and function calls inside templates. We've also added the ability to format ...
Options · Prettier
Setting max_line_length in an .editorconfig file will configure Prettier’s print width, unless overridden. (If you don’t want line wrapping when formatting Markdown, you can set the Prose Wrap option to disable it.)
Configuration File
A .prettierrc.toml file. ... The configuration file will be resolved starting from the location of the file being formatted, and searching up the file tree until a config file is (or isn’t) found.
🌐
Reddit
reddit.com › r/frontend › is using prettier to format code bad.
r/Frontend on Reddit: Is using Prettier to format code bad.
May 23, 2023 -

Recently joined a agency as an Contract React developer. I was assigned a task to edit some inline Scss code.

Being a Prettier user I formatted the code, made the necessary changes and submitted a pull request.

Next day the senior developer reviewed my code and asked me to stop using Prettier and assigned me a task to change back the Scss code manually to inline Scss.

When I asked why should I not use prettier to format code. He said it's bad and time consuming and other team members started telling me a story how one time prettier wasn't working and started throwing errors.

That's why they never use it.

I wanted to say that It was showing error because you were doing something wrong.

Just because you once had an bad experience doesn't mean it's bad.

Plus they use one big single Scss file for the whole project.

When I question it too and asked them to use separate files and how it can effect the performance.

One team member answered it doesn't matter, how they don't care about the performance and I should be open minded and learn from them. The boss has 18 years of experience.

What should I learn why not to follow good practices!

Discussions

Why does Prettier not format code in VS Code?
In my Nuxt application where ESlint and Prettier are installed and enabled, I switched to Visual Studio Code. When I open a .vue file and press CMD+ Shift + P and choose Format Document, my file d... More on stackoverflow.com
🌐 stackoverflow.com
VS Code - Prettier is formatting differently for me than others - Stack Overflow
Prettier is behaving differently for me compared to my team mates. We all have same version 9.5.0 of prettier installed on our VS Code. We all have same configuration of prettier. Still it is forma... More on stackoverflow.com
🌐 stackoverflow.com
reactjs - Prettier not working on save from within Visual Studio Code - Stack Overflow
It appears the formatting via keyboard and formatting from the menu are not on the same page, but I don't know why. Below are my exact detailed steps... I installed the extension Prettier - Code formatter v9.10.4 More on stackoverflow.com
🌐 stackoverflow.com
visual studio code - How to force prettier html formatting to format tags in one line? - Stack Overflow
I use prettier in my VSC, so how to force prettier HTML formatting to format tags in one line, not multiple lines? I want to format something like this all in one line More on stackoverflow.com
🌐 stackoverflow.com
🌐
GitHub
github.com › prettier › prettier
GitHub - prettier/prettier: Prettier is an opinionated code formatter. · GitHub
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
Author   prettier
🌐
Visual Studio Marketplace
marketplace.visualstudio.com › items
Prettier - Code formatter - Visual Studio Marketplace
January 21, 2026 - Extension for Visual Studio Code - Code formatter using prettier
🌐
JetBrains
jetbrains.com › help › webstorm › prettier.html
Prettier | WebStorm Documentation
Prettier is a tool to format files in various languages, like TypeScript, JavaScript, CSS, HTML, JSON, and others. With WebStorm, you can format selected code fragments as well as entire files or directories using the Reformat with Prettier action.
🌐
DigitalOcean
digitalocean.com › community › tutorials › how-to-format-code-with-prettier-in-visual-studio-code
Format Code with Prettier in Visual Studio Code: Setup Guide | DigitalOcean
August 1, 2025 - By the end of this guide, you’ll have a reliable and automated formatting workflow in place within VS Code. ... Prettier Automates Code Formatting: Prettier enforces consistent code style by automatically formatting code according to predefined rules, reducing manual formatting and team debates over style.
Find elsewhere
🌐
npm
npmjs.com › package › prettier-format
prettier-format - npm
September 8, 2023 - Source code you want to format.
      » npm install prettier-format
    
Published   Sep 08, 2023
Version   4.0.0
Author   fisker Cheung
🌐
GoodRequest
goodrequest.com › blog › code-formatting-using-the-prettier-tool
How to format code with Prettier tool step-by-step guide | GoodRequest
July 14, 2023 - If you want automatic formatting for the "on save" action, you need to set the IDE that you use when developing through their settings. I will show you how to set up a webstorm and visual studio code. ... As I mentioned above, prettier provides easy auto-formatting options and settings that keep the code consistent, so you avoid problems and save time, so I definitely recommend it.
🌐
Codux
help.codux.com › home › all topics › codux editor › using prettier to format code
Using Prettier to Format Code - Codux Knowledge Base
Prettier is a code formatting tool that makes your code more readable, consistent, and easier to maintain. It takes messy, unformatted code and formats it in an aesthetically pleasing manner while also keeping the structure intact.
🌐
JavaScript in Plain English
javascript.plainenglish.io › how-to-use-prettier-to-customize-your-code-formatting-b1a5424f2ed6
How to use prettier to customize your code formatting | by sam | JavaScript in Plain English
October 12, 2020 - How to use prettier to customize your code formatting Learn to configure and use this code formatter to make your life easier Tabs or spaces? Double or single quotes? Trailing commas and whitespace? …
🌐
GeeksforGeeks
geeksforgeeks.org › installation guide › formatting-code-with-prettier
Formatting code with Prettier - GeeksforGeeks
July 23, 2025 - Prettier is an opinionated code formatter that will take all your code, remove the inconsistency in the codebase in styling the code, and ensure the output code is formatted in the desired pattern by using the predefined styles in prettier.
🌐
freeCodeCamp
freecodecamp.org › news › how-to-use-prettier-in-visual-studio-code
How To Use Prettier in Visual Studio Code
March 18, 2024 - When your Prettier extension is installed, you need to configure Visual Studio Code to take advantage of it. You can do in the Settings tab. Side node: to open the Settings tab, you can use COMMAND + , on macOS or CTRL + , on Windows and Linux: ... At the top of the Settings tab you will find a search box. Now, you need to type formatter, and then Editor: Default Formatter will pop up on the settings list:
🌐
GitHub
github.com › prettier › prettier-vscode › issues › 2999
Prettier code format take a long time to format · Issue #2999 · prettier/prettier-vscode
April 27, 2023 - Type: Bug I dont know why but my prettier take about 1-2s to format. Extension version: 9.12.0 VS Code version: Code 1.77.3 (Universal) (704ed70d4fd1c6bd6342c436f1ede30d1cff4710, 2023-04-12T09:19:37.325Z) OS version: Darwin arm64 21.4.0 ...
Published   Apr 27, 2023
🌐
Medium
medium.com › @kiran.jasvanee › prettier-auto-formatting-in-visual-studio-code-beab1c026b13
Prettier Auto Formatting in Visual Studio Code. | by Kiran Jasvanee | Medium
March 22, 2020 - ... Just go to Extensions, last one in the Activity Bar. If not familiar with Visual Studio layout, Go through — Visual Studio Layout Guide · Search Prettier, select Prettier — Code Formatter, and install it.
🌐
JetBrains
jetbrains.com › help › idea › prettier.html
Prettier | IntelliJ IDEA Documentation
Prettier is a tool to format files in various languages, like TypeScript, JavaScript, CSS, HTML, JSON, and others. With IntelliJ IDEA, you can format selected code fragments as well as entire files or directories using the Reformat with Prettier ...