Skip to content

how to disable this may be converted to async function error #166

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

Closed
ta3pks opened this issue Nov 11, 2020 · 6 comments · Fixed by #272
Closed

how to disable this may be converted to async function error #166

ta3pks opened this issue Nov 11, 2020 · 6 comments · Fixed by #272

Comments

@ta3pks
Copy link

ta3pks commented Nov 11, 2020

I am happy using promises instead of async functions at certain places but typescript language server constantly reports errors saying those functions can be converted to async functions which should be a code action i believe not an error message
Is there any way to disable certain messages?
Something similar to the #[allow] annotation in rust which disables certain warnings

@DonnieWest
Copy link
Collaborator

@ta3pks
Copy link
Author

ta3pks commented Nov 12, 2020

@DonnieWest this is not a typescript error the tsc doesnt report any errors this is just a diagnostic reported by typescript-language-server and since it is not a real error ts-ignore doesnt really help with that

@pyrho
Copy link

pyrho commented Nov 17, 2020

Coc handles this via a coc-specific configuration setting, when "typescript.suggestionActions.enabled": false, coc will filter out all suggestions (except unused variable, but that's pretty opinionated).

I can take a look at tackling this (it's been bothering me too :P); this could be done via a command line switch like --ignore-diagnostic-code 42 (which could occur multiple times), which would then be used to filter out the diagnostics sent back to neovim.

What do you think @DonnieWest ?

@DonnieWest
Copy link
Collaborator

@pyrho sounds like a plan :)

@ta3pks
Copy link
Author

ta3pks commented Nov 29, 2020

How about block specific ignores? similar to allow macro of rust or ts-ignore annotation of typescript ?

@rchl
Copy link
Member

rchl commented Oct 27, 2021

The suggestion in the review was that this should rather be handled in the client itself since diagnostics are a standard LSP feature and there is no reason to implement it per server.

Anyone strongly disagres with that?

@rchl rchl closed this as completed in #272 Nov 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants