question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Linting in VS Code not working when using enableProjectDiagnostics

See original GitHub issue

I set up a simple deno project with only this file. But the linting is messed up. It looks like the default TypeScript language server is still parsing this file, even though I have installed the extension.

import { cron } from 'https://deno.land/x/deno_cron@v1.0.0/cron.ts';
import { config } from 'https://deno.land/x/dotenv@v2.0.0/mod.ts';

console.log('cron initiated: ', new Date());

cron('*/5 * * * *', async () => {
  await fetch("bla")
});

My workspace settings:

{
  "deno.lint": true,
  "deno.unstable": true,
  "deno.enable": true
}

Bildschirmfoto 2021-12-10 um 11 33 20 Bildschirmfoto 2021-12-10 um 11 32 20 Bildschirmfoto 2021-12-10 um 11 32 51

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:32 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
kitsonkcommented, Feb 26, 2022

Enabling project diagnostics for the built in TypeScript server does not enable the same feature for the Deno language server. If there is a desire for the same feature in the Deno language server, that would be a separate request.

This issue only covers the situation where someone has it enabled globally for the built in TypeScript language server, but has enabled Deno for a specifoc workspace. Currently the only workaround would be to disable the feature in the workspace, as it breaks the suppression mechanism of the Deno vscode extension.

1reaction
jespertheendcommented, Dec 27, 2021

Do you have project diagnostics enabled? (typescript.tsserver.experimental.enableProjectDiagnostics) That also seems to trigger it for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Linting Python in Visual Studio Code
To enable third-party linters for additional problem detection, you can enable them by using the Python: Select Linter command and selecting the appropriate ......
Read more >
How to make Visual Studio Code check entire project for errors?
1 ) it's too random. Problems appear and disappear by magic. The cursor is flickering. Etc. I would recommend to use the Linter...
Read more >
Using Visual Studio Code | Manual - Deno
While developing code in the editor, if the module is not in the cache, you will get a diagnostic like Uncached or missing...
Read more >
VS Code tips — Quickly fix all linter errors in a file ... - YouTube
Today's VS Code extension tip: ESLint fix all actions Quickly fix all linter problems for a given ESLint rule or fix all auto...
Read more >
ESLint not working in VSCode? Help build a troubleshooting ...
I spend far too much time fighting configuration issues in my toolchain. Most issues I even encounter... Tagged with eslint, webdev, linting ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found