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).
prettier
1,694
questions
-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 ...
-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 ...
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 ...
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
###...
-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 ...
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 ...
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&...
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 ...
-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 ...
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, ...
-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.
...
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 ...
-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 ...
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-...
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....