Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

1 vote
0 answers
29 views

Is there any prettier rule for 'inserting spaces after opening and before closing parenthesis'?

I can achieve this in vscode by using: { "typescript.format.insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": true, "typescript.format....
Waldo Sobrino's user avatar
-1 votes
0 answers
19 views

How to enable Prettier "Format On Save" behaviour in VSCode for one source code type only?

I want to enable the Prettier (code formatter) format on save feature, but for one type of source file only. (One programming language source.) In this particular case, I only want this featured ...
user2138149's user avatar
1 vote
0 answers
57 views

Prettier in VSCode - Fails to format files

I get the follow error log while formatting the typescript file. I am using VSCode with formatting snippet extension. I have checked the doc, but cannot find any solution. ["ERROR" - 12:32:...
Lau Chun Hong's user avatar
0 votes
0 answers
31 views

ReactJS Prettier : Place Types On New Line

I am getting this error in VSCode ReactJS Typescript Prettier: Prettier is suggesting increases readability when dealing with complex or long generic types by placing the generic type on a new line, ...
mattsmith5's user avatar
  • 1,041
0 votes
2 answers
58 views

How to sort React attributes in VS Code?

For example I got: <Image alt="" src="/img/logo.svg" width="30" height="30" className="d-inline-block align-top" /> Any plugin to sort ...
aboutjquery's user avatar
0 votes
0 answers
19 views

Vscode does not format the content of nextjs into multiple lines

vscode does not format the content of nextjs into multiple lines I expected <Image alt="" src="/img/logo.svg" width="30" height="30" className="d-...
aboutjquery's user avatar
0 votes
1 answer
110 views

Why do I get an "Incorrect type" error when setting codeActionsOnSave?

I am following this doc by Wes Bos to set up both ESLint. I also wanted to make it such that the set up automatically helps me reformat my code on save. However, this part of the set up is not working....
wei bin lau's user avatar
0 votes
1 answer
30 views

Prettier included in package.json but not available in default formatter selection list

In an Angular project that I'm developing in Visual Studio Code, I have the following in package.json: "devDependencies": { "@angular-builders/custom-webpack": "^17.0.0&...
Green Grasso Holm's user avatar
0 votes
1 answer
23 views

Prettier formatting remove the space after comma in SQL

I have this query: SELECT column1,column2,column3 FROM table_stage Then I set prettier to put the comma before the value but I get this result: SELECT column1 , column2 , column3 ...
LightningStack575's user avatar
0 votes
0 answers
26 views

gap within the brackets in css in VScode

It seems that Prettier is not removing gaps in my Brackets {} in CSS in VSCode latest Version. I thought in the past it use to do it, not sure though. It formats in all other respects except removing ...
PSicurello's user avatar
0 votes
1 answer
215 views

How to configure ESLint with Prettier and TypeScript on Node 20?

I tried to configure Prettier with ESLint and create a configuration in settings.json to fix errors when saving, but the errors appear in .js files and not in .ts files. How to configure this? ...
Abner Matheus's user avatar
0 votes
1 answer
149 views

VS Code: The Svelte server crashed 5 times. Cannot find module @rollup/rollup-win32-x64-msvc

Happens when saving and Prettier tries to format the code. Can anyone help me with this error? It's driving me insane. Here's the error log: Error: Cannot find module @rollup/rollup-win32-x64-msvc. ...
Sir Rubberduck's user avatar
0 votes
1 answer
104 views

Prettier failing with "Request textDocument/rangeFormatting failed with message: js_source_text is not defined"

I'm using Prettier, along with the plugin prettier-plugin-apex in VS Code, to format Salesforce classes and Visual Force pages etc. It works (formats my docs on Save) most of the time, but now some, ...
cyberspy's user avatar
  • 1,073
0 votes
1 answer
84 views

Visual Studio Code bad formatting in vuejs

I've reinstalled my Windows again and installed Visual Studio Code along with Prettier, but it's formatting the syntax and everything else very poorly. Below is an example of how it looks and how it ...
Octavian's user avatar
1 vote
0 answers
58 views

Does anybody know how to avoid this weird format in VS Code?

I made an HTML file and when I saved it, the formatting happens, but it adds those white spaces and line jumps for whatever reason. I uninstalled VS Code and all the extensions that I had to have a ...
Roberto Gutiérrez's user avatar

15 30 50 per page
1
2 3 4 5
45