We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3643e15 commit d692bafCopy full SHA for d692baf
.changeset/many-cougars-act.md
@@ -0,0 +1,6 @@
1
+---
2
+"eslint-plugin-svelte": minor
3
4
+
5
+Change to use `parserServices.program.getCompilerOptions().target` for TS transpile in `svelte/valid-compile` rule.
6
src/shared/svelte-compile-warns/transform/typescript.ts
@@ -29,7 +29,10 @@ export function transform(
29
const output = ts.transpileModule(code, {
30
reportDiagnostics: false,
31
compilerOptions: {
32
- target: ts.ScriptTarget.ESNext,
+ target:
33
+ context.parserServices.program?.getCompilerOptions()?.target ||
34
+ ts.ScriptTarget.ESNext,
35
+ module: ts.ModuleKind.ESNext,
36
importsNotUsedAsValues: ts.ImportsNotUsedAsValues.Preserve,
37
sourceMap: true,
38
},
0 commit comments