1,688 questions
Advice
0
votes
4
replies
106
views
How can I fix the Prettier extension?
I'm using the VSCode extension called Prettier to distinguish between text strings, but it doesn't seem to be working. I was using it 10 minutes ago and it was working fine, but when I closed the ...
Score of -3
1 answer
94 views
Prettier in VS code does not format some of the files
I installed extension and configured everything. 2 .ts file are formatted on Format Document command but other are not. If I look into prettier output I see
["INFO" - 7:56:40 PM] Using local ...
Score of 0
1 answer
831 views
In cursor editor Prettier Code Formatter stopped working for jsx file
In cursor editor Prettier Code Formatter suddenly stopped working for jsx file.
When i set setting.json to this
it doesn't format files using prettier
and gives the warning below
FormattingExtension '...
Score of 0
0 answers
130 views
Why is Prettier throwing an error in my PR about tsconfig.json?
I'm trying to deploy a React application and I have a Prettier check in my PR that's failing on my tsconfig.json file.
The weird part is that when I run the exact same command locally in VS Code, I ...
Score of 3
1 answer
142 views
CSS single property auto-indent in VSCODE
How to configure VScode to keep CSS rules with only one property on a single line when autoformatting? Here is the expected result :
.p-auto { padding: auto !important; }
.px-0 {
padding-left: 0 !...
Score of 2
1 answer
209 views
How to use Prettier as beautifier of user's code? [closed]
In my project Prettier is already connected for the project code formatting. I'm trying to use Prettier for user's code formatting in Ace Editor:
import * as prettier from 'prettier';
import * as ...
Score of 1
0 answers
58 views
Configure Prettier to indent HTML attributes
What prettier does (Angular):
<button
class="drop-down"
(click)="showMenuPopup()"
tabindex="-1">
<img src="assets/dots.svg" alt="↓" /&...
Score of 4
1 answer
909 views
How to migrate my CRA .eslintrc.js config to eslint.config.js in a new Vite + React 19 app
I'm trying to set up the same ESLint configuration in my new React 19 + Vite app using the modern eslint.config.js format. However, it's not working — the linter doesn’t show any errors or warnings in ...
Score of -1
2 answers
68 views
aligned variable declaration (js) [closed]
Is there a formatter similar to Prettier that can format Node.js code with aligned variable declarations like this?
const PRICE_BUTTER = 1.00;
const PRICE_MILK=3.00;
const PRICE_EGGS=6.95;
To:
const ...
Score of 2
0 answers
293 views
how to use prettier recommended rules with eslint's defineConfig API?
I have a folder with this structure:
root
|- folderA
|- folderB
|- folderC
I want to apply two sets of rules to eslint to each folderA and folderB and completely skip folderC. so I have this:
export ...
Score of 1
1 answer
218 views
Prettier. Right new line transition for closing html tag
Please help me to configure prettier for correct new line transition of closing tag for all cases.
Prettier config:
{
"bracketSameLine": true,
"singleAttributePerLine": true,
...
Score of 1
1 answer
99 views
prettier/prettier Replace single quote with double quote to remove escape character
How do I turn this off in prettier?
error Replace `'foo \'n bar'` with `"foo 'n bar"`
prettier/prettier
In my eslint.config.ts, I already have this line:
'prettier/prettier': ['error', { ...
Score of -1
1 answer
115 views
Why Does Prettier Break `return foo(` onto a New Line Even with `printWidth = 200`?
When I format the file, Prettier breaks the line and moves return foo( to a new line.
Why is that? I’ve set printWidth = 200, and there's plenty of space to keep it on one line.
How can I stop ...
Score of 0
1 answer
163 views
How the use plugins with global configuration?
I would like to use the tailwind sorter plugin with prettier. But to specify "plugins", I have to use a local configuration file.
If I do use it, it will ignore my global prettier settings - ...
Score of 1
1 answer
683 views
Prettier from within Spotless Maven plugin can't find node executable
I'm trying to use Prettier inside the Maven Spotless plugin.
The relevant config is similar to this:
<plugin>
<groupId>com.diffplug.spotless</groupId>
<...