1,699 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
3
votes
2
answers
123
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 !...
2
votes
1
answer
170
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 ...
1
vote
0
answers
51
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="↓" /&...
fr0's user avatar
- 1,265
3
votes
1
answer
639
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 ...
0
votes
0
answers
31
views
Several prettier plugins for same language
We are using prettier with the following config:
{
"attributeGroups": [
"$ANGULAR_ELEMENT_REF",
"$ANGULAR_STRUCTURAL_DIRECTIVE",
"$...
-1
votes
2
answers
51
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 ...
1
vote
0
answers
215
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 ...
1
vote
1
answer
161
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,
...
0
votes
0
answers
104
views
ESLint: enforce curly braces with backticks for all JSX string props in React Native SDK 52
Goal:
I’m using React Native SDK 52 with a flat‐config ESLint setup. I want every JSX prop that’s currently a plain string:
<View className="flex gap-5 p-3" />
to be auto‐fixed into a ...
0
votes
0
answers
46
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', { ...
-1
votes
1
answer
99
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 ...
0
votes
1
answer
83
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 - ...
1
vote
1
answer
449
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>
<...
0
votes
1
answer
187
views
How to Prevent Prettier from Breaking Angular Template Object Bindings?
I'm encountering a formatting issue between Prettier and Angular's template parser. Specifically, Prettier reformats my inline Angular template in a way that introduces an NG5002 parser error during ...
0
votes
1
answer
128
views
SQL formatting inside an XML not working in Spotless using Prettier
I am trying to use Spotless formatter to format XML that have SQL in it. Like this
<?xml version="1.0" encoding="UTF-8" ?>
<databaseChangeLog
xmlns:xsi="http://...