Skip to content

Diagnostics for javascript #538

Answered by Nuthin2do
Nuthin2do asked this question in Q&A
Nov 22, 2024 · 1 comments · 4 replies
Discussion options

You must be logged in to vote

I found my mistake. Previously i set up the settings for typescript not for javascript. After changing that everything works fine:

private setTypescriptValidationOptions() { const javascriptDefaults = languages.typescript.javascriptDefaults; javascriptDefaults.setDiagnosticsOptions({ noSemanticValidation: false, noSyntaxValidation: false, }); const tsOp = javascriptDefaults.getCompilerOptions(); tsOp.allowJs = true; tsOp.checkJs = true; tsOp.target = languages.typescript.ScriptTarget.ES2020; tsOp.lib = ["ES6"]; tsOp.isolatedModules = true; javascriptDefaults.setCompilerOptions(tsOp); }

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@Nuthin2do
Comment options

@CGNonofr
Comment options

@Nuthin2do
Comment options

@Nuthin2do
Comment options

Answer selected by Nuthin2do
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants