How can i get rid of annoying autoformatting in my VS code?

1.5k Views Asked by At

I uninstalled prettier and my Format On Save is unchecked but i don't know why my codes is still auto formatted. Anybody can help me? Thank you so much! This is how it looks like: enter image description here

enter image description here

enter image description here

Btw, this is my setting.json:

{
    "java.debug.settings.stepping.skipStaticInitializers": true,
    "editor.parameterHints.enabled": false,
    "html.format.enable": false,
    "html.format.preserveNewLines": false,
    "typescript.format.insertSpaceBeforeAndAfterBinaryOperators": false,
    "typescript.format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": false,
    "typescript.format.insertSpaceAfterOpeningAndBeforeClosingEmptyBraces": false,
    "typescript.format.insertSpaceAfterKeywordsInControlFlowStatements": false,
    "typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": false,
    "typescript.format.enable": false,
    "typescript.format.insertSpaceAfterCommaDelimiter": false,
    "typescript.format.insertSpaceAfterSemicolonInForStatements": false,
    "javascript.format.enable": false
}
4

There are 4 best solutions below

0
On

Just uninstalling eslint vscode extension plugin solved my issue.

0
On

It may have been happened by wrong language mode in vscode. and this can be fixed by changing the language mode of the editor in VSCode. todo this, go to the bottom-right corner in vscode and click on name of a programming language or file type. after that a searching space will pop up. then enter the language mode you want to be in. hopefully that will help!

Peace!!

3
On

It looks like you're looking at your global settings. Check inside .vscode/settings.json to see if there is anything that sets autoformat on save to True. If there is, just delete that line altogether, it will default to your default setting.

4
On

I suspect it's not your formatter, but rather your linter. Ideally, you'd add your own lint config file so you can manage it yourself in your project.
Do you have eslint installed?

You can hover your mouse over any of the red lines and you should get a tooltip with how to fix the problem. Can you send a screenshot of that?