VSCode Prettier Format On Save Messes Up Formatting
Been using VSCode Prettier format on save feature for a while. Lately is CONSTANTLY makes mistakes and misformats Javascript. For example: const foo = 123 [save] const foo = 1;23
Solution 1:
I do not think that there is a way to fix this. I also use Prettier on my projects, and YES sometimes it is annoying. I do not know if there are such specific configurations to solve your issue, but you cannot do anything else, except uninstalling or disabling the extension.
Remember, even if you do not choose to "prettify" your code on save, it will do it somewhen and the only option is to disable it.
UPDATE 03-05-2020
You can use the comment // prettier-ignore
in your files or nodes of code to ignore Prettier
formatting.
Reference & example: https://prettier.io/docs/en/ignore.html
Post a Comment for "VSCode Prettier Format On Save Messes Up Formatting"