prettier extension not Working in VS_Code...?

33 Views Asked by At

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

There are 1 best solutions below

0
Melynivskyi Artem On

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 }