-
-
Notifications
You must be signed in to change notification settings - Fork 224
Description
Is your feature request related to a problem? Please describe.
svelte-check reports errors and hints in a different format than tsc does. Here is a simple example.
This is problematic because it is impossible to integrate svelte-check with VSCode tasks and a built-in $tsc-watch problem matcher.
To clarify: VSCode allows to define tasks for building, testing, checking, linting, etc. For example, to run tsc on my project I can define a task like this:
{
"label": "tsc --watch",
"isBackground": true,
"type": "shell",
"problemMatcher": "$tsc-watch",
"command": "tsc --watch"
}VSCode comes with a number of built-in problem matchers. Problem matchers scan the output and report problems in Problems panel. This allows to quickly see the problem in a well-formatted view, and to jump between problems using commands or keyboard navigation.
Here is what the example I provided looks like:
Note that If I open the problematic svelte file, then the problems do appear in the Problems panel. However, at that point, it's no longer useful, because I can see the problem in the open file myself.

Describe the solution you'd like
I'd like for svelte-check results to be accessible through $tsc-watch and $tsc problem matchers without any additional configuration. This will allow to run svelte-check in the background and catch errors, even if a file that has issue is not opened in the editor.
This would require changing the reporting format to match the one of TypeScript compiler.
Describe alternatives you've considered
An alternative is to define a custom problem matcher to parse svelte-check output. This custom problem matcher would need to be added to the VSCode extension.


