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

Show no-slow-types diagnostics in the LSP #22437

Open
dsherret opened this issue Feb 16, 2024 · 1 comment
Open

Show no-slow-types diagnostics in the LSP #22437

dsherret opened this issue Feb 16, 2024 · 1 comment
Labels
feat new feature (which has been agreed to/accepted) lsp related to the language server

Comments

@dsherret
Copy link
Member

A little complicated because it requires having a ModuleGraph, but we should look into a way to show no-slow-types diagnostics in the LSP w/ quick fixes for JSR.

@NfNitLoop
Copy link

I noticed the difference between deno lint and VSCode yesterday and was asked to make a bug about it. I think this is the same issue. LSP = Language Server Protocol, which is what VSCode uses to fetch problems/hints, ya?

Context from Discord:

It looks like when I have "name", "version", and "exports" defined in deno.jsonc, then deno lint knows to check for no-slow-types:

error[no-slow-types]: missing explicit type in the public API

But the VSCode editor doesn't. even if I try to enable the rule "no-slow-types".
I was hoping I could easily find them all and add some annotations to disable no-slow-types on all my Zod types. 😑
(There were other valid errors, where I'd forgotten to annotate return types of functions, for example.)
Hah, weird, while I can't lint.rules.include no-slow-types to make it get checked in VSCode, I can .exclude it to make it not happen in the CLI.

This is another case where no-slow-types behavior is diverging from the behavior of other lints. Similar to what I mentioned in this ticket, IMO the best solution is to make it act more like existing lints where possible. Does making no-slow-types a "normal lint" in the other case make it easier to add to the LSP? 🤞

@lucacasonato lucacasonato added feat new feature (which has been agreed to/accepted) lsp related to the language server and removed enhancement labels Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat new feature (which has been agreed to/accepted) lsp related to the language server
Projects
None yet
Development

No branches or pull requests

3 participants