-1

am getting an error while saving file , in visual studio code in Java script files while saving file all code is getting jumbled up , am stuck please help vs code error file tried many extensions but am unable to solve my problem please help me

  • 4
    Don't post images of the code. Post your code right here in stackover flow – Maheer Ali Dec 22 '20 at 10:39
  • Does this answer your question? [Visual studio code changes format (React-JSX)](https://stackoverflow.com/questions/44993808/visual-studio-code-changes-format-react-jsx) – Not A Bot Dec 22 '20 at 10:56

1 Answers1

0

Looks like your formatting is all messed up. Your html(jsx) tags are formatted like this:

<
Header />

Try formatting it like this:

<Header />
Bob van 't Padje
  • 685
  • 1
  • 6
  • 17
  • i didn't do that its getting auto formatted in that way when hit save file – shaikh quadeer Dec 22 '20 at 10:42
  • Okey. This means your formatter is probably not configured correctly. Maybe you can find something here to figure out how to configure your formatter: https://code.visualstudio.com/docs/getstarted/settings. You can also take a look at prettier: https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode – Bob van 't Padje Dec 22 '20 at 11:26