Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
-1 votes
1 answer
69 views

Prettier code formatter does not work like what I want

Prettier getting hard to read my code, it refixed like that: let justBlackKingOverThere = pieceNameInTheBoard.map( (item) => item.slice(0, 11) == "blackKnight" ); but I want that: ...
Mustafa Utku Ergün's user avatar
0 votes
1 answer
129 views

How to edit prettier config file to match JedBrain`s Rider inbuilt formatter configuration?

Use Case In Our working environment there are developers who are using different IDEs to develop the codebase, some folks might use VSC some other use Rider, etc. The objective Each of these IDE has ...
Sergiu Nimat's user avatar
-1 votes
1 answer
193 views

Prettier removes whitespace after comma

I want a white space after a comma. But whenever I save the code, prettier removes the comma and white space. Is there any way to prevent prettier from removing white space ? Expected code: tl.to('li'...
Isanish's user avatar
0 votes
0 answers
126 views

How can I import WebStorm formatter config to VSCode Prettier?

I′m using VSCode & my co-worker use WebStorm. Our formatter behave differently and makes us confuse. Is there a way to make both formatters behave the same? How can I import WebStorm formatter ...
Mohsen Dastaran's user avatar
0 votes
0 answers
50 views

Will there be any conflicts if I have Prettier extension and Prettier NPM package?

I currently have Prettier extension (v10.1.0) installed, I would like to try and install the NPM package version (v3.0.3) of Prettier, reason is that I want to use the CLI command to format a bunch of ...
KiritoLyn's user avatar
  • 720
0 votes
1 answer
72 views

Code written in VS code in the same tag breaks in multiple lines

When I write a tag in VS Code, it automatically breaks into multiple lines. I'm using prettier as code formatter. I searched for the solution and found that setting Prettier: Print Width to 30/0 ...
Isanish's user avatar
1 vote
0 answers
344 views

How to avoid adding new line after header when formatting markdown files with Prettier

Currently when I save the file it will automatically format the file by adding new line between the header and paragraph. Is there a way to turn off that option? { "trailingComma": "...
helloworld's user avatar
0 votes
2 answers
406 views

Svelte: The formatter auto closes tags which are empty "<div/>"

I have installed Svelte for VScode and Prettier extension for my project. This issue appeared randomly after a week and only happens with .svelte files. On save, it formats empty <div></div&...
andromedstrain's user avatar
0 votes
0 answers
34 views

Prettier splits 1 60-character line of JS into 11 lines with printWidth at 2500 and singleAttributePerLine disabled?

Before Prettier: console.log(countSubTrees(4, [[0, 1],[1, 2],[0, 3]], "bbbb")); After Prettier: console.log( countSubTrees( 4, [ [0, 1], [1, 2],...
Kayvon Samavati's user avatar
0 votes
0 answers
113 views

Is "prettyhtml" the same thing as "prettier" in VS Code?

I have a Vue project. When I go into my VS Code settings, I see an extension called "Vetur". I believe Vetur is what takes care of all code formatting for me. Under settings, when I click ...
aria's user avatar
  • 51
0 votes
0 answers
169 views

Why my prettier doesn't work in react project on save?

Expected result: Applied prettier - code formatter in my react project on save. For example, I hope the semicolon can be automatically added when I save the file. add semicolon automatically when save ...
Joan's user avatar
  • 1
0 votes
2 answers
747 views

Prettier not formatting the java script code correctly

import React from "react"; export const todo = () => { return <div > todo works! < /div>; }; this is my settings.json code of Prettier, { "workbench....
jnpinu's user avatar
  • 1
0 votes
1 answer
1k views

How to get the same format for vim-prettier and vscode-prettier?

I have vim-prettier installed and also have the vscode extension for prettier installed. They format differently however. I would like to use vim-prettier to format the same way I would for vscode's ...
candrew's user avatar
  • 13
9 votes
0 answers
3k views

How do I format zsh code (something like prettier / shfmt)?

For bash and sh, there is shfmt. How do I format zsh code? I'd like to be able to set some options like in shfmt, ie: -i uint indent: 0 for tabs (default), >0 for number of spaces -bn ...
Tom Hale's user avatar
  • 45.2k
11 votes
1 answer
8k views

What does "esbenp" stand for in Prettier config in settings.json?

"editor.defaultFormatter": "esbenp.prettier-vscode", I see esbenp a lot, but it's really hard to find what it stands for. What does does it mean?
brandonwie's user avatar

15 30 50 per page