sveltejs/language-tools

"Line numbers must be >= 1" error on module block when unused vars in regular script block

boyeborg opened this issue · 1 comments

Describe the bug
When I have a script block with context="module" and lang="ts", and then have two or more unused props (export let unused = "some value") within my non-module script tag, I get the error "Line numbers must be >= 1". It only occurs when there are two or more unused exports and the lang is set to "ts".

To Reproduce
Steps to reproduce the behavior:

<script context="module" lang="ts">
	let someVar: undefined;
</script>

<script lang="ts">
	export let unused1 = true;
	export let unused2 = true;
</script>

Expected behavior

The unused-export-let warning on the two unused variables.

Screenshots

Screenshot 2020-11-10 at 16 01 37

System (please complete the following information):

  • OS: macOS Catalina (10.15.7)
  • IDE: VSCode
  • Plugin/Package: Svelte for VSCode

Closing in favor of #934