-
-
Notifications
You must be signed in to change notification settings - Fork 223
Closed
Labels
questionA user questionA user question
Description
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
Labels
questionA user questionA user question