frigjord
frigjord•2y ago

How to disable deno linter for whole project directory?

I'm using deno with mixed project folders, some use Vue and shouldn't be linted by deno. How do i disable it for the project folder?
23 Replies
AapoAlas
AapoAlas•2y ago
In .vscode/settings.json you can set "deno.lint": false I believe.
frigjord
frigjord•2y ago
I tried that, it did nothing
AapoAlas
AapoAlas•2y ago
Now I set deno.lint to false. When I press save in the settings.json I can see some editors flashing so it's obviously reloading stuff:
AapoAlas
AapoAlas•2y ago
AapoAlas
AapoAlas•2y ago
And I no longer have the deno lint warning.
AapoAlas
AapoAlas•2y ago
ie. It does seem to do something. Maybe try forcing the Deno LSP to restart using the Deno: Restart Language Server command.
frigjord
frigjord•2y ago
frigjord
frigjord•2y ago
frigjord
frigjord•2y ago
I added it in .vscode/settings.json Restarting deno lang server or vscode didn't help Also upgraded vscode Also reloaded window as someone suggested
AapoAlas
AapoAlas•2y ago
That's not Deno's linting but the importing (ie. not a "don't do this, this may be bad code" but Deno itself saying "this will not work, it will throw an error in runtime"). Presumably you have the Deno language extension enabled globally, but in this case you only want to apply it selectively. Try adding the "deno.enablePaths": [...] setting to control where you use the Deno LSP and where normal TypeScript LSP should be used.
AapoAlas
AapoAlas•2y ago
eg. I just used enablePaths to set only "lib" to be used by Deno. Now in my test/some.test.ts file I have this error:
frigjord
frigjord•2y ago
It got disabled if i opened only that specific project folder but not in a workspace with multiple projects
AapoAlas
AapoAlas•2y ago
@frigjord And the reason why I say
Presumably you have the Deno language extension enabled globally
is due to "deno.enable": true not being in that settings.json. Ah, then you might have it defined in the workspace settings.
AapoAlas
AapoAlas•2y ago
frigjord
frigjord•2y ago
I disabled it globally, but still shows