-4

Trying to format code with vs code prettier plugin, but cannot find valid settings in order to format it correctly.

Following this tutorial https://reactjs.org/tutorial/tutorial.html#overview, where I need to set React code into index.js, which ends up to format problems in vscode.

If saving the file to .jsx format then it's fine, but then I get errors in the compilation phase.

Current

 return <
            div >

Expected

        return <div>
doge
  • 33
  • 5
JRii
  • 13
  • 1
  • 5

1 Answers1

0

Problem was that I had installed also another js-html etc formatter and it somehow took over from prettier.

So the fix was to uninstall that and then all worked out.

cursorrux
  • 1,382
  • 4
  • 9
  • 20
JRii
  • 13
  • 1
  • 5