Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

svelte-check --no-tsconfig checks TS/JS #1839

Closed
fehnomenal opened this issue Jan 19, 2023 · 0 comments
Closed

svelte-check --no-tsconfig checks TS/JS #1839

fehnomenal opened this issue Jan 19, 2023 · 0 comments
Labels
bug Something isn't working Fixed Fixed in master branch. Pending production release.

Comments

@fehnomenal
Copy link

fehnomenal commented Jan 19, 2023

Describe the bug

I want to only check svelte files and thus use svelte-check --no-tsconfig but it still loads the nearest tsconfig.json and checks TS/JS.

I added a log directly after parsing the options and this is what I got:

$ pnpm svelte-check --no-tsconfig
{
  _: [],
  tsconfig: false,
  workspace: undefined,
  output: 'human-verbose',
  watch: false,
  preserveWatchOutput: false,
  'no-tsconfig': false,
  ignore: undefined,
  'fail-on-warnings': false,
  'compiler-warnings': undefined,
  'diagnostic-sources': undefined,
  threshold: 'warning'
}

====================================
Loading svelte-check in workspace: /home/...
Getting Svelte diagnostics...

^CException: pnpm killed by signal interrupt
[tty 362], line 1: pnpm svelte-check --no-tsconfig

vs no flags:

$ pnpm svelte-check
{
  _: [],
  workspace: undefined,
  output: 'human-verbose',
  watch: false,
  preserveWatchOutput: false,
  tsconfig: undefined,
  'no-tsconfig': false,
  ignore: undefined,
  'fail-on-warnings': false,
  'compiler-warnings': undefined,
  'diagnostic-sources': undefined,
  threshold: 'warning'
}

====================================
Loading svelte-check in workspace: /home/...
Getting Svelte diagnostics...

^CException: pnpm killed by signal interrupt
[tty 363], line 1: pnpm svelte-check

As you can see no-tsconfig is always false and passing --no-tsconfig actually sets tsconfig to false instead of undefined.
And thus the early return in getTsconfig does not fire.

Reproduction

Well, call svelte-check --no-tsconfig in a project where there are type errors.

Expected behaviour

Do not display all the Typescript errors in .ts files.

System Info

  • OS: NixOS (Linux)
  • IDE: VSCodium

Which package is the issue about?

svelte-check

Additional Information, eg. Screenshots

No response

@fehnomenal fehnomenal added the bug Something isn't working label Jan 19, 2023
dummdidumm added a commit to dummdidumm/language-tools that referenced this issue Jan 24, 2023
@dummdidumm dummdidumm added the Fixed Fixed in master branch. Pending production release. label Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Fixed Fixed in master branch. Pending production release.
Projects
None yet
Development

No branches or pull requests

2 participants