Skip to content

Commit 37bb117

Browse files
committed
fix: false positives for import vars with TS in svelte/valid-compile
1 parent 23f7bf2 commit 37bb117

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

packages/eslint-plugin-svelte/src/shared/svelte-compile-warns/transform/typescript.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ export function transform(
3535
ts.ScriptTarget.ESNext,
3636
module: ts.ModuleKind.ESNext,
3737
importsNotUsedAsValues: ts.ImportsNotUsedAsValues.Preserve,
38-
sourceMap: true
38+
sourceMap: true,
39+
preserveValueImports: true
3940
}
4041
});
4142

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<script lang="ts">
2+
import { page } from '$app/stores';
3+
</script>
4+
5+
{$page}

0 commit comments

Comments
 (0)