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

feat(lsp): show hints from deno_lint in addition to messages #10739

Merged
merged 3 commits into from
May 25, 2021

Conversation

magurotuna
Copy link
Member

Currently, the LSP returns only messages from deno_lint; hints are omitted even when they are.
Some lint rules are very unfriendly in the sense that their diagnostic messages give no information about how the lint errors should be addressed properly without having to suppress them.
One example is ban-ts-comment rule, as its message just tells that the directive is disallowed without comment - when seeing this, one may wonder what "comment" is. While the message is very unclear, the hint is so informative that it gives a concrete example of how to address it, like Add an in-line comment explaining the reason for using `@ts-expect-error`, like `// @ts-expect-error: <reason>
Therefore, it would be very nice to show not only messages but also hints from deno_lint. This PR appends hints to messages if any.

before
without_hint

after
with_hint

@bartlomieju bartlomieju requested a review from kitsonk May 25, 2021 13:00
Copy link
Contributor

@kitsonk kitsonk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, great improvement.

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

Successfully merging this pull request may close these issues.

None yet

2 participants