Search code examples
visual-studio-codeprettier

How can I prevent the VS Code Prettier extension from addint "/** @format */" at the top of my file?


Whenever I save my file especially JavaScript or typescript files in VS Code it formats it using prettier and at the top of file it adds /** @format */. I don't want this but I want formatting to work. How do I avoid this?


Solution

  • "prettier.insertPragma": false,
    

    in settings.json.

    And make it format on save:

    enter image description here

    More reference