globally install prettier: npm install --global prettier

then from webstorm, go to Prettier preferences, insert this path under Prettier package: /usr/local/lib/node_modules/prettier

this is where your global node_modules are installed (not project level).

choose which files it should run for, insert {**/*,*}.{js,ts,jsx,tsx} for JS/ TS files.

Happy coding!

Answer from HiLuLiT on Stack Overflow
🌐
JetBrains
jetbrains.com › help › webstorm › prettier.html
Prettier | WebStorm Documentation
Open the Settings dialog (Ctrl+Alt+S) , go to Languages & Frameworks | JavaScript | Prettier, and select Manual Prettier configuration. From the Prettier package list, select the prettier installation to use.
🌐
Prettier
prettier.io › docs › webstorm
WebStorm Setup · Prettier
For this, open Preferences / Settings | Languages & Frameworks | JavaScript | Prettier and tick the corresponding checkbox: On save and/or On ‘Reformat Code’ action. By default, WebStorm will apply formatting to all .js, .ts, .jsx, and .tsx files that you’ve edited in your project.
🌐
GitHub
github.com › sveltejs › prettier-plugin-svelte › issues › 242
plugin inserts prettier:content when using webstorm · Issue #242 · sveltejs/prettier-plugin-svelte
I will format the code as expected, ... result as above will shown. I can workaround the issue by disabling the On 'Reformat Code' action option in the Prettier Settings....
🌐
Reddit
reddit.com › r/webstorm › html files are not formatted when saved using prettier in webstorm, but everything works fine in vscode.
r/WebStorm on Reddit: HTML files are not formatted when saved using Prettier in Webstorm, but everything works fine in VSCode.
June 11, 2025 -

Hello, everyone!

I decided to try Webstorm 2025.1.2 after briefly familiarizing myself with VSCode, to compare the two. I heard that Webstorm is much more comfortable and pleasant to use.

But I ran into a problem that I haven't been able to solve for several days now. It surprises me, and I became very interested in figuring out what the problem is.

I am studying TailwindCSS and creating an HTML template using Pnpm, Prettier, and several of its plugins for convenient code formatting, namely:

“prettier-plugin-classnames”: “^0.7.8”,

“prettier-plugin-merge”: “^0.7.4”,

“prettier-plugin-tailwindcss”: “^0.6.12”,

In VSCode, formatting works immediately when saving, all these plugins work as they should, but in Webstorm - no.

I dug through a bunch of articles, consulted AI a bunch of times, but I tried what it advised me to do and got nowhere. I double-checked all the settings and so on... Please tell me what the problem is. I'm sure some obvious little thing is preventing prettier from working as it should.

Here is my .prettierrc file:

{
  "tailwindStylesheet": "./src/css/style.css",
  "arrowParens": "always",
  "bracketSpacing": true,
  "htmlWhitespaceSensitivity": "css",
  "insertPragma": false,
  "jsxSingleQuote": true,
  "printWidth": 80,
  "proseWrap": "always",
  "quoteProps": "as-needed",
  "requirePragma": false,
  "semi": true,
  "singleQuote": true,
  "tabWidth": 2,
  "trailingComma": "all",
  "useTabs": false,
  "plugins": [
    "prettier-plugin-tailwindcss",
    "prettier-plugin-classnames",
    "prettier-plugin-merge"
  ],
  "customAttributes": ["class"],
  "customFunctions": ["clsx", "cn"],
  "overrides": [
    {
      "files": "*.html",
      "options": {
        "parser": "html"
      }
    }
  ]
}
My Prettier Settings Actions on Save Settings

An interesting observation 1:

I check whether changing the order within Tailwind classes and adding a few spaces works. I press CTRL+S. For a moment, a message appears at the bottom right and disappears after a few seconds, but the code is not formatted:

An interesting observation 2:

When I use this command prettier --write src/index.html in the command line, everything works as I expect!

Additional information:

- I installed prettier globally using npm (it didn't work with pnpm), but then I removed it. Now it is only installed locally in the project. AI said that the IDE may conflict due to two different versions.

- I tried to specify full paths for plugins in .prettierrc

- I tried abandoning pnpm and going back to npm

To be honest, I've tried so many things that I can't even remember them all. Maybe someone else has encountered this?

Thank you in advance! All the best.

🌐
GitHub
github.com › prettier › prettier › issues › 15091
Prettier 3 fails in WebStorm · Issue #15091 · prettier/prettier
July 13, 2023 - Environments: Prettier Version: 3.0.0 Running Prettier via: WebStorm IDE Runtime: Operating System: Linux Prettier plugins (if any): Steps to reproduce: Install prettier Run it with ctrl+alt+shift + p Expected behavior: Code mormalized A...
Published   Jul 13, 2023
🌐
JetBrains
intellij-support.jetbrains.com › hc › en-us › community › posts › 360004596320-Prettier-doesn-t-work-in-IDEA-2019-2
Prettier doesn't work in IDEA 2019.2 – IDEs Support (IntelliJ Platform) | JetBrains
So, I executed echo $PATH and output looks like that: "/home/user/.nvm/versions/node/v12.16.1/bin:/home/user/WebstormProjects/project/node_modules/.bin..." Then I just edited my Prettier File Watcher, namely set environment variable PATH for it manually with gotten global value (Tools | File Watchers | Edit Watcher | Environment variables). That fixed this issue for me, Prettier works fine.
🌐
JetBrains
youtrack.jetbrains.com › issue › WEB-58214 › Prettier-not-working-on-save
Prettier not working on save : WEB-58214
{{ (>_<) }} This version of your browser is not supported. Try upgrading to the latest stable version. Something went seriously wrong
Find elsewhere
🌐
Code Review Videos
codereviewvideos.com › home › how i fixed: prettier not working on save in webstorm
How I Fixed: Prettier Not Working On Save In Webstorm - Code Review Videos
October 3, 2023 - From your open project in WebStorm, click File > Settings… · Then in the top left hand corner, type ‘prettier’ into the search box. This will helpfully narrow down all of the many Settings to only those that have some mention of ‘Prettier’. Now, check the ‘Automatic Prettier configuration‘ checkbox, and ‘Run on save‘. This looks like it should work.
🌐
DEV Community
dev.to › danywalls › how-to-setup-prettier-for-webstorm-3jph
How to setup prettier for WebStorm ? - DEV Community
May 9, 2022 - The good news is that Prettier it works like a charm with vscode but for WebStorm need some extra clicks.
🌐
YouTube
youtube.com › watch
How To configure Prettier in WebStorm - YouTube
Prettier is a tool to format .js, .ts, .css, .less, .scss, .vue, and .json code. With WebStorm, you can format selected code fragments as well as entire file...
Published   August 7, 2019
🌐
JetBrains
intellij-support.jetbrains.com › hc › en-us › community › posts › 360000167624-How-can-I-change-the-prettier-settings
How can I change the prettier settings? – IDEs Support (IntelliJ Platform) | JetBrains
For anyone running into this or similar issues: You have to select the entire content of the file when using "Reformat with Prettier" from the WebStorm context menu. Selecting only a part of the file won't work properly.
🌐
JetBrains
youtrack.jetbrains.com › issue › WEB-52034 › Prettier-Run-prettier-on-Reformat-doesnt-work-anymore
Run prettier on Reformat doesn't work anymore : WEB-52034
{{ (>_<) }} This version of your browser is not supported. Try upgrading to the latest stable version. Something went seriously wrong
🌐
JetBrains
intellij-support.jetbrains.com › hc › en-us › community › posts › 360000138050--Solved-prettier-doesn-t-show-up-in-settings
[Solved] prettier doesn't show up in settings – IDEs Support (IntelliJ Platform) | JetBrains
I'm still guessing this is a user error since I'm new to the platform, but I've followed the help page and can't get it to work. Does anyone know how I can get the entry to show up? ... You need installing Prettier plugin: in Settings | Plugins, ...
🌐
GitHub
github.com › prettier › prettier › issues › 6055
Not working in webstorm · Issue #6055 · prettier/prettier
September 12, 2018 - Steps to reproduce: https://prettier.io/docs/en/webstorm.html · this is my config, I am trying to run it from the global installation, same result with the local one · Pressing atl+shit+f (I have binded my keyboard with this keys sequence) nothing in happening · Expected behavior: It should work ·
Published   Apr 14, 2019
🌐
JetBrains
blog.jetbrains.com › webstorm › 2020 › 02 › webstorm-2020-1-eap-5
WebStorm 2020.1 EAP #5: Running Prettier on Save and Coding Assistance for Vuex Store Symbols | The WebStorm Blog
February 21, 2020 - With WebStorm, you can easily work with this popular tool using the Reformat with Prettier action. However, until now it’s been challenging to use Prettier to apply formatting to your files on save. To do so, you had to set up a file watcher or install a third-party plugin to make it possible to use save actions.
🌐
JetBrains
blog.jetbrains.com › webstorm › 2020 › 07 › webstorm-2020-2
WebStorm 2020.2: Use Prettier as the Default Formatter, Work with Nuxt.js, and Get Full Support for GitHub PRs | The WebStorm Blog
June 11, 2021 - We continue to make the experience of working with Prettier in WebStorm as seamless as possible. This time, we’ve made it easier to set Prettier as your default formatter, instead of the one that’s built in.
🌐
JetBrains
youtrack.jetbrains.com › issue › WEB-48577 › Webstorm-default-formatter-and-Prettier-conflict
Webstorm default formatter and Prettier conflict : WEB-48577
{{ (>_<) }} This version of your browser is not supported. Try upgrading to the latest stable version. Something went seriously wrong