Skip to content

svelte-check: No preprocess config found but lang tag exists #2308

@DzmitryFil

Description

@DzmitryFil

Describe the bug

I'm getting the same error in dozens of unrelated svelte components using lang="ts" when running svelte-check.

Parsing /Users/dzmitryfil/work/bim-app/engine-ui/src/cost-analysis/CostAnalysisComponent.svelte failed. No preprocess config found but lang tag exists. Skip showing error because they likely use other preprocessors.
Parsing /Users/dzmitryfil/work/bim-app/engine-ui/src/libui/IdenticonBackground.svelte failed. No preprocess config found but lang tag exists. Skip showing error because they likely use other preprocessors.
Parsing /Users/dzmitryfil/work/bim-app/engine-ui/src/reusable/CheckBoxComponent.svelte failed. No preprocess config found but lang tag exists. Skip showing error because they likely use other preprocessors.

etc..

These components do not have any errors, and are compiled fine by svelte compiler, and I don't see any error inside VSCode.
What's more, if I deliberately inject some erroneous code that wouldn't compile, svelte-check finds and report these errors just fine, along side the errors posted above ("No preprocess config found but lang tag exists. Skip showing error because they likely use other preprocessors.");

Reproduction

my svelte.config.js:

import sveltePreprocess from 'svelte-preprocess';

export default sveltePreprocess({
    typescript: {
        tsconfigFile: './tsconfig.json',
    }
});

source code of on of the components with this error, CheckBox.svelte:

<script lang='ts'>
import type { Checkbox } from "./types";

export let input: Checkbox;

let checked: boolean;

$: checked = input.checked;

function handleInputOnChange() {
    if (input.onChange) {
        input.onChange(checked);
    }
}
</script>

<div class="mdc-touch-target-wrapper">
  <div class="mdc-checkbox mdc-checkbox--touch">
    <input 
      bind:checked={checked} 
      type="checkbox"
      class="mdc-checkbox__native-control"
      on:change={handleInputOnChange}
    />
    <div class="mdc-checkbox__background">
      <svg class="mdc-checkbox__checkmark"
        viewBox="0 0 24 24">
        <path class="mdc-checkbox__checkmark-path"
          fill="none"
          d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
      </svg>
      <div class="mdc-checkbox__mixedmark"></div>
    </div>
    <div class="mdc-checkbox__ripple"></div>
  </div>
</div>

Expected behaviour

Correct components should not report any errors.

System Info

  • OS: MacOS 14.2.1 m2
  • IDE: VSCode

Which package is the issue about?

svelte-check

Additional Information, eg. Screenshots

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions