`editor.formatOnSave` conflict with `eslint.autoFixOnSave`
See original GitHub issuetwo action result in different result, caused by prettier does not respect eslint config . CMT + SHIFT+ P -> Format Document -> Prettier formats code. Save again -> eslint autofix formats code.
// Place your settings in this file to overwrite the default settings
{
"window.zoomLevel": 1,
"gitlens.advanced.messages": {
"suppressCommitHasNoPreviousCommitWarning": false,
"suppressCommitNotFoundWarning": false,
"suppressFileNotUnderSourceControlWarning": false,
"suppressGitVersionWarning": false,
"suppressLineUncommittedWarning": false,
"suppressNoRepositoryWarning": false,
"suppressUpdateNotice": true,
"suppressWelcomeNotice": false
},
"prettier.eslintIntegration": true,
"prettier.stylelintIntegration": true,
"editor.formatOnSave": false,
"eslint.autoFixOnSave": true,
"eslint.validate": [
"javascript",
"javascriptreact",
{
"language": "vue",
"autoFix": true
},
{
"language": "html",
"autoFix": true
},
"vue"
]
}
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Formatting code and auto-fixing on save in VSCode may ...
As this GitHub issue mentions, editor.formatOnSave conflicts with eslint.autoFixOnSave . Removing the editor.formatOnSave setting (or ...
Read more >Can't get correct autoformat on save in Visual Studio Code ...
In the VS Code settings, I need: "editor.formatOnSave": false, "javascript.format.enable": false, "eslint.autoFixOnSave": true, "eslint.
Read more >How to Format Code on Save in VS Code with ESlint
eslint -config-prettier (turns off some conflicting ESLint rules). Run this command to install ESLint with Prettier: yarn add -D eslint prettier ...
Read more >How To Enable Linting on Save with Visual Studio Code ...
In this tutorial, you will install ESLint, construct rules, and enable codeActionsOnSave in Visual Studio Code.
Read more >EsLint format on save for VsCode - Venecia Calista - Medium
“eslint.autoFixOnSave”: true,. and it's done, but sadly : deprecated. So, you can add a few things : "editor.codeActionsOnSave": { "source.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

It doesn’t make sense to use both at once, as both will run the code through ESLint. You shoud either use:
or
For the latest
eslintextension, the settings should look like this: