-1

i installed the pritter extension and it doesn't work not in any language like javaScript and not in the react js project...?

Every time when i select the prettier to formate the code it doesn't do anyThing and through the error and shows a warning sign at the status bar of the VsCode. See the attached picture.

i tried the Chat gpt and youtube videos..But it doesn't work.

enter image description here

1 Answer 1

0

Install prettier in your project

npm install --save-dev --save-exact prettier or yarn add --dev --exact prettier

also, add config file in root directory

.prettierrc

example of my config:

{   "semi": true,   "trailingComma": "all",   "singleQuote": true,   "printWidth": 80,   "tabWidth": 2 }

Not the answer you're looking for? Browse other questions tagged or ask your own question.