Reputation: 143
I opened my project folder in VSCode, after opening it, I ran npm install.
After that VSCode displayed the confirmation box at the top saying "Click on Allow to use the eslint configured locally in the workspace folder". I clicked Allow.
But then it started giving unnecessary errors like double quotes should be used instead of single quotes.
How to revert back to global ESlint?
I tried exploring ESLint settings in VSCode but didn't find the appropriate setting. Please help me in this.
Upvotes: 4
Views: 9049
Reputation: 959
I use a Vagrant VM, and when node_modules
is in the directory that's visible to both my local hard drive and the VM, performance takes a significant hit.
From a tip in this post that no longer exists, when I do the following:
mkdir ~/whatever
mv /vagrant/node_modules ~/whatever/
ln -s ~/whatever/node_modules /vagrant/node_modules
...I get a significant, multi-second speedup when starting the app. I guess there's a lot of overhead for reading from within a VM when it's in that shared directory. When the directory is moved into the VM and not directly accessible from the shared directory, it goes a lot faster.
However, this caused problems for VS Code, since it wanted to use the eslint version that it expected to see in the symlinked node_modules
... but it couldn't navigate through the symlink.
My solution was to force VS Code to use the globally-installed eslint on my machine, separate from the VM. To do that, ensure you have eslint installed globally, then:
After that's done, I brought the symlink back, and it's still working as expected.
Hope this helps someone else with this slightly strange VM setup!
Upvotes: 0
Reputation: 25284
You can also click the ESlint button in the tool bar at the bottom right of the window. This should open the dialogue again.
Upvotes: 0
Reputation: 143
Got the answer, to get this dialog box again, run the following command in command palette
ESLint: Reset Library Decision
Reference: https://github.com/microsoft/vscode-eslint/issues/1023
Upvotes: 2