-
Notifications
You must be signed in to change notification settings - Fork 10
Can't load plugins when used in Visual Studio #29
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
Comments
I've been experimenting - seems to be the problem is that on Visual Studio the cwd is set to C:\WINDOWS\system32 when this gets run. CascadingConfigArrayFactory and Linter both have options object that can be passed with a cwd to use. If I set that to something sensible and temporarily
I think this should be testable outside of VS by just doing a |
For now I'm working around this with a plugin that looks like function init(modules) {
process.chdir('<project root>');
function create(info) {
return info.languageService;
}
return { create };
}
module.exports = init; If I load it right before |
I seeing something similar on macos. I don't use visual studio code, but I wanted to make sure repo/set up worked for people that do. It's 3 years later, so probably a different issue. How did no one else run into this? Are we doing something weird in our eslintrc?
Why is it trying to load stuff from /Applications/Visual Studio ? and from /node_modules? |
If it is the same problem you can try https://www.npmjs.com/package/vs-compat-ts-plugin - it's how I've been solving the initial problem for a few years. Contains the code above with a few extra pieces. Though I don't recognise your errors. |
Thanks for responding. Oops. I'm testing in Visual Studio CODE, wrong issue. |
If any plugins are specified in the .eslintrc.js then typescript-eslint-language-service fails to load.
In the TSS logs I see the following output:
The text was updated successfully, but these errors were encountered: