Skip to content

Incorrect highlights of errors in certain scenarios #934

@ebeloded

Description

@ebeloded

When module script has lang="ts", the problematic piece of code is highlighted incorrectly.

To Reproduce
Here is a simple piece of code, which generates an warning about unused export property data:

<script context="module" lang="ts">
</script>

<script lang="ts">
export let data: Object = {}
</script>

What gets highlighted:

image

The error and the error message are correct, the just show up at an unexpected place.

Expected behavior

Here is what happens if I remove lang="ts" from the module script, which is the expected behavior

image

System

  • OS: Mac OS
  • IDE: VSCode
  • Plugin/Package: Svelte for VSCode

Metadata

Metadata

Assignees

No one assigned

    Labels

    FixedFixed in master branch. Pending production release.bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions