-
Notifications
You must be signed in to change notification settings - Fork 325
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
Latest update appears to have broken nodePath specification #298
Comments
I'm having the same problem. Breaker. It there way how to install previous version? |
Great question, @dacz. I didn't find a way around this issue yet. I've been trying since it's broken ESLint for me. If I work it out, I'll be sure to post it here. In the meantime, it would be nice to get some acknowledgement that this issue is a legit problem. |
That still works for me in a test setup that looks like this:
{
"eslint.nodePath": "C:\\tmp\\es-298\\node_modules",
"eslint.trace.server": "messages"
}
{
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"node": true
},
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"sourceType": "module"
},
"rules": {
"no-const-assign": "warn",
"no-this-before-super": "warn",
"no-undef": "warn",
"no-unreachable": "warn",
"no-unused-vars": "warn",
"constructor-super": "warn",
"valid-typeof": "warn"
}
}
function foo() {
var x;
}
Do you have any steps to reproduce what you are seeing. |
I installed eslint 4.7.1 and tested above under Windows. |
And can you enable tracing to verbose ( |
I downgraded plugin to 1.2.11 and downgraded eslint (locally installed) to 4.6.1. It worked. Because I need to work I have no courage to try upgrading the plugin. I suspect that the problem is not the plugin but the eslint 4.7.0. |
For me, we have several ESLint plugins in a sub-folder, so we point node_modules to that. But it is picking up eslint and node_modules from the very first node_modules folder it finds, rather than the path provided. There are also several eslintrc files involved, but it worked before recent changes and doesn't since updating to latest vscode/eslint add-on. The eslint version we use has not changed. |
@somewhatabstract is there anything in the trace when |
@dbaeumer A few things look strange, but this specifically:
And:
Interestingly, |
@somewhatabstract I think I know what it is. Can you do the following to verify it:
The underlying cause of the problem is the support for multiple workspace folders which got added to ESLint 1.3.1. To implement this the ESLint language server is not running on working directory of the workspace anymore (since for n folders there is no common working directory). I need to handle the case that the nodePath setting is relative and make it absolute relative to the file being linted. @egamma you would need to do the same for tslint. |
@dbaeumer thanks, issue on this came in today https://github.com/Microsoft/vscode-tslint/issues/264 😄 |
Published 1.3.2 which has support for relative nodePath. |
Hmm, I tried an absolute path and it didn't seem to work. Let me try again. |
Ha, I see that 1.3.2 fixes it anyway. Great! Thank you! |
ESLint is no longer loading modules from the configured nodePath, and therefore fails to load the configured plugins.
VS Code 1.6.x (both 1.6.0 and 1.6.1 had this problem)
ESLint 1.3.1
The text was updated successfully, but these errors were encountered: