-
Notifications
You must be signed in to change notification settings - Fork 341
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
extension not working #365
Comments
@sfabriece what happens when you run eslint from a teminal. If this works without problem can you proivide a Github repository that I can clone which demos the problem with steps on how to reproduce. |
it works fine from the terminal. Let me try to put together a repo. |
@dbaeumer here is a repo to reproduce: https://github.com/sfabriece/vscode-eslint-test |
any special settings for eslint? I'm using npm v5 It might also be another plugin messing with my settings. |
I am using npm 5.5.1 and node 8.9.1. I am on Windows 10 also. Are you sure that in your setup eslint and all eslint plugins are either installed locally or globally. This has to be that way and is a limitation of ESLint npm module itself. |
They are installed locally. It might be another extension messing with eslint. I'll try disabling all of them and see if I can identify which. |
I installed vscode insider edition and only installed the eslint extension. I'm still getting the same result. I have no idea what is wrong. |
Any special paths (e.g. paths with spaces, special unicode charactes, ....) |
I'll have a look and let you know. |
This might happen if you have a global ~/.eslintrc that uses eslint-plugin-react. I have a problem where Visual Studio or ReSharper or something sometimes creates ~/.eslintrc upon startup, and it includes some plugin that isn't present in the project's package.json. After that, vscode-eslint doesn't work until I've removed ~/.eslintrc. I've seen bug reports about ~/.eslintrc being used despite there being a project-local config file, and @dbaeumer hasn't been able to reproduce the problem. But it actually seems like the global config file is parsed but then ignored, except that failure in the parsing makes it break down. |
@dbaeumer: Can you reproduce the problem where an invalid ~/.eslintrc stops the extension from working? |
@Lajnold only if there is no project local config. But this is nothing VS Code can fix because in such a setup eslint on the command line doesn't succeed either. |
In my case, there is a project local config. If I have different but valid settings in the project local config and ~/.eslintrc, the project local config gets precedence in both command line and VSCode. But if ~/.eslintrc has an invalid configuration, either syntactically or by including some plugin that is missing in the project, command line works while vscode-eslint fails to load. |
@Lajnold what kind of error are you seeing? This works for me with the following broken .eslintrc.json file in my home directory.
|
But I don't known why this is happening since I am not instructing eslint to read the config. |
The problematic part in ESLint lib is this
Need to understand why this is not working when used as a library. |
OK. The problem is a path comparing issue: when using the ESLint API they tripple equal paths which in this setup are |
Nice, thanks! |
By the way, it looks like you meant to publish 1.4.7, but actually published 1.4.6. The publishing seems to be one step behind. |
1.4.7 is not published yet since I have more fixes in the pipeline. |
I'm trying to setup a simple nodejs project but the extension is throwing errors.
config:
error:
package.json:
The text was updated successfully, but these errors were encountered: