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

`vue-tsc` tries to analyze non-ts blocks

Open ofekd opened this issue 1 year ago • 4 comments
trafficstars

I use vleam to write Gleam code in SFCs instead of TS.

When running vue-tsc for type check, vue-tsc tries analyzing <script lang="gleam"> blocks, resulting in many irrelevant type errors.

Expected behavior is to skip analyzing them, and only analyze TS code.

ofekd avatar Jun 01 '24 16:06 ofekd

Are you still having this issue with the latest vue and latest language tools versions (v2.0.28)?

kermanx avatar Aug 13 '24 15:08 kermanx

I'm getting a single error in a brand new pnpm create vue@latest application:

src/views/TestView.vue
 6:12  error  Parsing error: Unexpected token /

This is TestView.vue:

<template>
 <div class=""></div>
</template>

<script lang="gleam">
import gleam/io

pub fn hello () {
 io.debug("hello")
}
</script>

ofekd avatar Aug 17 '24 00:08 ofekd

This also affects eslint. Should I open a new issue or edit this one?

ofekd avatar Sep 13 '24 09:09 ofekd

@KazariEX @kermanx Can this be fixed / can you point me to a relevant part of the code?

I am getting errors both in my editor and when compiling with type checks for <script lang="gleam"> blocks

ofekd avatar Mar 04 '25 08:03 ofekd