mattpocock/ts-error-translator

As a "Language Service Plugin" to have broad support for IDEs besides vscode

Aberta

#51 aberto em 4 de mai. de 2022

 (9 comentários) (18 reações) (0 responsável)TypeScript (92 forks)github user discovery
enhancementhelp wanted

Métricas do repositório

Stars
 (2.455 estrelas)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

Description

Hey 👋

So, just throwing random ideas here. Instead of a vscode extension or adding an additional package, this could be wrapped as a TypeScript Language Service Plugin.

Language Service Plugins allow to report additional errors such as from a linter and technically they should have access to original diagnostics so theoretically it'd be possible to add "translated" diagnostics along side original diagnostics.

Assuming this works, then user can simply add this to tsconfig:

{
    "compilerOptions": {
        "plugins": [{ "name": "ts-error-translator" }]
    }
}

So any IDE that uses TypeScript language service would be able to load the plugin and report errors in that IDE's native way for displaying/reporting errors/messages.


I haven't personally written a TS language service plugin before, I'm slightly familiar with the APIs thought which I learned for no reason lol. If there is interest in this I could try this out when I get some time.

Guia do colaborador