Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
38 views

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 !...
Merlin Chatou's user avatar
2 votes
1 answer
163 views

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 ...
user3033810's user avatar
1 vote
0 answers
49 views

What prettier does (Angular): <button class="drop-down" (click)="showMenuPopup()" tabindex="-1"> <img src="assets/dots.svg" alt="↓" /&...
fr0's user avatar
  • 1,255
3 votes
1 answer
572 views

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 ...
Jay's user avatar
  • 374
0 votes
0 answers
31 views

We are using prettier with the following config: { "attributeGroups": [ "$ANGULAR_ELEMENT_REF", "$ANGULAR_STRUCTURAL_DIRECTIVE", "$...
Dzmitry Vasilevsky's user avatar
-1 votes
2 answers
51 views

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 ...
Mehrab's user avatar
  • 19
1 vote
0 answers
191 views

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 ...
jamesdeath123's user avatar
1 vote
1 answer
139 views

Please help me to configure prettier for correct new line transition of closing tag for all cases. Prettier config: { "bracketSameLine": true, "singleAttributePerLine": true, ...
Vitaliy Kuznetsov's user avatar
0 votes
0 answers
104 views

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 ...
Jamie Nguyen's user avatar
0 votes
0 answers
44 views

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', { ...
Poly Bug's user avatar
  • 1,542
-1 votes
1 answer
98 views

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 ...
Jon's user avatar
  • 464
0 votes
1 answer
70 views

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 - ...
flowstacker's user avatar
1 vote
1 answer
400 views

I'm trying to use Prettier inside the Maven Spotless plugin. The relevant config is similar to this: <plugin> <groupId>com.diffplug.spotless</groupId> <...
Chris Williams's user avatar
0 votes
1 answer
170 views

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 ...
Edmond Hashani's user avatar
0 votes
1 answer
115 views

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://...
nicholasnet's user avatar
  • 2,317
0 votes
0 answers
115 views

Here is the problem: When I run fixer then this export class Test { public declare id: number; } transforms into this export class Test { declare public id: number; } It is a problem for me ...
EzioMercer's user avatar
  • 2,149
0 votes
0 answers
40 views

Using prettier , the code snippets files in vscode end upp having red lines because those files are json with comments. The language mode for those files in vscode is set to "Code snippets", ...
Galivan's user avatar
  • 5,388
0 votes
0 answers
33 views

As a bit of a code neat-freak, I find myself formatting my README.mds and other various markdown files too much. Often this results in me spending time reformatting an entire paragraph in order to ...
BreakfastScience's user avatar
1 vote
1 answer
780 views

I’ve got a GitHub package for my Prettier config that I use across a bunch of my projects. The config uses a plugin, and when I install the package using pnpm, it puts the plugin inside the .pnpm ...
Hamidreza's user avatar
  • 1,615
-1 votes
2 answers
376 views

I've been battling Prettier for a week and I cannot find an answer that solves my issue. My issue is the opinionated way Prettier puts all HTML opening and closing tags in JSX/TSX onto new lines. For ...
Bill Hannah's user avatar
0 votes
0 answers
61 views

I have a FunnelWeb file whose @{...@} code blocks are tangled into a Javascript program. I want to use prettier to format these code blocks while leaving the non-code FunnelWeb source unchanged. Here ...
Heiko Theißen's user avatar
0 votes
0 answers
86 views

I'm using the eslint-plugin-prettier in a Next.js project. This is what my eslint config looks like: import { FlatCompat } from "@eslint/eslintrc"; import eslintPluginPrettierRecommended ...
Kyle Angelo Gonzales's user avatar
4 votes
1 answer
934 views

I'm working on a Vite + React + TypeScript project and using ESLint with the following configuration: Relevant ESLint Config (.eslintrc.json) { "extends": [ "eslint:recommended&...
Ethan Caldwell's user avatar
0 votes
2 answers
220 views

Given a code like this import foo from 'foo'; import bar from 'bar'; Does anyone know a way of configuring either Prettier or ESLint to remove the space between imports with auto-formatting? Thank ...
Ramon Balthazar's user avatar
0 votes
0 answers
69 views

I created a custom printer for Prettier to format enum declarations in a specific way. However, when using my custom printer, all comments inside the enum are removed. I want my printer to only modify ...
ccharmai's user avatar
2 votes
1 answer
262 views

I have an .mdx file that includes a section I don't want prettier to modify: > [!CAUTION] > A word of caution (Relevant issue ticket on why I need to do this in the first place) I can add a ...
tgordon18's user avatar
  • 1,949
0 votes
0 answers
21 views

What is the correct way of extending default printers with some extra logic? My current approach is to write custom plugin which extends the current postcss printer, but it outputs error "...
sAs59's user avatar
  • 602
1 vote
2 answers
966 views

I'm using @trivago/prettier-plugin-sort-imports to automatically sort imports in my React project. The sorting works for most cases, but I'm having issues getting .css and .scss imports that doesn't ...
nop's user avatar
  • 6,617
-2 votes
2 answers
2k views

I am fairly new to ESLint, Prettier, and Babel; still learning how they work together. I am using Visual Studio Code 1.96.4, with ESLint and Prettier extensions. In one of my javascript files, I have ...
srbrills's user avatar
  • 1,619
0 votes
0 answers
47 views

errors being thrown only 6 spaces Below are the settings I currently have for Prettier: { "editor.defaultFormatter": "esbenp.prettier-vscode", "editor.formatOnType&...
Adam Xu's user avatar
0 votes
0 answers
144 views

I first tried Tailwind CSS about a years ago. Recently, I got back into Next.js development and noticed that pretty much everyone is using Tailwind now, so I figured I’d give it another shot. My issue ...
onur altuntaş's user avatar
0 votes
0 answers
507 views

I want to use com.hubspot.maven.plugins:prettier-maven-plugin with maven project and integrate Prettier Java with Intellij. Below is the maven plugin configuration: <plugin> <groupId>...
Vytautas Arminas's user avatar
0 votes
0 answers
54 views

I'm trying to create a prettier plugin, that will ignore inline TYPO3 script code. When it's included within a start en end marker. <!-- prettier-ignore-fluid-start --> <!-- prettier-ignore-...
Roger's user avatar
  • 1
3 votes
0 answers
146 views

I have this example in the Vue SFC: <template> <div> <span if=false> Feedback for the event was already sent before. <span v-else> Feedback for the event, <b&...
Jaroslav Klimčík's user avatar
0 votes
1 answer
62 views

I just have one question, currently I am using prettier and it formats on save but there are just things I don't understand that when I format the spaces or indetion are not equal. Is there a setting ...
Mr. Mark Tawin's user avatar
1 vote
0 answers
450 views

I was going through https://vueschool.io/articles/vuejs-tutorials/upgrading-eslint-from-v8-to-v9-in-vue-js/ and I am wondering why the final example configuration in the tutorial looks like this: ...
Phil's user avatar
  • 7,712
0 votes
1 answer
149 views

In my Vue project, I want to run prettier on my staged files before each commit. To do this I Installed prettier, husky and lint-staged and initialized husky with npx husky-init. Added the following ...
Julian's user avatar
  • 613
0 votes
0 answers
21 views

I am trying to give my custom DatePicker an initial value of null/make the date empty. I've tried setting the initial state to both null and undefined, but I get either a ESLint or Prettier error that ...
Delilah's user avatar
0 votes
1 answer
427 views

I am trying to convert my old eslint configuration file into the new eslint configuration, however I can't get it to work. I am suing VScode and my old setup works that it underlines the wrongly ...
Filip Studený's user avatar
1 vote
1 answer
46 views

error @click="show = true" fix @click="(show = true)" .eslintrc.js module.exports = { root: true, extends: [ 'eslint:recommended', 'plugin:vue/strongly-recommended', ...
AaronChen's user avatar
2 votes
1 answer
119 views

When saving a file that has Prettier configured as the default formatter, nothing happens and the file is not formatted. I have looked at all the similar questions related to this issue, but they all ...
upjosh's user avatar
  • 31
1 vote
1 answer
1k views

I've been having the hardest time getting linting setup in a Nuxt 3 boiler plate. My requirements: Prettier for formatting and stylistic rules ES Lint for fixing problematic patterns and code Vue ...
Drew Baker's user avatar
  • 14.5k
3 votes
1 answer
320 views

How can I fix JSON formatting issues with Prettier via ESLint. I'm trying to use @eslint/json, rather than say eslint-plugin-json, it being the official supported plugin, and in an ideal world I'd ...
Alan's user avatar
  • 56
1 vote
0 answers
176 views

I want to have autoformatting upon save on my Micro text editor that is compatible with my Visual Studio Code formatting. Here is my settings.json file for my C# .NET and WPF XAML profile: { "...
Foad S. Farimani's user avatar
0 votes
1 answer
79 views

This is very weird to me. But I face this problem when I ever I run prettier (yarn run prettier -- write) and commit the code. We are using Prettier check before running the write command. Before ...
Prasanna K's user avatar
5 votes
1 answer
3k views

I'm working on a TypeScript project and I want to configure Prettier and ESLint to automatically format my import statements when the line width exceeds the predefined printWidth rule of prettier. ...
Islam Y-'s user avatar
  • 4,030
0 votes
0 answers
665 views

I have a Vite+React project and everything was working fine. I haven't opened it for a month and now when I do open it, I see an error like this in all the components. Also, Prettier doesn't fix or ...
Pavel Astapov's user avatar
2 votes
0 answers
216 views

I am playing with prettier on my vue.ts project. (composition API) I have one file where I have to specify the type of the prop using type assertion inside template tag. Without brackets around ...
Ilya's user avatar
  • 21
1 vote
1 answer
967 views

I am trying to ignore one specific file from prettier because it messes up the format but it is not working. First I put a .prettierignore file in the directory the file is in and added * to the ...
crawlingdev's user avatar
1 vote
3 answers
157 views

In my Angular project, when I create new components, the files aren't automatically formatted. I have to manually save each file to apply formatting. Is there a way to configure this so that the files ...
fayabobo's user avatar
  • 101

1
2 3 4 5
34