you can create you own default keyboard shortcut in VS code for formatting documents like in my case prettier code format command is shift+window+F but it is creating issue in mac so i changed the short cut command for it, for more information can refer below screenshots

Answer from prashant kumar 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 Angular syntax beautifully inside Markdown code ...
Options ยท Prettier
Try prettier's new ternary formatting before it becomes the default behavior. ... false - Retain the default behavior of ternaries; keep question marks on the same line as the consequent. ... "end" - Default behavior; when binary expressions wrap lines, print operators at the end of previous lines. Specify the line length that the printer will wrap on. ... In code ...
Configuration File
You can configure Prettier via (in order of precedence):
๐ŸŒ
GitHub
github.com โ€บ prettier โ€บ prettier
GitHub - prettier/prettier: Prettier is an opinionated code formatter. ยท GitHub
It enforces a consistent style by parsing your code and re-printing it with its own rules that take the maximum line length into account, wrapping code when necessary. foo(reallyLongArg(), omgSoManyParameters(), IShouldRefactorThis(), isThereSeriouslyAnotherOne()); foo( reallyLongArg(), omgSoManyParameters(), IShouldRefactorThis(), isThereSeriouslyAnotherOne(), ); Prettier can be run in your editor on-save, in a pre-commit hook, or in CI environments to ensure your codebase has a consistent style without devs ever having to post a nit-picky comment on a code review ever again!
Starred by 51.8K users
Forked by 4.7K users
Languages ย  JavaScript 83.3% | TypeScript 6.2% | CSS 3.0% | HTML 3.0% | SCSS 1.5% | Less 1.0%
Discussions

What is Prettier keyboard shortcut command in VS Code to format only a block of React code, not just format on file autosave?
Using Prettier: Anyone know the keyboard shortcuts to auto-format a single block of javascript in VSCode on highlight, without having to save the entire file using Prettier to use auto formatting. More on stackoverflow.com
๐ŸŒ stackoverflow.com
reactjs - Prettier not working on save from within Visual Studio Code - Stack Overflow
I tried these and it still wasn't working. I noticed that at the bottom of my VS Code my Prettier wasn't showing a checkmark next to it. More on stackoverflow.com
๐ŸŒ stackoverflow.com
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
Those who stopped using prettier , why ?
What are you having troubles with? The only complaints I've heard about it is that it is too opinionated More on reddit.com
๐ŸŒ r/webdev
215
146
February 1, 2024
๐ŸŒ
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!

๐ŸŒ
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
๐ŸŒ
Beautifier
beautifier.io
Online JavaScript beautifier
Chrome, in case the built-in CSS and javascript formatting isn't enough for you: โ€” Quick source viewer by Tomi Mickelsson (github, blog), โ€” Javascript and CSS Code beautifier by c7sky, โ€” jsbeautify-for-chrome by Tom Rix (github), โ€” Pretty Beautiful JavaScript by Will McSweeney โ€” Stackoverflow Code Beautify by Making Odd Edit Studios (github).
๐ŸŒ
npm
npmjs.com โ€บ package โ€บ prettier
prettier - npm
January 21, 2026 - It enforces a consistent style by parsing your code and re-printing it with its own rules that take the maximum line length into account, wrapping code when necessary. foo(reallyLongArg(), omgSoManyParameters(), IShouldRefactorThis(), isThereSeriouslyAnotherOne()); foo( reallyLongArg(), omgSoManyParameters(), IShouldRefactorThis(), isThereSeriouslyAnotherOne(), ); Prettier can be run in your editor on-save, in a pre-commit hook, or in CI environments to ensure your codebase has a consistent style without devs ever having to post a nit-picky comment on a code review ever again!
      ยป npm install prettier
    
Published ย  Jan 21, 2026
Version ย  3.8.1
Author ย  James Long
Homepage ย  https://prettier.io
๐ŸŒ
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.
Find elsewhere
๐ŸŒ
DEV Community
dev.to โ€บ g_abud โ€บ prettier-and-the-beauty-of-opinionated-code-formatters-pfg
Prettier and the Beauty of Opinionated Code Formatters - DEV Community
June 25, 2020 - For those of you that don't know, Prettier is an opinionated code formatter for Javascript/Typescript, HTML, JSX, and more. It is lightweight, requires next to no configuration, and automatically formats code for you.
๐ŸŒ
Prettier
prettier.io โ€บ docs
What is Prettier? ยท Prettier
It removes all original styling* and ensures that all outputted code conforms to a consistent style. (See this blog post) Prettier takes your code and reprints it from scratch by taking the line length into account.
๐ŸŒ
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 - Learn how to format code with Prettier in Visual Studio Code. This guide walks you through installing, configuring, and using Prettier for code formatting.
๐ŸŒ
OpenReplay
blog.openreplay.com โ€บ using-prettier-with-vscode-to-write-javascript
Using Prettier with VSCode to write JavaScript
June 7, 2023 - Prettier is an open-source code formatting tool that automatically formats your code to a consistent and organized style. It supports several programming languages, including JavaScript, TypeScript, HTML, CSS, and more.
๐ŸŒ
Robin Wieruch
robinwieruch.de โ€บ how-to-use-prettier-vscode
How to use Prettier in VS Code
February 14, 2022 - Prettier is an opinionated code formatter which ensures one unified code format. It can be used in VS Code by installing it from the VS Code Marketplace. Once you have integrated it in VS Code, you can configure Prettier to format your files ...
๐ŸŒ
Caasify
caasify.com โ€บ blog โ€บ prettier-vs-code-setup-a-complete-guide-to-code-formatting-and-automation
Prettier VS Code Setup: A Complete Guide to ...
September 26, 2025 - Prettier is a tool that automatically formats your code to make sure it sticks to a consistent style. It saves developers time by removing the need for manual formatting and arguments about style preferences.
๐ŸŒ
Formatter.org
formatter.org
Online Code Formatter and Beautifier
Free online code formatter and beautifier for developers. Instantly format, clean, and beautify source code with fast, simple tools.
๐ŸŒ
Carbon
carbon.now.sh
Carbon | Create and share beautiful images of your source code
Carbon is the easiest way to create and share beautiful images of your source code.