title: VS Code problem: When I save, rows and spaces add automatically and destroys code
body: <p>I'm using VS code and when I save, it automatically adds extra spaces and rows in tags and other parts of the code. After I change it back to the previous syntax and save again, this problem repeats and then my code couldn't work.</p>
  
  <p><strong>Recently I changed some property in my settings, I think it is connected to a "Prettier" extension, and since then I have this problem, but I don't remember which one to enable now in order to fix it.</strong></p>
  
  <p>For example here is an original code syntax in <a href="https://i.stack.imgur.com/h4Cyu.jpg" rel="nofollow noreferrer">JS file</a>:</p>
  
  <pre><code>import React, { useState } from 'react';
  
  function App() {
    return ( null);
    &lt;div&gt;
  
    &lt;/div&gt;
  }
  
  export default App;
  </code></pre>
  
  <p>And this is what <a href="https://i.stack.imgur.com/Gq9md.jpg" rel="nofollow noreferrer">happens</a> after I save:</p>
  
  <pre><code>import React, {
    useState
  } from 'react';
  
  function App() {
    return (null); &lt;
    div &gt;
  
      &lt;
      /div&gt;
  }
  
  export default App;
  </code></pre>
  
  <p>I can't bring it back to correct syntax (delete unnecessary rows and spaces) when I change it back and save again - it does the same thing. I made changes like the offer <a href="https://stackoverflow.com/questions/43122175/automatically-hard-wrap-lines-at-column-in-vscode">here</a> (add rewrap) and <a href="https://stackoverflow.com/questions/30884131/remove-trailing-spaces-automatically-or-with-a-shortcut">there</a> (trim settings), but it didn't help.</p>
  
  <p>I tried to uninstall and then reinstall my program, but it didn't help. My VS code version doesn't have the Tools option that may help.</p>