language-tools icon indicating copy to clipboard operation
language-tools copied to clipboard

no error when running `svelte-check` on invalid `tsconfig.json`

Open DetachHead opened this issue 2 years ago • 0 comments

Describe the bug

when your tsconfig.json is invalid, svelte-check does not complain

> tsc
tsconfig.json:12:47 - error TS6046: Argument for '--moduleResolution' option must be: 'node10', 'classic', 'node16', 'nodenext', 'bundler'.

12     "module": "NodeNext", "moduleResolution": "asdf"
                                                 ~~~~~~


Found 1 error in tsconfig.json:12

> svelte-check --tsconfig tsconfig.json

====================================
Loading svelte-check in workspace: c:\Users\user\Documents\my-app
Getting Svelte diagnostics...

====================================
svelte-check found 0 errors and 0 warnings

Reproduction

  1. put an invalid value in tsconfig.json, eg. "moduleResolution": "asdf"
  2. run svelte-check --tsconfig path/to/tsconfig.json

Expected behaviour

an error, like what tsc outputs:

tsconfig.json:12:47 - error TS6046: Argument for '--moduleResolution' option must be: 'node10', 'classic', 'node16', 'nodenext', 'bundler'.

12     "module": "NodeNext", "moduleResolution": "asdf"
                                                 ~~~~~~


Found 1 error in tsconfig.json:12

System Info

  • OS: windows 10

Which package is the issue about?

svelte-check

Additional Information, eg. Screenshots

No response

DetachHead avatar Sep 11 '23 04:09 DetachHead