Vscode-eslint: eslint.autoFixOnSave does not trigger consistently

Created on 16 Jan 2019  Â·  75Comments  Â·  Source: microsoft/vscode-eslint

Hi 👋

First of all, thanks a lot for your work, this plugin is amazing and I use it everyday !

Unfortunately, sometimes (as described in _eslint.autoFixOnSave doesn't always fire on save_ #283) eslint shows all file errors correctly but does not trigger the file fixes on save when the setting is correctly set in vscode settings (either in User or Workspace settings).

As asked in #283 I set the setting eslint.server.trace to "messages" and observed that when the plugin does not work as expected this lines are not shown in the trace logs:

[Trace - 3:46:33 PM] Sending request 'textDocument/willSaveWaitUntil - (2)'.
[Trace - 3:46:33 PM] Received response 'textDocument/willSaveWaitUntil - (2)' in 110ms.

They are outputted just before textDocument/didSave in the normal situation, but not when the plugin does not fixe on save.

Also, _Reload Window_ solves the issue temporarily, until it breaks again.

PS: I'm sorry because I just reload before sending this issue, so I don't have the trace logs when it does not work. I'm add them in a following comment.

Thanks in advance for your time !

bug

Most helpful comment

Happens to me all the time as well. It will work for a short while, then suddenly just stop working. My workaround is to restart vscode.

All 75 comments

@yahwastaken A more complete log would indeed help.

Can you think of anything that would help to reproduce this?

The same problem:eslint.autoFixOnSave:true does not work when I save my file with ctrl+s.
vscode version:1.30.2
vscode-eslint version:1.8.0

image

@codesboy can you provide me with a GitHub repository that demos your problem. Auto fixing does work for me. Please note that auto fix only works if VS Code's auto save is disabled.

@dbaeumer

The problem gif:

gif

My vscode User Setting:

gif2

Is this something I could reproduce myself. It is hard to say from a gif what fails.

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

Happens to me all the time as well. It will work for a short while, then suddenly just stop working. My workaround is to restart vscode.

@dbaeumer Just to say that I'm keeping watch on the logs, if it happens again, I'll paste them here :)

@kdegrace Exactly the same problems!!! Frustrating :'(

@kdegrace @kevingermain and steps how I can reproduce this. It is hard to fix without being able to reproduce.

Having the same problem here. autoFixOnSave just stops working altogether. Very sporadic it seems. I'm not seeing any output in the log either (although maybe I'm looking in the wrong place..?)

Can someone that sees this enable server tracing to find out if the corresponding messages are still sent to ESLint. To do so add the following setting:

"eslint.trace.server": "messages"

and provide the Output from the ESLint channel here. Thanks!

@dbaeumer I'm going to try to dig about it but it's a really curious issue. After starting again VS Code, I know it will work again, but for only short period of time like 10 minutes or something like that.

@dbaeumer I think I have a start of an answer! After a search and replace a string in multiple files, the autoFixOnSave is not working anymore!

hi @dbaeumer . I turned on server tracing . Here's the output:

[Trace - 9:52:42 AM] Sending request 'textDocument/codeAction - (17)'.
[Trace - 9:52:42 AM] Received notification 'textDocument/publishDiagnostics'.
[Trace - 9:52:42 AM] Received notification 'eslint/status'.
[Trace - 9:52:42 AM] Received response 'textDocument/codeAction - (17)' in 48ms.
[Trace - 9:52:42 AM] Sending request 'textDocument/codeAction - (18)'.
[Trace - 9:52:42 AM] Received response 'textDocument/codeAction - (18)' in 1ms.
[Trace - 9:52:44 AM] Sending notification 'textDocument/didSave'.

image

It's still showing lint errors, but 'autoFixOnSave' doesn't appear to be working. I can still "ctrl-." and fix the problem though.

Here's my .eslintrc config:

{
  "extends": ["airbnb", "prettier"],
  "plugins": ["prettier"],
  "env": {
    "node": true,
    "jest": true
  },
  "rules": {
    "prettier/prettier": [
      "error",
      {
        "trailingComma": "none",
        "tabWidth": 2,
        "semi": true,
        "singleQuote": true,
        "arrowParens": "always"
      }
    ],

    "comma-dangle": "off",
    "linebreak-style": ["error", "windows"],
    "no-unused-vars": ["error", { "argsIgnorePattern": "next" }],
    "no-use-before-define": ["error", { "functions": false }]
  }
}

It will sometimes start working if I reload VSCode a couple times, but then it'll stop working shortly after. Thanks

This problem was found in #623.

Is the configuration file order problem.

@jcace thanks for the trace. What is interesting is the fact the the client never sends a will save request which is necessary to trigger fix on save. The trace should look something like this:

[Trace - 12:00:43 PM] Sending request 'textDocument/willSaveWaitUntil - (5)'.
[Trace - 12:00:43 PM] Received response 'textDocument/willSaveWaitUntil - (5)' in 2ms.
[Trace - 12:00:43 PM] Sending notification 'textDocument/didChange'.
[Trace - 12:00:43 PM] Sending notification 'textDocument/didSave'.

Are you sure you have configured fix on save correctly. This requires two settings:

"files.autoSave": "off", // no fix on save with auto save on :-)
"eslint.autoFixOnSave": true

Yup, it's configured properly. Still having problems though:

  "files.autoSave": "off",
  "eslint.trace.server": "messages",
  "eslint.autoFixOnSave": true,

It really seems to depend on the project. Some projects, it works OK, but others it just won't work at all, unless I try reloading a bunch of times.

@jcace can you provide me with a GitHub repository I can clone that demos this.

I'll try to get something... Unfortunately most of our repos are private. Will let you know as we're still having the problem

I'm having this problem as well with https://github.com/reakit/reakit/tree/next

It works for several minutes (or hours? I didn't track it), then stop working. So I have to restart VSCode to work around this.

I'm having this problem... I just set up eslint/prettier with my project and it was working beautifully. In the middle of coding, it stopped, and restarting _has not helped me_ 😢

@corbfon sounds like you can reproduce it. Are you able to share the repository?

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

I'm still having this problem. But it happens randomly. It's hard to reproduce.

I think I've got something. Not sure, but now that I'm doing a bunch of refactors (using F2, which updates multiple files automatically, and then saving all files), I'm experiencing this very often (after 20 saved files or so).

Maybe this happens after x number of files have been saved?

Cleaned the output, updated and saved a file that's supposed to have error status and be automatically fixed (neither of them happened). This is the output I see on the ESLint channel.

[Trace - 14:50:39] Sending notification 'textDocument/didChange'.
[Trace - 14:50:41] Sending notification 'textDocument/didSave'.

After using Developer: Reload Window command and saving the file, I got this output (everything worked):

[Trace - 14:53:40] Sending request 'textDocument/willSaveWaitUntil - (2)'.
[Trace - 14:53:40] Received response 'textDocument/willSaveWaitUntil - (2)' in 1ms.
[Trace - 14:53:40] Sending notification 'textDocument/didChange'.
[Trace - 14:53:40] Sending notification 'textDocument/didSave'.
[Trace - 14:53:41] Received notification 'textDocument/publishDiagnostics'.
[Trace - 14:53:41] Received notification 'eslint/status'.

After a few refactors with F2, status was working, but not auto fix.

[Trace - 15:02:02] Sending request 'textDocument/willSaveWaitUntil - (3)'.
[Trace - 15:02:02] Received response 'textDocument/willSaveWaitUntil - (3)' in 2ms.
[Trace - 15:02:08] Sending notification 'textDocument/didOpen'.
[Trace - 15:02:08] Sending notification 'textDocument/didOpen'.
[Trace - 15:02:08] Sending notification 'textDocument/didChange'.
[Trace - 15:02:08] Received request 'workspace/configuration - (3)'.
[Trace - 15:02:08] Sending response 'workspace/configuration - (3)'. Processing request took 0ms
[Trace - 15:02:08] Received request 'workspace/configuration - (4)'.
[Trace - 15:02:08] Sending response 'workspace/configuration - (4)'. Processing request took 0ms
[Trace - 15:02:08] Sending notification 'textDocument/didChange'.
[Trace - 15:02:09] Sending notification 'textDocument/didChange'.
[Trace - 15:02:09] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:02:09] Received notification 'eslint/status'.
[Trace - 15:02:09] NODE_PATH value is: /usr/local/lib/node_modules
[Trace - 15:02:09] NODE_PATH value is: /usr/local/lib/node_modules
[Trace - 15:02:14] Sending request 'textDocument/willSaveWaitUntil - (4)'.
[Trace - 15:02:15] Sending notification 'textDocument/didSave'.
[Trace - 15:02:20] Sending request 'textDocument/willSaveWaitUntil - (5)'.
[Trace - 15:02:20] Sending request 'textDocument/willSaveWaitUntil - (6)'.
[Trace - 15:02:22] Sending notification 'textDocument/didSave'.
[Trace - 15:02:22] Sending notification 'textDocument/didSave'.
[Trace - 15:02:24] Sending request 'textDocument/willSaveWaitUntil - (7)'.

That Received request 'workspace/configuration is suspicious, isn't it? I didn't touch settings.

My .vscode/settings.json:

{
  "files.autoSave": "off",
  "eslint.enable": true,  
  "eslint.autoFixOnSave": true,
  "eslint.validate": [
    { "language": "javascript", "autoFix": true },
    { "language": "javascriptreact", "autoFix": true },
    { "language": "markdown", "autoFix": true },
    { "language": "typescript", "autoFix": true },
    { "language": "typescriptreact", "autoFix": true }
  ],
  "typescript.tsdk": "node_modules/typescript/lib"
}

Received request 'workspace/configuration is expected. We cache the configuration on the server per file basis. So if you open a new file or change it content on the client the file is marked as open on the server and its configuration is read. This is why you see these requests.

So this by itself doesn't explain why this stops working. What is suspicious are these:

[Trace - 15:02:14] Sending request 'textDocument/willSaveWaitUntil - (4)'.
[Trace - 15:02:20] Sending request 'textDocument/willSaveWaitUntil - (5)'.
[Trace - 15:02:20] Sending request 'textDocument/willSaveWaitUntil - (6)'.

without a corresponding response.

Did you not provide them in the comment or are they really missing? And did you save 3 files using Save All?

I copied the whole output (after cleaning), so I guess they are really missing.

I was refactoring. When I changed a symbol, vscode opened and updated the dependent files automatically. Then I saved all.

@diegohaz I created a special version of ESLint which contains more logging to see why this stops working. It is attached to this comment. Download the zip and change the extension to vsix. Then de-install the eslint extension and install the vsix using the Install from VSIX command (Ctrl+P). If you see it happening again can you provide me with the output from the ESLint channel. Thanks.

vscode-eslint-1.8.2.zip

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

@diegohaz any additional information?

Sorry for the delay. Here's the log. I'm not sure when it stopped working though.

[Trace - 15:52:55] Sending notification 'textDocument/didChange'.
[Trace - 15:52:55] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:52:55] Received notification 'eslint/status'.
[Trace - 15:52:56] Sending notification 'textDocument/didChange'.
[Trace - 15:52:56] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:52:56] Received notification 'eslint/status'.
[Trace - 15:52:56] Sending notification 'textDocument/didChange'.
[Trace - 15:52:56] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:52:56] Received notification 'eslint/status'.
[Trace - 15:52:57] Sending notification 'textDocument/didChange'.
[Trace - 15:52:57] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:52:57] Received notification 'eslint/status'.
[Trace - 15:52:58] Sending notification 'textDocument/didChange'.
[Trace - 15:52:58] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:52:58] Received notification 'eslint/status'.
[Trace - 15:52:58] Sending notification 'textDocument/didChange'.
[Trace - 15:52:59] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:52:59] Received notification 'eslint/status'.
[Trace - 15:55:52] Sending notification 'textDocument/didOpen'.
[Trace - 15:55:52] Received request 'workspace/configuration - (36)'.
[Trace - 15:55:52] Sending response 'workspace/configuration - (36)'. Processing request took 0ms
[Trace - 15:55:52] NODE_PATH value is: /usr/local/lib/node_modules
[Trace - 15:55:52] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:55:52] Received notification 'eslint/status'.
[Trace - 15:56:36] Sending notification 'textDocument/didClose'.
[Trace - 15:56:36] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:56:36] Sending notification 'textDocument/didOpen'.
[Trace - 15:56:36] Received request 'workspace/configuration - (37)'.
[Trace - 15:56:36] Sending response 'workspace/configuration - (37)'. Processing request took 0ms
[Trace - 15:56:36] NODE_PATH value is: /usr/local/lib/node_modules
[Trace - 15:56:37] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:56:37] Received notification 'eslint/status'.
[Trace - 15:56:40] Sending notification 'textDocument/didOpen'.
[Trace - 15:56:40] Received request 'workspace/configuration - (38)'.
[Trace - 15:56:40] Sending response 'workspace/configuration - (38)'. Processing request took 0ms
[Trace - 15:56:40] NODE_PATH value is: /usr/local/lib/node_modules
[Trace - 15:56:42] Sending notification 'textDocument/didChange'.
[Trace - 15:56:42] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:56:42] Received notification 'eslint/status'.
[Trace - 15:56:44] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:56:44] Received notification 'eslint/status'.
[Trace - 15:56:46] Sending notification 'textDocument/didChange'.
[Trace - 15:56:47] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:56:47] Received notification 'eslint/status'.
[Trace - 15:56:49] Sending notification 'textDocument/didChange'.
[Trace - 15:56:51] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:56:51] Received notification 'eslint/status'.
[Trace - 15:56:52] Sending notification 'textDocument/didChange'.
[Trace - 15:56:52] Sending notification 'textDocument/didChange'.
[Trace - 15:56:53] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:56:53] Received notification 'eslint/status'.
[Trace - 15:56:54] Sending notification 'textDocument/didChange'.
[Trace - 15:56:54] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:56:54] Received notification 'eslint/status'.
[Trace - 15:56:55] Sending notification 'textDocument/didChange'.
[Trace - 15:56:56] Sending notification 'textDocument/didChange'.
[Trace - 15:56:56] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:56:56] Received notification 'eslint/status'.
[Trace - 15:56:57] Sending notification 'textDocument/didChange'.
[Trace - 15:56:57] Sending notification 'textDocument/didChange'.
[Trace - 15:56:58] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:56:58] Received notification 'eslint/status'.
[Trace - 15:56:58] Sending notification 'textDocument/didChange'.
[Trace - 15:56:59] Sending notification 'textDocument/didChange'.
[Trace - 15:56:59] Sending notification 'textDocument/didChange'.
[Trace - 15:56:59] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:56:59] Received notification 'eslint/status'.
[Trace - 15:57:00] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:57:00] Received notification 'eslint/status'.
[Trace - 15:57:01] Sending notification 'textDocument/didChange'.
[Trace - 15:57:02] Sending notification 'textDocument/didChange'.
[Trace - 15:57:03] Sending notification 'textDocument/didChange'.
[Trace - 15:57:03] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:57:03] Received notification 'eslint/status'.
[Trace - 15:57:03] Sending notification 'textDocument/didChange'.
[Trace - 15:57:04] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:57:04] Received notification 'eslint/status'.
[Trace - 15:57:05] Sending notification 'textDocument/didChange'.
[Trace - 15:57:06] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:57:06] Received notification 'eslint/status'.
[Trace - 15:57:07] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:57:07] Received notification 'eslint/status'.
[Trace - 15:57:11] Sending notification 'textDocument/didChange'.
[Trace - 15:57:12] Sending notification 'textDocument/didChange'.
[Trace - 15:57:13] Sending notification 'textDocument/didChange'.
[Trace - 15:57:13] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:57:13] Received notification 'eslint/status'.
[Trace - 15:57:14] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:57:14] Received notification 'eslint/status'.
[Trace - 15:57:15] Sending notification 'textDocument/didChange'.
[Trace - 15:57:15] Sending notification 'textDocument/didChange'.
[Trace - 15:57:16] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:57:16] Received notification 'eslint/status'.
[Trace - 15:57:17] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:57:17] Received notification 'eslint/status'.
[Trace - 15:57:18] Sending request 'textDocument/codeAction - (531)'.
[Trace - 15:57:18] Received response 'textDocument/codeAction - (531)' in 2ms.
[Trace - 15:57:19] Sending notification 'textDocument/didSave'.
[Trace - 15:57:22] Sending request 'textDocument/codeAction - (532)'.
[Trace - 15:57:22] Received response 'textDocument/codeAction - (532)' in 1ms.
[Trace - 15:57:23] Sending notification 'textDocument/didChange'.
[Trace - 15:57:23] Sending notification 'textDocument/didChange'.
[Trace - 15:57:23] Sending request 'textDocument/codeAction - (533)'.
[Trace - 15:57:24] Sending notification 'textDocument/didChange'.
[Trace - 15:57:24] Sending request 'textDocument/codeAction - (534)'.
[Trace - 15:57:24] Sending notification '$/cancelRequest'.
[Trace - 15:57:24] Sending request 'textDocument/codeAction - (535)'.
[Trace - 15:57:24] Sending notification '$/cancelRequest'.
[Trace - 15:57:25] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:57:25] Received notification 'eslint/status'.
[Trace - 15:57:25] Sending request 'textDocument/codeAction - (536)'.
[Trace - 15:57:25] Sending notification '$/cancelRequest'.
[Trace - 15:57:26] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:57:26] Received notification 'eslint/status'.
[Trace - 15:57:26] Received response 'textDocument/codeAction - (533)' in 2401ms. Request failed: Request got cancelled (-32800).
[Trace - 15:57:26] Sending notification '$/cancelRequest'.
[Trace - 15:57:26] Sending notification 'textDocument/didChange'.
[Trace - 15:57:27] Sending notification 'textDocument/didChange'.
[Trace - 15:57:27] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:57:27] Received notification 'eslint/status'.
[Trace - 15:57:27] Received response 'textDocument/codeAction - (534)' in 3079ms.
[Trace - 15:57:27] Received response 'textDocument/codeAction - (535)' in 2563ms.
[Trace - 15:57:27] Received response 'textDocument/codeAction - (536)' in 2052ms.
[Trace - 15:57:27] Sending request 'textDocument/codeAction - (537)'.
[Trace - 15:57:28] Sending notification '$/cancelRequest'.
[Trace - 15:57:28] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:57:28] Received notification 'eslint/status'.
[Trace - 15:57:28] Received response 'textDocument/codeAction - (537)' in 676ms.
[Trace - 15:57:41] Sending notification 'textDocument/didChange'.
[Trace - 15:57:41] Sending notification 'textDocument/didChange'.
[Trace - 15:57:42] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:57:42] Received notification 'eslint/status'.
[Trace - 15:57:43] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:57:43] Received notification 'eslint/status'.
[Trace - 15:57:44] Sending notification 'textDocument/didChange'.
[Trace - 15:57:45] Sending notification 'textDocument/didChange'.
[Trace - 15:57:45] Sending notification 'textDocument/didChange'.
[Trace - 15:57:46] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:57:46] Received notification 'eslint/status'.
[Trace - 15:57:46] Sending request 'textDocument/codeAction - (538)'.
[Trace - 15:57:47] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:57:47] Received notification 'eslint/status'.
[Trace - 15:57:47] Received response 'textDocument/codeAction - (538)' in 1079ms.
[Trace - 15:57:47] Sending notification 'textDocument/didChange'.
[Trace - 15:57:49] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:57:49] Received notification 'eslint/status'.
[Trace - 15:57:51] Sending notification 'textDocument/didChange'.
[Trace - 15:57:53] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:57:53] Received notification 'eslint/status'.
[Trace - 15:58:01] Sending notification 'textDocument/didChange'.
[Trace - 15:58:02] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:58:02] Received notification 'eslint/status'.
[Trace - 15:58:06] Sending notification 'textDocument/didChange'.
[Trace - 15:58:07] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:58:07] Received notification 'eslint/status'.
[Trace - 15:58:08] Sending notification 'textDocument/didChange'.
[Trace - 15:58:08] Sending notification 'textDocument/didChange'.
[Trace - 15:58:09] Sending notification 'textDocument/didChange'.
[Trace - 15:58:09] Sending notification 'textDocument/didChange'.
[Trace - 15:58:09] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:58:09] Received notification 'eslint/status'.
[Trace - 15:58:10] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:58:10] Received notification 'eslint/status'.
[Trace - 15:58:11] Sending notification 'textDocument/didChange'.
[Trace - 15:58:11] Sending request 'textDocument/codeAction - (539)'.
[Trace - 15:58:12] Sending notification 'textDocument/didChange'.
[Trace - 15:58:12] Sending request 'textDocument/codeAction - (540)'.
[Trace - 15:58:12] Sending notification '$/cancelRequest'.
[Trace - 15:58:13] Sending notification 'textDocument/didChange'.
[Trace - 15:58:13] Sending request 'textDocument/codeAction - (541)'.
[Trace - 15:58:13] Sending notification '$/cancelRequest'.
[Trace - 15:58:13] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:58:13] Received notification 'eslint/status'.
[Trace - 15:58:13] Received response 'textDocument/codeAction - (539)' in 1189ms.
[Trace - 15:58:13] Sending notification 'textDocument/didChange'.
[Trace - 15:58:13] Sending notification '$/cancelRequest'.
[Trace - 15:58:14] Sending notification 'textDocument/didChange'.
[Trace - 15:58:14] Sending notification 'textDocument/didChange'.
[Trace - 15:58:15] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:58:15] Received notification 'eslint/status'.
[Trace - 15:58:15] Received response 'textDocument/codeAction - (540)' in 2445ms.
[Trace - 15:58:15] Sending notification 'textDocument/didChange'.
[Trace - 15:58:16] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:58:16] Received notification 'eslint/status'.
[Trace - 15:58:16] Received response 'textDocument/codeAction - (541)' in 2999ms.
[Trace - 15:58:16] Sending notification 'textDocument/didChange'.
[Trace - 15:58:17] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:58:17] Received notification 'eslint/status'.
[Trace - 15:58:17] Sending notification 'textDocument/didChange'.
[Trace - 15:58:17] Sending notification 'textDocument/didChange'.
[Trace - 15:58:18] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:58:18] Received notification 'eslint/status'.
[Trace - 15:58:18] Sending notification 'textDocument/didChange'.
[Trace - 15:58:19] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:58:19] Received notification 'eslint/status'.
[Trace - 15:58:19] Sending notification 'textDocument/didChange'.
[Trace - 15:58:20] Sending notification 'textDocument/didChange'.
[Trace - 15:58:20] Sending notification 'textDocument/didChange'.
[Trace - 15:58:21] Sending notification 'textDocument/didChange'.
[Trace - 15:58:21] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:58:21] Received notification 'eslint/status'.
[Trace - 15:58:22] Sending notification 'textDocument/didChange'.
[Trace - 15:58:22] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:58:22] Received notification 'eslint/status'.
[Trace - 15:58:23] Sending notification 'textDocument/didChange'.
[Trace - 15:58:24] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:58:24] Sending notification 'textDocument/didChange'.
[Trace - 15:58:24] Received notification 'eslint/status'.
[Trace - 15:58:24] Sending notification 'textDocument/didChange'.
[Trace - 15:58:25] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:58:25] Received notification 'eslint/status'.
[Trace - 15:58:25] Sending request 'textDocument/codeAction - (542)'.
[Trace - 15:58:26] Sending request 'textDocument/codeAction - (543)'.
[Trace - 15:58:26] Sending notification '$/cancelRequest'.
[Trace - 15:58:26] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:58:26] Received notification 'eslint/status'.
[Trace - 15:58:26] Received response 'textDocument/codeAction - (542)' in 741ms.
[Trace - 15:58:26] Received response 'textDocument/codeAction - (543)' in 305ms.
[Trace - 15:58:26] Sending notification 'textDocument/didChange'.
[Trace - 15:58:27] Sending notification 'textDocument/didSave'.
[Trace - 15:58:28] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:58:28] Received notification 'eslint/status'.
[Trace - 15:58:28] Sending request 'textDocument/codeAction - (544)'.
[Trace - 15:58:28] Received response 'textDocument/codeAction - (544)' in 6ms.
[Trace - 15:58:28] Sending notification 'textDocument/didChange'.
[Trace - 15:58:28] Sending request 'textDocument/codeAction - (545)'.
[Trace - 15:58:29] Sending notification '$/cancelRequest'.
[Trace - 15:58:29] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:58:29] Received notification 'eslint/status'.
[Trace - 15:58:29] Received response 'textDocument/codeAction - (545)' in 1283ms.
[Trace - 15:58:30] Sending notification 'textDocument/didChange'.
[Trace - 15:58:31] Sending notification 'textDocument/didChange'.
[Trace - 15:58:32] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:58:32] Received notification 'eslint/status'.
[Trace - 15:58:32] Sending notification 'textDocument/didSave'.
[Trace - 15:58:33] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:58:33] Received notification 'eslint/status'.
[Trace - 15:58:37] Sending notification 'textDocument/didChange'.
[Trace - 15:58:38] Sending notification 'textDocument/didSave'.
[Trace - 15:58:38] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:58:38] Received notification 'eslint/status'.
[Trace - 15:58:39] Sending request 'textDocument/codeAction - (546)'.
[Trace - 15:58:39] Received response 'textDocument/codeAction - (546)' in 2ms.
[Trace - 15:58:44] Sending notification 'textDocument/didChange'.
[Trace - 15:58:44] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:58:44] Received notification 'eslint/status'.
[Trace - 15:58:44] Sending notification 'textDocument/didSave'.
[Trace - 15:59:06] Sending notification 'textDocument/didChange'.
[Trace - 15:59:07] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:59:07] Received notification 'eslint/status'.
[Trace - 15:59:08] Sending notification 'textDocument/didChange'.
[Trace - 15:59:08] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:59:08] Received notification 'eslint/status'.
[Trace - 15:59:08] Sending notification 'textDocument/didSave'.
[Trace - 15:59:11] Sending notification 'textDocument/didChange'.
[Trace - 15:59:11] Received notification 'textDocument/publishDiagnostics'.
[Trace - 15:59:11] Received notification 'eslint/status'.
[Trace - 15:59:11] Sending notification 'textDocument/didSave'.

Edit: happened again

[Trace - 18:57:56] Received notification 'eslint/status'.
[Trace - 18:57:57] Sending notification 'textDocument/didChange'.
[Trace - 18:57:57] Received notification 'textDocument/publishDiagnostics'.
[Trace - 18:57:57] Received notification 'eslint/status'.
[Trace - 18:57:58] Sending notification 'textDocument/didChange'.
[Trace - 18:57:59] Sending notification 'textDocument/didChange'.
[Trace - 18:57:59] Sending request 'textDocument/willSaveWaitUntil - (480)'.
[Trace - 18:58:01] Sending notification 'textDocument/didChange'.
[Trace - 18:58:01] Sending notification 'textDocument/didSave'.
[Trace - 18:58:01] Received notification 'textDocument/publishDiagnostics'.
[Trace - 18:58:01] Received notification 'eslint/status'.
[Trace - 18:58:01] Received response 'textDocument/willSaveWaitUntil - (480)' in 1994ms.
[Trace - 18:58:01] Received notification 'textDocument/publishDiagnostics'.
[Trace - 18:58:01] Received notification 'eslint/status'.
[Trace - 18:58:02] Sending notification 'textDocument/didChange'.
[Trace - 18:58:02] Received notification 'textDocument/publishDiagnostics'.
[Trace - 18:58:02] Received notification 'eslint/status'.
[Trace - 18:58:05] Sending notification 'textDocument/didChange'.
[Trace - 18:58:05] Received notification 'textDocument/publishDiagnostics'.
[Trace - 18:58:05] Received notification 'eslint/status'.
[Trace - 18:58:06] Sending notification 'textDocument/didSave'.
[Trace - 18:58:07] Sending request 'textDocument/codeAction - (481)'.
[Trace - 18:58:07] Received response 'textDocument/codeAction - (481)' in 2ms.
[Trace - 18:58:07] Sending notification 'textDocument/didChange'.
[Trace - 18:58:08] Received notification 'textDocument/publishDiagnostics'.
[Trace - 18:58:08] Sending notification 'textDocument/didSave'.
[Trace - 18:58:08] Received notification 'eslint/status'.
[Trace - 18:58:09] Sending notification 'textDocument/didChange'.
[Trace - 18:58:09] Received notification 'textDocument/publishDiagnostics'.
[Trace - 18:58:09] Received notification 'eslint/status'.
[Trace - 18:58:09] Sending notification 'textDocument/didSave'.
[Trace - 18:58:11] Sending request 'textDocument/codeAction - (482)'.
[Trace - 18:58:11] Received response 'textDocument/codeAction - (482)' in 2ms.
[Trace - 18:58:14] Sending notification 'textDocument/didChange'.
[Trace - 18:58:14] Received notification 'textDocument/publishDiagnostics'.
[Trace - 18:58:14] Received notification 'eslint/status'.
[Trace - 18:58:16] Sending notification 'textDocument/didSave'.

@diegohaz thanks for the additional information. It indeed helps. So I think what is happening is the following:

  • there is a time budget in VS Code for the willSaveWaitUntil hook of 1.5 sec
  • if you violate it three times it is not called anymore.
  • there is an entry [Trace - 18:58:01] Received response 'textDocument/willSaveWaitUntil - (480)' in 1994ms. after which the fixing stops working which took 1994 ms.

Fixing this is not easy since the VS Code time budget is fixed and not dependent on file size. The thing I can look into is to turn this into code actions which at least have a setting so users can increase the budget. This is not possible for the will save hook.

A way to disable/change the willSaveWaitUntil would be appreciated!

@CobraClutch you can disable autofix. But there is no setting in VS Code to increase the time budget.

Right. My comment was a +1 for your previous comment on May 6: to add a setting to increase the time budget.

I'm having the exact same issue. I tried disabling all extensions (apart from eslint) and tried numerous user settings configs to try to get it to work. Mine does format on save, but doesn't work for a specific setting (max-len). eslint is aware of the max-len error (see image), but nothing I do enables it to actually format on save or process a fix.

Screen Shot 2019-08-01 at 11 58 42

I used to have prettier installed with eslint and the format on save worked fine via prettier config; maybe look into their implementation to see how this package differs?

My .eslintrc.js

module.exports = {
  root: true,
  extends: '@react-native-community',
  rules: {
    "prettier/prettier": "off",
    "max-len": [1, { "code": 80 }],
  }
};

My complete vscode user settings.json (no workspace)

{
  // "[html]": {
  //   "editor.defaultFormatter": "esbenp.prettier-vscode"
  // }
  "[json]": {
    "editor.formatOnSave": false
  },
  // "[typescript]": {
  //   "editor.defaultFormatter": "esbenp.prettier-vscode"
  // },
  "auto-close-tag.activationOnLanguage": [
    "html",
    "xml",
    "javascript"
  ],
  "breadcrumbs.enabled": true,
  "css.fileExtensions": [
    "css",
    "scss",
    "ts"
  ],
  "debug.node.autoAttach": "on",
  // "editor.defaultFormatter": "esbenp.prettier-vscode",
  "editor.detectIndentation": false,
  "editor.fontSize": 16,
  "editor.formatOnPaste": false,
  "editor.formatOnSave": true,
  "editor.multiCursorModifier": "ctrlCmd",
  "editor.quickSuggestionsDelay": 1,
  "editor.rulers": [
    80,
    100
  ],
  "editor.snippetSuggestions": "top",
  "editor.tabSize": 2,
  "editor.tokenColorCustomizations": {
    "[Monokai]": {
      "textMateRules": [
        {
          "scope": "variable.object.property.ts, meta.object-binding-pattern-variable.ts, source.ts !punctuation.terminator.statement.ts, !punctuation.destructuring.ts",
          "settings": {
            "fontStyle": "",
            "foreground": "#ff5e00"
          }
        }
      ]
    }
  },
  "editor.wordWrap": "on",
  "emmet.includeLanguages": {
    "html": "html",
    "javascript": "javascriptreact html jsx"
  },
  "emmet.showSuggestionsAsSnippets": true,
  "emmet.syntaxProfiles": {
    "javascript": "jsx"
  },
  "emmet.triggerExpansionOnTab": true,
  "eslint.autoFixOnSave": true,
  "eslint.options": {
    "extensions": [
      ".html",
      ".js",
      ".vue",
      ".jsx"
    ]
  },
  "eslint.validate": [
    {
      "language": "javascript",
      "autoFix": true
    },
    {
      "language": "javascriptreact",
      "autoFix": true
    },
    {
      "language": "markdown",
      "autoFix": true
    },
    {
      "language": "typescript",
      "autoFix": true
    },
    {
      "language": "typescriptreact",
      "autoFix": true
    }
  ],
  "explorer.confirmDelete": false,
  "explorer.confirmDragAndDrop": false,
  "files.associations": {
    "*.pcss": "scss"
  },
  "files.autoSave": "off",
  "files.exclude": {
    "**/HTMLStudyNotes.*": true
  },
  "git.autofetch": true,
  "git.confirmSync": false,
  "git.enableSmartCommit": true,
  "javascript.format.enable": false,
  "javascript.implicitProjectConfig.checkJs": true,
  "javascript.validate.enable": false,
  "peacock.favoriteColors": [
    {
      "name": "Angular Red",
      "value": "#b52e31"
    },
    {
      "name": "Auth0 Orange",
      "value": "#eb5424"
    },
    {
      "name": "Azure Blue",
      "value": "#007fff"
    },
    {
      "name": "C# Purple",
      "value": "#68217A"
    },
    {
      "name": "Gatsby Purple",
      "value": "#639"
    },
    {
      "name": "Go Cyan",
      "value": "#5dc9e2"
    },
    {
      "name": "Java Blue-Gray",
      "value": "#557c9b"
    },
    {
      "name": "JavaScript Yellow",
      "value": "#f9e64f"
    },
    {
      "name": "Mandalorian Blue",
      "value": "#1857a4"
    },
    {
      "name": "Node Green",
      "value": "#215732"
    },
    {
      "name": "React Blue",
      "value": "#00b3e6"
    },
    {
      "name": "Something Different",
      "value": "#832561"
    },
    {
      "name": "Vue Green",
      "value": "#42b883"
    }
  ],
  // "prettier.printWidth": 100,
  // "prettier.semi": true,
  // "prettier.singleQuote": true,
  // "prettier.trailingComma": "all",
  // "prettier.tslintIntegration": true,
  "sync.askGistName": false,
  "sync.autoDownload": false,
  "sync.autoUpload": false,
  "sync.forceDownload": false,
  "sync.gist": "f7881b8de45e15c2822b497baf8210a0",
  "sync.quietSync": false,
  "sync.removeExtensions": true,
  "sync.syncExtensions": true,
  "telemetry.enableCrashReporter": false,
  "terminal.integrated.fontFamily": "Inconsolata for Powerline",
  "terminal.integrated.fontSize": 16,
  "terminal.integrated.rendererType": "dom",
  "todohighlight.keywords": [
    {
      "backgroundColor": "#1100ff",
      "text": "INFO:"
    }
  ],
  "window.zoomLevel": 0,
  "workbench.activityBar.visible": true,
  "workbench.colorTheme": "Monokai",
  "workbench.editor.enablePreview": true,
  "workbench.statusBar.visible": true
}

MacOS: 10.14.5
vscode version: 1.36.1
vscode-eslint version: 1.9.0

@dbaeumer would it be worthwhile for users with this issue to make their settings sync gist public and share it here to find commonalities among affected users?

@argarner can you provide me with a GitHub repository that I can clone that demos this. Trying to setup stuff like this mostly fails since I will have some minor difference which will then make it work.

As long as "plugins": ["markdown"] added, it can't be repaired automatically.

I'm having the same problem. Interesting fact is that it NEVER autofixes .ts files after save (and yes, I enabled it in settings, calling autofix manually works), but it always works for .js files. Similar symptoms as above, for .ts files I only see this in output:

[Trace - 6:39:42 PM] Sending notification 'textDocument/didSave'.

For regular .js files:

[Trace - 6:40:33 PM] Sending request 'textDocument/willSaveWaitUntil - (4)'.
[Trace - 6:40:33 PM] Received response 'textDocument/willSaveWaitUntil - (4)' in 1ms.
[Trace - 6:40:33 PM] Sending notification 'textDocument/didChange'.
[Trace - 6:40:33 PM] Sending notification 'textDocument/didSave'.
[Trace - 6:40:33 PM] Received notification 'textDocument/publishDiagnostics'.
[Trace - 6:40:33 PM] Received notification 'eslint/status'.

Edit:
Looks like I've found the problem, it was this setting in settings.json:

"[typescript]": {
    "editor.defaultFormatter": "vscode.typescript-language-features"
  }

After removing this editor.defaultFormatter - autofix works like a charm, and willSaveWaitUntil is showing in output.

@argarner can you provide me with a GitHub repository that I can clone that demos this. Trying to setup stuff like this mostly fails since I will have some minor difference which will then make it work.

Sure @dbaeumer, clone this repo, and see line 24 in the TextInputField.js

I've added files with my vscode settings in the latest commit.

After removing this editor.defaultFormatter - autofix works like a charm, and willSaveWaitUntil is showing in output.

I discovered it works with editor.defaultFormatter, you just have to add

"eslint.validate": [
  { "language": "typescript", "autoFix": true },
  { "language": "typescriptreact" , "autoFix": true} // If you use React
]

So the combination of autoFixOnSave and autoFix works, don't know why though.

I met same problem, it solved by @verbumfeit 's solution. Thanks a lot verbumfeit !

I've been experiencing the same problem, roughly every second save eslint works. However, I've been able to mitigate that by changing my settings to formatOnSave: false. Now it appears to be more stable... though I'm not sure what knock-on consequences there might be.

Sadly, as for everyone else, I can't share my full repo. However, before changing formatOnSave, I got these logs:

[Trace - 08:47:46] Sending notification 'textDocument/didChange'.
[Trace - 08:47:46] Sending request 'textDocument/willSaveWaitUntil - (348)'.
[Trace - 08:47:46] Received notification 'textDocument/publishDiagnostics'.
[Trace - 08:47:46] Received notification 'eslint/status'.
[Trace - 08:47:46] Received response 'textDocument/willSaveWaitUntil - (348)' in 146ms.
[Trace - 08:47:46] Sending notification 'textDocument/didChange'.
[Trace - 08:47:46] Sending notification 'textDocument/didSave'.
[Trace - 08:47:47] Received notification 'textDocument/publishDiagnostics'.
[Trace - 08:47:47] Received notification 'eslint/status'.

result: eslint rules applied

[Trace - 08:48:09] Sending notification 'textDocument/didChange'.
[Trace - 08:48:10] Received notification 'textDocument/publishDiagnostics'.
[Trace - 08:48:10] Received notification 'eslint/status'.
[Trace - 08:48:10] Sending notification 'textDocument/didChange'.
[Trace - 08:48:10] Sending request 'textDocument/willSaveWaitUntil - (350)'.
[Trace - 08:48:10] Received notification 'textDocument/publishDiagnostics'.
[Trace - 08:48:10] Received notification 'eslint/status'.
[Trace - 08:48:10] Received response 'textDocument/willSaveWaitUntil - (350)' in 129ms.
[Trace - 08:48:10] Sending notification 'textDocument/didSave'.

result: eslint rules not applied

With formatOnSave: false I consistently only get the first set of logs.

Hope this helps.

Disable to default formatter of vs code and it will work.

Screenshot 2019-10-10 at 12 24 41 PM

Disable to default formatter of vs code and it will work.

Screenshot 2019-10-10 at 12 24 41 PM

nope..

I same problem . cannot fix? why eslint cannot auto fix on save?
My config:

{
  "eslint.validate": [
    {
      "language": "vue",
      "autoFix": true
    },
    {
      "language": "javascript",
      "autoFix": true
    },
    {
      "language": "javascriptreact",
      "autoFix": true
    }
  ],
  "eslint.autoFixOnSave": true,
  "editor.formatOnSave": false,
  "javascript.format.enable": false,
  "vetur.validation.template": false
}

here my setting. i worked. please try my code.

{
    "editor.largeFileOptimizations": false,
    "files.associations": {
        "*.vue": "vue"
    },
    "eslint.validate": [
        "javascript",
        "javascriptreact",
        {
            "language": "vue",
            "autoFix": true
        }
    ],
    "eslint.autoFixOnSave": true,
    "editor.formatOnSave": false
}

@stone89son can you please specify in which file you placed this? It still doesn't work for me

@stone89son can you please specify in which file you placed this? It still doesn't work for me

teamview. i can help you.

@stone89son can you please specify in which file you placed this? It still doesn't work for me

teamview. i can help you.

Thank you but this is a corporate system so I can't, furthermore, it may help others to have the full instructions listed here :)

@stone89son can you please specify in which file you placed this? It still doesn't work for me

teamview. i can help you.

Thank you but this is a corporate system so I can't, furthermore, it may help others to have the full instructions listed here :)

on Window OS is worked, but I change to Ubuntu 18, it cannot work. :(

@stone89son I'm on windows and it still doesn't work

Doesn't work for me either. It works when I restart VSCode, then at some point, stops working and I have to restart again...

Confirming that this issue persists. If you restart VScode it will work for a bit of time!

I've opened a thread on the VSCode repository (https://github.com/microsoft/vscode/issues/84049) to try to open the discussion regarding the time budget. This issue along with https://github.com/microsoft/vscode-eslint/issues/154 leads me to think that the problem is deeper than just vscode-eslint (although it's certainly a prime example).

This will be addressed with the next version of ESLint. Parts are already in master.

Following options are working.

Extending @verbumfeit answer:

"eslint.alwaysShowStatus": true,
  "eslint.autoFixOnSave": true,
  "eslint.validate": [
    {
      "language": "javascript",
      "autoFix": true
    },
    {
      "language": "javascriptreact",
      "autoFix": true
    },
    {
      "language": "vue",
      "autoFix": true
    },
    {
      "language": "vue-html",
      "autoFix": true
    },
  ],

eslint is installed locally, also this is a nuxtjs project and I have extra nuxt/plugins and module installed.

For anyone having troubles with eslint, make sure the folder in your workspace is the root of your project. Adding a folder that is not the root of the project makes eslint server look at that instead of your project and can't load.

Eg. If add a folder that contains many projects you won't get linting or formatting unless you add an eslintrc file to it. Just add project folders separately so that eslint serve will run for each projetc.
I hope this explains the solution well.

@asherccohen you can multi folder setups work using the eslint.workingDirectories setting.

This got addressed in the new 2.0.4 version. Please note that in that version auto fix on save is enabled using the editor.codeActionsOnSave setting.

I added "editor.codeActionsOnSaveTimeout": 2000 to my config and it successfuly formated the problematic piece without even reloading the app.

From eslint plugin description:
"Also note that there is a time budget of 750ms to run code actions on save which might not be enough for large JavaScript / TypeScript file. You can increase the time budget using the editor.codeActionsOnSaveTimeout setting."

That would explain why it was so random.

seems like the problem is just the timeout. smh...

I added the deprecated settings and it works again.

{
    "eslint.autoFixOnSave": true,
}

I got the problem too, spent the entire morning reading the thread trying to find a solution, haven't been able to yet, super annoying.

I pretty much tried everything in the thread, no luck yet.

Code Version: 1.41.1
macOS: Catalina

Tried:

{
  "editor.formatOnSave": true,
  "eslint.autoFixOnSave": true,
  "editor.codeActionsOnSave": {
    "source.fixAll": true
  },
  "files.autoSave": "off",
  "editor.codeActionsOnSaveTimeout": 2000,
}

And, I have restarted VSCode like a hundred times, it's not a consistent issue anymore, it stopped working completely.

Any ideas what's going on?

@yifanchen do you have a GitHub repository I can clone that demos what you are seeing.

@dbaeumer You meant to clone the repo of setting.json?

I did create a gist if that's what you were asking:
https://gist.github.com/yifanchen/b10f970b1c75c04f293bdc93bcf192f7

Update:

My personal machine and work machine have exactly the same setting.json synced by Github Gist. Funny thing is that ESlint autosave works fine on my personal machine but not on my work machine. Drives me crazy, thinking about uninstalling VSCode and start it over.

I just fixed the problem without restarting by adding the following two settings, as per @KlaraFickova 's comment:

  "editor.codeActionsOnSaveTimeout": 2000,
  "editor.codeActionsOnSave": {
    "source.fixAll": true
  }

In my case, it could be either that I had _only_ the deprecated setting, or that I had the default timeout.

I ran into this issue today and nothing worked even after trying above. But the root cause ended up being an outdated version of the ESLint extension (v1.8.2 – roughly 10 months old). VSCode was also outdated (v1.32.3) and subsequently not auto-updating any extensions. Updating to the newest version of VSCode (v1.41.1) and ESLint extension (v2.0.14) solved this issue for me.

It's probably a rare case but hope this helps someone else stuck!

@yifanchen the settings.json alone is not helping a lot since problems like this depend on the overall setup. So a GitHub repository that I can clone (with eslint config, package.json, local settings, ...) would be highly appreciated.

@dbaeumer Sure thing, I didn't bring my work machine home, so I am going to do that on Monday. Good thing is, ESlint on my personal machine at home works beautifully, I am temporarily happy~.

@dbaeumer Mind if I ask, how to create a repo for everything? Uploading .vscode? Is that what you meant?

@yifanchen a GitHub repository that contains:

  • .eslintrc
  • package.json
  • .vscode
  • test file showing the problem.

@dbaeumer It is working now, at least it is working when ESLint config is installed locally per project. The global setting is still not working on my work machine. I will keep looking into it. I managed to upload the entire testing project to Github meaning to help others diagnosing their particular issues and hopefully that will work for some people.

https://github.com/yifanchen/eslint-autosave-test

I need to thank you for asking me to create a repo for testing, otherwise, I wouldn't be able to find out it was caused by ESLint global setting.

Update:
Just got it working with ESLint global setting as well, didn't know what caused it stopped working exactly, but a completely removal and re-install at ~/home made it working.

npm remove --global 'your-eslint-dependencies'

npm install --global 'your-eslint-dependencies'

Was this page helpful?
0 / 5 - 0 ratings