Skip to main content

Questions tagged [prettier]

Prettier is an opinionated code formatter for JavaScript, CSS, HTML, Markdown, and other languages. If possible, please use Prettier's Playground to illustrate your question (use the "Copy link" and "Copy markdown" buttons at the bottom right corner of the Playground).

-1 votes
0 answers
9 views

Not fully working copy & paste in formatter's online playground on mobile devices [closed]

There seem to be an issue when using the website playground when using it on a mobile device thru a web browser. The case is that after the pasted into input becomes formated, in the output the code ...
Mcgiwer's user avatar
-1 votes
0 answers
18 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 ...
FreelanceConsultant's user avatar
0 votes
0 answers
50 views

Prettier Plugins Not Found with Pre-Commit

I'm using Prettier with pre-commit to format my code before committing. However, I encountered an issue where Prettier doesn't seem to recognize the plugins. With this setup, Prettier is not able to ...
Lajos's user avatar
  • 2,737
0 votes
0 answers
45 views

Is there a way to prettify my shell script text on React

I am working on a React project and I am making a UI where it will show the shell script to the users and they can choose options from the dropdown. Example of what user see on the UI: !#/bin/bash ###...
vvv-1234's user avatar
-1 votes
0 answers
10 views

VS code the prettier extension not working and throw an error

[enter image description here](https://i.sstatic.net/oJzb13KA.jpg) I found the prettier is not working, since the prettier already installed I checked the extension turn to not installed yet but i ...
ZX-k's user avatar
  • 1
0 votes
0 answers
35 views

Prettier failed to format files

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

Prettier setting to preserve space for prettier table formatting

I made a table const transitions: any = [ /* fromState event toState callback */ t(States.zombie, Events.click, States.walk, ()=>animation("walk&...
nerkn's user avatar
  • 1,945
0 votes
0 answers
24 views

creyD/prettier_action - Process completed with exit code 128

I am having trouble in properly setting up my GitHub prettier action. I plan on using the creyD/prettier_action GitHub action to format incoming commits, but every time the code gets reviewed it ...
Adebayo Anuoluwa's user avatar
-1 votes
0 answers
17 views

jest, inline shapshots and prettier-plugin-tailwindcss

We're getting an error when using Jest v29.7.0 with inline snapshots, Prettier v2.8.8, and prettier-plugin-tailwindcss v0.6.2 installed for Prettier v3. Error [ERR_REQUIRE_ESM]: require() of ES Module ...
Piran's user avatar
  • 7,287
0 votes
0 answers
26 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 votes
0 answers
15 views

How to extract Prettier/ESLint config from a source file, without a .prettierrc file (or any other config file)?

Is there a way to analyze a file and clone its config? I have been formatting my files with deno fmt, and now I want to clone its config into Prettier because it's a requirement in another project. ...
veet's user avatar
  • 23
0 votes
0 answers
30 views

Adding CSS symbol code to Tailwind-css pseudo-elements

Not sure if this is a prettier or tailwind-css issue, but I am building a marquee component in nextjs where the content is separated by a bullet symbol with CSS code: content-['\2022']. This renders ...
Tittoh's user avatar
  • 464
-1 votes
1 answer
46 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
18 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
91 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

15 30 50 per page
1
2 3 4 5
113