Search code examples
visual-studio-code

Saving a file on VS Code is messing up the formatting


I am working on a React project using Visual Studio Code. When I press Ctrl+S in Visual Studio Code to save the file, it removes all the JavaScript formatting or scatters all the code in the file.

Any help would be appreciated.


Solution

  • You disable it "Format On Save"

    1. Press Ctrl + <
    2. Search "Format On Save" It's must be disabled. It's must be disabled