Skip to content
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

[Linter] Make deno lint work in VScode without deno server #622

Open
yhnavein opened this issue Feb 6, 2022 · 6 comments
Open

[Linter] Make deno lint work in VScode without deno server #622

yhnavein opened this issue Feb 6, 2022 · 6 comments
Labels

Comments

@yhnavein
Copy link

yhnavein commented Feb 6, 2022

Is your feature request related to a problem? Please describe.

I wanted to use deno linter instead of eslint in VSCode for the project that is not deno-specific. I run deno lint on my project's code and the issues it finds are very useful for me, but I hate fixing them from the console, and I would greatly appreciate to see them as... well... lint output in the VSCode. But it seems it does not work :(
Is it possible to have this functionality in this extension?

My workspace config I tried to use:

{
    "deno.enable": false, // As I don't want to use deno. Deno will not handle imports (standard imports; dependencies defined in package.json)
    "deno.lint": true,
    "eslint.enable": false
}

After restarting VSCode I don't see any linting messages in VSCode. It looks like deno.enable: false turns extension off.

And screenshot showing that indeed it's not working:
image

Describe the solution you'd like

I would love to use deno lint in the VSCode without enabling deno support. It should be possible, because deno lint works fine from the terminal.
And I would love to see these warning/errors marks directly in the code

@bartlomieju
Copy link
Member

I recently was messaged by other people interested in using deno_lint on Node based projects, and they want to run it in devcontainers as well. I think this is reasonable request, @dsherret @kitsonk what would you suggest as the best way forward?

@dsherret
Copy link
Member

dsherret commented Feb 6, 2022

I think it would be a decent amount of work to implement and maintain.

  1. We'd need a way to disable ts/dep diagnostics, code actions, etc. in deno lsp
  2. Then a way to get it to not disable ts diagnostics in typescript-deno-plugin

I wonder if this might be better suited for dlint to provide then have a separate vscode extension.

@kitsonk
Copy link
Contributor

kitsonk commented Feb 6, 2022

I wonder if this might be better suited for dlint to provide then have a separate vscode extension.

Yes, I think that is a better solution. It doesn't require an 80mb executable. vscode_deno and the Deno CLI are really designed together. A standalone dlint LSP and vscode extension would make a lot more sense, and not be overly complicated to do. We could consider refactoring the integration code in the existing LSP to an "lsp" feature in deno_lint, so there would be minimal duplication of code too.

@bartlomieju
Copy link
Member

Thanks for opinions! That definitely sounds like a good idea.

@mjgerace
Copy link

mjgerace commented Oct 8, 2022

Any way I can help move this along?

@canadaduane
Copy link

With progress in deno's linter and the deno vscode extension, has it become easier to implement a standalone dlint LSP and VSCode extension?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants