Code change:
jquery_d_ts = join(__dirname, '../../lib/jquery.d.ts'); // from source } <del> export function getJavaScriptMode(documentRegions: LanguageModelCache<HTMLDocumentRegions>, languageId: 'javascript' | 'typescript'): LanguageMode { </del> <ins> export function getJavaScriptMode(documentRegions: LanguageModelCache<HTMLDocumentRegions>, languageId: 'javascript' | 'typescript', workspace: Workspace): LanguageMode { </ins> let jsDocuments = getLanguageModelCache<TextDocument>(10, 60, document => documentRegions.get(document).getEmbeddedDocument(languageId)); const workingFile = languageId === 'javascript' ? 'vscode://javascript/1.js' : 'vscode://javascript/2.ts'; // the same 'file' is used for all contents <del> let compilerOptions: ts.CompilerOptions = { allowNonTsExtensions: true, allowJs: true, lib: ['lib.es6.d.ts'], target: ts.ScriptTarget.Latest, moduleResolution: ts.ModuleResolutionKind.Classic }; </del> <ins> let compilerOptions: ts.CompilerOptions = { allowNonTsExtensions: true, allowJs: true, lib: ['lib.es6.d.ts'], target: ts.ScriptTarget.Latest, moduleResolution: ts.ModuleResolutionKind.Classic, experimentalDecorators: false }; </ins> let currentTextDocument: TextDocument; let scriptFileVersion: number = 0; function updateCurrentTextDocument(doc: TextDocument) {

Related discussion:
text: <!-- Please read our Rules of Conduct: --<!-- Please search existing issues to avoid creating duplicates. --<!-- Also please test using the latest insiders build to make sure your issue has not already been fixed: --<!-- Use Help Report Issue to prefill these. --- VSCode Version: 1.43.0 OS Version: n/a I have the set to in my settings: Given a Does not produce any warnings as expected. However in : The linter says
This has the same root cause as : script are owned by the html extension instead of by the JavaScript extension. Fixing that is difficult However we could have a small fix that just makes html understand the setting. Marking this as help-wanted
Hello I'd like to try my hands on fixing this issue. Can you give some pointers as to which files are good places to start?
This change will need to be made in the HTML extension Here's where we configure TypeScript for the html extension: You should: Pass the value for in with the initial configuration Make sure that the language service updates its value for when the VS Code setting changes
Is there another way to get the setting value other than vscode.workspace.getConfiguration()? The 'vscode' module cannot be found when I try to import it into javascriptMode. I think 'vscode' would have to be as a dependency in in order to import 'vscode'.
Right now I'm passing in a default 'false' for experimentalDecorators in the initial configuration and passing the settings into getJavascriptMode.doValidation to update compilerOptions and calling ts.createLanguageService(host) every time doValidation is invoked. It has the expected behavior, but is there a better way to update the compiler options without creating the service every time it runs validation?
Is called when the file is changed? If it is, try updating the object that it returns
I am reproducing this error now with the following code: I realize this is known, but I will add the mention with respect to . Here is the relevant docs page, if a person wanted to make a unit test using If anyone finds this in the future, if is set in , it should suppress this error. Additionally, both and files, in the root of the project, take precedence over that setting.