Vscode-eslint: ESLINT not working at all for VSCODE

Created on 6 Dec 2016  路  14Comments  路  Source: microsoft/vscode-eslint

For a while, this plugin was working great. But recently it has been completely useless. ESLINT errors are not showing, except when I delete the plugin, and re-install it. Than I see the errors, but when I fix one of the errors, it does not get updated to reflect the fixes. In order to update the fixes I made, I would have to AGAIN delete (so not just disable but actually delete) the plugin and re-install in order for the updated errors. If I than again fix an error, the process will need to be re-started. Needless to say, this is impossible to work with.

I have installed eslint, eslint-filename, and eslint-angular globally and locally.
I have a .eslintrc.json file

I am really flabbergasted by the difficulties that IDE/ texteditors have with ESLINT/JSHINT whatever. I stopped using Sublime after ESLINT stopped working properly. I though I was happy with VisualCode, but now again this stuff. Getting ESLINT to work on an IDE is like getting a windows network setup to work in the 90's....

I dont know how to show the issue, I could make a movie of my VisualCode but only if people cannot help me without.

Please I don't make me stop using VisualCode and go back to the Slow Webstorm..

needs more info

Most helpful comment

had this problem. Embarrassingly, I had an .eslintignore file in my project root that had a wildcard (/**). Deleting that fixed the issue.

Had thought I was just writing perfect code :/

All 14 comments

@RogierKonings assuming you are running the latest version of the plugin could you do the following:

  • open the workspace that reveals the problematic behavior
  • add the workspace setting "eslint.trace.server": "messages" to VS Code
  • Click on the ESLint text in the status bar. This should open the ESlint output panel
  • Make ESLint fail, ... Type in a JS file, ...

Provide the output from the ESLint output panel here.

I have the same issue

[Trace - 8:45:17 PM] Sending notification 'textDocument/didChange'.
[Trace - 8:45:17 PM] Received notification 'textDocument/publishDiagnostics'.
[Trace - 8:45:17 PM] Received notification 'eslint/status'.
[Trace - 8:45:18 PM] Sending notification 'textDocument/didChange'.
[Trace - 8:45:18 PM] Received notification 'textDocument/publishDiagnostics'.
[Trace - 8:45:18 PM] Received notification 'eslint/status'.
[Trace - 8:45:18 PM] Sending notification 'textDocument/didSave'.

@AvraamMavridis actually the trace looks ok. Would you be able to share your project so that I can investigate.

I installed ESLint on VS Code for the first time and it doesn't care my user settings.

"eslint.enable": true,
"eslint.options": { 
        "extends": "eslint:recommended",
        "ecmaFeatures": {
            "jsx": true
        },
        "rules": {
            "eqeqeq": ["error", "always"]
      }
    },

I have same trace results as @AvraamMavridis

Mine works now. I ran "eslint --init" in the root of project folder. It then installed ESLint locally (it was installed global before). Restarted VS Code and it works now.

@nurp the "eslint.options" are for settings usually passed to eslint in a terminal. They are not a replacement for a .eslintrc* file.

I will close the issue. I haven't received any additional information for the initial reported problem nor on what @AvraamMavridis reported. @nurp problem is now covered by some additional messages shown in the output window if no .eslintrc config can be detected.

had this problem. Embarrassingly, I had an .eslintignore file in my project root that had a wildcard (/**). Deleting that fixed the issue.

Had thought I was just writing perfect code :/

I have this plugin choking on a ~3000 line file.

@dyst5422 could you provide a test case for this (the file, or a GitHub repository to clone)

Unfortunately, the file in question is ITAR, so I can't provide it. I will definitely post something else should it come up on code that I can let out there.

Just for more information that may or may not be helpful. There are ~1000 eslint issues with the file (refactoring some old stuff) and the specific issues I'm seeing are that it is either slow to update when a fix is made, or won't update at all unless I disable/reenable linting. Sometimes, all the rules will get stuck appearing on one line as though the diagnostics pane fails to parse the eslint output.

It might be worth having an option to only lint on command for larger files.

Thanks for the information. The ~1000 error case is indeed something to optimize.

This might be completely unrelated, but I noticed at some point yesterday that I had my Flow server hogging a TON of resources and killed it. Didn't pay much attention to if that was related and the lint server performance improved after, but I'll keep it in the back of my mind to investigate that a bit for you when I get a chance.

Yes, this thing chokes on large (3000+ lines) files, it seems.

Was this page helpful?
0 / 5 - 0 ratings