Language-tools: svelte-check: report also issues from .ts files, not only from .svelte components

Created on 30 Jul 2020  ·  4Comments  ·  Source: sveltejs/language-tools

Is your feature request related to a problem? Please describe.

I'd like svelte-check to also check and report issues from .ts files, not only form .svelte components

enhancement

Most helpful comment

A workaround (or even a solution) might be svelte-check && tsc --noEmit

All 4 comments

A workaround (or even a solution) might be svelte-check && tsc --noEmit

Thanks a lot @dominikg , that's pretty good indeed.

I had to npm i -D watch and then add a "check": "watch 'svelte-check && tsc --noemit'" to the scripts section of my package.json

Perhaps this could be integrated into svelte-check, so that we could run svelte-check --ts-files --watch to have that out of the box

tsc has a watch mode integrated, but usually you would rely on your IDE to do live checking. spawning additional processes comes at a cost.

unless you don't use an IDE and absolutely need the immediate Feedback, I recommend to run the check as a prebuild step

Yep ,I agree, it'is a good advice to leave live checking to the code editor (if using vscode it is already doing it) and reserve svelte-check for prebuild tasks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

matthewmueller picture matthewmueller  ·  5Comments

non25 picture non25  ·  5Comments

JoeDailey picture JoeDailey  ·  6Comments

matthewmueller picture matthewmueller  ·  3Comments

Kingwl picture Kingwl  ·  6Comments