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

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).

0 votes
0 answers
12 views

How To Unquote Numeric Properties In Vue

When assigning attributes to components in the template section of Vue, values of numeric props are placed inside quotes which tend to generate a lot of warning in the console. Even after removing ...
coochie's user avatar
  • 59
0 votes
0 answers
24 views

Error: prettier.resolveConfig is not a function (ESLint/Prettier Rule)

I'm encountering an error during linting in my React project: Error: prettier.resolveConfig is not a function Occurred while linting `path` Rule: "prettier/prettier" Those dependencies are ...
boze-noob's user avatar
  • 132
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 vote
0 answers
106 views

Update ESLint to flat config for Angular v18 app causes problems with prettier

I'm in the process of updating an Angular workspace with multiple applications from 17 to 18 and code and styling (in m2 mode) work. However, the ESLint configuration now uses the flat config and also ...
Kees de Bruin's user avatar
2 votes
2 answers
209 views

Prettier is removing typescript generic annotation from react class component

I'm trying to make an ErrorBoundary using a class component like this class ErrorBoundary extends Component<ErrorBoundaryProps,ErrorBoundaryState> But every time I format it with prettier, the ...
E C I N's user avatar
  • 101
0 votes
0 answers
12 views

Prettier ignores tab width despite settings seem correct

I have this .prettierrc with "prettier": "^3.3.3" installed (package.json): { "printWidth": 100, "useTabs": true, "tabWidth": 2, "...
Oliver Hausler'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
0 votes
0 answers
72 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,747
0 votes
0 answers
48 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 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
1 answer
12 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
30 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
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
0 answers
34 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
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

15 30 50 per page
1
2 3 4 5
113