Questions tagged [prettier-vscode]
121 questions
0
votes
0 answers
Prettier (Extension) inserts {" "} when formatting document
I have been using Prettier extension for some time with Angular projects and decided to give it a try for one of my React projects.
However what I have noticed, upon formatting my .tsx files it inserts invalid objects into my code like…

Robert J.
- 2,631
- 8
- 32
- 59
0
votes
0 answers
Prettier using wrong path for .prettierignore file
My file structure is as follows:
project/
client/
.prettierrc
.prettierignore
The formatting output in VS Code looks something like this:
["INFO" - 4:31:44 PM] Formatting file:///home/user/dev/project/client/README.md
["INFO" -…

aveik
- 1
- 1
0
votes
0 answers
Different Prettier rules for viewing and saving files in VSCode
Is there a way to have differing prettier rules for when I'm looking and editing a file versus when it's saved and/or committed?
Specifically, I don't like the visual style that we have set in our .prettierrc that is in our repo. For instance it…

GusOst
- 4,105
- 3
- 19
- 28
0
votes
0 answers
How do I fix the first line to the top of the screen when vscode's saving?
enter image description here
I'm using vscode prettier, and at some point when I save the code, the end line goes up to the top of the screen. If you scroll down, the first line isn't gone, it's still there, but the end line comes up on top of the…

pilot97
- 1
- 1
0
votes
0 answers
How to make prettier format HTML like this?
What prettier rules do I need to make the formatting like this. To keep the tags on new lines and the text between them?
.col-sm-6 .col-lg-8

Luka Momcilovic
- 159
- 2
- 16
0
votes
0 answers
How do i disable prettierrc from giving a error for snake_case asking to convert it to camelCase?
I am working on a reactJS project and have added prettierrc file to maintain the coding standards.
The issue i am facing right now is a few of the identifiers are in snake_case and i need to maintain them in the same way, but prettier is flagging it…

Srinidhi Kashyap
- 1
- 1
0
votes
0 answers
Wrote a Custom Eslint Plugin To Find Duplicate Values In A Json File But It's Not Finding The Duplications
I have multiple Json files. People are writing to these files manually. I want to be able to detect the duplicate values inside each file and throw and error.
I want to utilize eslint to do this and integrate the vscode format on save and fix on…

turtur
- 1
- 1
0
votes
0 answers
Any way to stop Prettier 2.8 from forcing all classes onto a single line?
I'm using Prettier 2.8 in a Vite project with Tailwind and the Prettier-Tailwind plugin. My .prettierrc is just this:
{
"plugins": ["prettier-plugin-tailwindcss"],
"singleAttributePerLine": false,
"printWidth": 80
}
It's doing everything I…

kdsprogrammer
- 136
- 1
- 13
0
votes
1 answer
Differences between Prettier CLI and VSCode extension
I tried to align VSCode extension and my local version of Prettier CLI in my project in order to get same results from both tools.
Prettier VSCode Extension : v9.10.4 (depends on prettier >=2.8.0)
Prettier : v2.8.0
With the following settings
//…

jbltx
- 1,255
- 2
- 19
- 34
0
votes
1 answer
Prettier shows a red button and doesn't work
I am trying to format my code using Prettier, but when I try to format it by saving the file, by clicking "Format document with" or by any other way it just doesn't format and the Prettier button turns red and appears this ! icon.
I reinstalled VS…

Antônio B.
- 21
- 2
0
votes
0 answers
Is there a way to set up Prettier to work without the plugin in VSCode
I want to set up prettier to run in the project without having to install the plugin or having to run prettier smth like this:
"prettier-watch": "onchange \"**/*\" -- prettier --write --ignore-unknown {{changed}}"
in the background. Any…

Coding With Toms
- 39
- 7
0
votes
1 answer
Prettier Not Working for Rust Visual Studio Code
I installed the Rust Prettier extension: https://github.com/jinxdash/prettier-plugin-rust but it is not formatting my rust files when I save.
I see this icon in VS Code in the Status Bar at the bottom-right indicating that Prettier is disabled when…

currenthandle
- 1,038
- 2
- 17
- 34
0
votes
0 answers
Is it possible to prevent Prettier Visual Studio Code extension from indenting the head and body HMTL elements?
So, I've been using the deprecated Beautify formatting extension for VS Code for a while now, and recently decided to make the switch to Prettier. I've been struggling to find a solution to the indentation issue and I was wondering if it was even…

MrLo
- 9
0
votes
1 answer
prettier --check always fails when using VSCode prettier plugin if prettier --write has never been run when running linux project on windows
I have a very weird problem and I would be happy if anyone could (please) help :)
I have an NX project (created in a Linux env), and I'm now using it on windows.
My VSCode uses the latest prettier version -->> prettier v9.10.3.
My (monorepo NX)…

Itay
- 398
- 2
- 14
0
votes
1 answer
How do you reenable esLint squiggly lines after adding Prettier?
Description
I am trying to configure esLint to work with Prettier in VSCode. I am able to successfully install esLint, but when I add Prettier and add it to extends in the esLint config, the squiggly lines provided by esLint disappear. I have…

GeorgeCiesinski
- 191
- 1
- 3
- 11