Questions tagged [prettier-vscode]
121 questions
0
votes
1 answer
Why install prettier with a package manager when we can directly use it via an extension from a text editor?
So I've been seeing many javascript and typescript tutorials recommending to install prettier. I know prettier is a must nowadays but since we can get it directly from a extension on your IDE or text editor, why would you install the package itself…

HappyDev
- 380
- 1
- 9
0
votes
1 answer
VSCode Prettier Extension vs Prettier CI (Svelte)
For some reason, my format-on-save is giving me different results than when I run the following command:
prettier --write src/pages/file.svelte`
The difference between formats is a new line being inserted with the --write command. Is there anyway…

bryan
- 8,879
- 18
- 83
- 166
0
votes
1 answer
Prettier configuration for JSX tag to be in one line
My JSX looks like this:
But I really want it to look this way:
Can anyone provide their react-prettier json

Rhythm Shandlya
- 124
- 7
0
votes
1 answer
Prettier format on save formats file but leaves changes unsaved
On save, the file is formatted as it should be, but the formatted file is left unsaved, so that I need to ctrl+s twice to actually format and save a given file.
This is a very recent issue, not sure if it just started with the latest insiders build…

Nathan Smith
- 177
- 3
- 9
0
votes
0 answers
format on save(prettier) doesn't work VScode
I have prettier installed. I can format the code by right-clicking the file and clicking the "format document", but I can't use Ctrl + S to format the code. I also set prettier as the default formatter.
"editor.formatOnSave":…

NbNb
- 11
- 2
0
votes
1 answer
What is meaning of the 2 and never param in comma-dangle?
What is the usage of this ?
"comma-dangle": [ 2, "never" ],
What is 2 and never here?

Aakash
- 1
0
votes
1 answer
Prettier is not formatting code at all in vscode
I just cloned my job reactJs project that has following .prettierrc config in /src directory
{
"arrowParens": "avoid",
"bracketSpacing": true,
"endOfLine": "auto",
"jsxBracketSameLine": false,
"printWidth": 120,
"requirePragma": true,
"semi":…

howard wolowitz
- 477
- 5
- 21
0
votes
1 answer
Prettier doesn't work whenever i switch folders i'm working on or when i restart VsCode
I have the prettier extension installed and have had it installed for quite some time, but recently I've been noticing an issue where, whenever i switch which folder i'm working in or whenever i restart VsCode, it stops working and i have to enable…

Elle
- 105
- 1
- 12
0
votes
1 answer
Prettier extension is not working after March 2021 update (version 1.55)
I set my default formatter to Prettier and the extension is not working after the update. I restarted and even reinstalled vscode and it still won't work. Please advise?

Evan B
- 567
- 1
- 4
- 6
0
votes
1 answer
What is the meaning of the double v marked(prettier) on the vscode?
What is the difference between one or two V check marks on the vscode?
In particular, what is the meaning of the double v marked?
V Checkmarks

MyungHee
- 13
- 3
0
votes
0 answers
Hot to change how prettier formats html tags
I started using prettier for formatting my html code. I really like how it formats it, but I have 1 tiny problem in how it closes a html tag.
current formatting
0
votes
0 answers
Prevent wrap to new line for objects
I tried everything in settings.json in VS-Code, but with no success.
I have an Array with objects inside and dont want it to being formatted to new line.
var testdata = [{t: Date.now()-9000,y: 0},{t: Date.now()-8000,y: 0},{t: Date.now()-7000,y:…

hermify
- 1
- 1
-1
votes
1 answer
prettier seems to not working in VScode (python)
I don't actually know how these thins work, apparently prettier explains how to make it the main formatter on their page:
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[javascript]": {
"editor.defaultFormatter":…

emre
- 13
- 5
-1
votes
1 answer
How do I format a dart file with Prettier?
Screenshot of the Error
My Terminal Output --
["ERROR" - 3:30:58 PM] Error loading node module 'c:\Users\WELCOME\OneDrive\Documents\Ecommerce Full App\eshoper-dashboard\html'
["ERROR" - 3:30:58 PM] Cannot find module…

Fsd Ramjan
- 151
- 2
- 12
-4
votes
1 answer
Why VSCODE mess up jsx format in js file?
Trying to format code with vs code prettier plugin, but cannot find valid settings in order to format it correctly.
Following this tutorial https://reactjs.org/tutorial/tutorial.html#overview, where I need to set React code into index.js, which ends…

JRii
- 13
- 1
- 5