Languages

VS Code - breaking up HTML tags in JSX on save

1 points
Asked by:
Cassia
1235

VS Code keeps breaking up HTML tags in JSX on save, do you have any ideas how to fix it?

My code after saving React app:

import './App.css';

function App() {
  return ( <
    div >
    <
    /div></div >
  );
}

export default App;
1 answer
3 points
Answered by:
Cassia
1235

 Beautify extension may cause some issues with Prettier formatter.

Try to add the code below in settings.json:

"beautify.ignore": [
    "**/*.js",
    "**/*.jsx"
]

 

Where to find settings.json file:

1. Go to File -> Preferences -> Settings,

2. Search for "beautify ignore",

3. Click Edit in settings.json

0 comments Add comment
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join