mattpocock/ts-error-translator

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

Open

#51 opened on May 4, 2022

 (9 comments) (18 reactions) (0 assignees)TypeScript (92 forks)github user discovery
enhancementhelp wanted

Repository metrics

Stars
 (2,454 stars)
PR merge metrics
 (No merged PRs in 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.

Contributor guide