vscode: ESLint codeActionsOnSave not work

Since I updated VSCode to v1.83.0, ESLint code actions on save does not work any more, and my user settings like below:

{
  "editor.codeActionsOnSave": {
    "source.fixAll": "never",
    "source.fixAll.eslint": "always",
    "source.fixAll.stylelint": "never",
    "source.organizeImports": "never"
  }
}

About this issue

  • Original URL
  • State: closed
  • Created 9 months ago
  • Reactions: 13
  • Comments: 19 (12 by maintainers)

Most upvoted comments

{
  "editor.codeActionsOnSave": {
    "source.fixAll": false,
    "source.fixAll.eslint": true,
  }
}

This does not work for me after updating to v1.83.0.

That issue above seems to have disappeared after updating to 1.84.0-insider. The information about system and setting look like the following.

Version: 1.84.0-insider (user setup)
Commit: eb4f3c149f34d82b9763a08230907cf79e7fc103
Date: 2023-10-10T07:26:46.161Z
Electron: 25.8.4
ElectronBuildId: 24154031
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Windows_NT x64 10.0.19045
{
  "editor.codeActionsOnSave": {
    "source.fixAll": "never",
    "source.fixAll.eslint": "explicit"
  },
}

closing! fix is out in release 1.83.2!

I am having the same issue since updating to 1.83.0.

My previous settings is like (NOT work):

"editor.codeActionsOnSave": {
  "source.fixAll": false,
  "source.fixAll.eslint": true
}

When I change it to:

"editor.codeActionsOnSave": {
  "source.fixAll": true,
  "source.fixAll.eslint": true
}

It works.

fix in PR now has intended behavior: Recording 2023-10-06 at 01 32 46

Recording 2023-10-06 at 01 31 37

@recallwei I add a typo in my comment. A setting like the one you provided doesn’t work right now. What should work as a work around is

{
  "editor.codeActionsOnSave": {
    "source.fixAll": true,
    "source.fixAll.eslint": true,
  }
}

I tested it an the ESLint extension still works and in a setup with boolean values everything seem to work as expected

@jrieken @justschen something seems to get broken with ESLint code action on save. I will debug this in ESLint but this is very likely cause by a change in VS Code.