Skip to content

Commit

Permalink
JavaScript: Enable ES6 by Default
Browse files Browse the repository at this point in the history
- This tiny commit enables ES6 support for JavaScript files by default, ensuring that VS Code supports popular JavaScript frameworks and modules out of the box.
- Tests pass, behaviour otherwise unchanged.

Closes #318
  • Loading branch information
felixrieseberg committed Dec 9, 2015
1 parent 8982434 commit 8bc42af
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/vs/editor/browser/standalone/standaloneSchemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1015,7 +1015,7 @@ MonacoEditorSchemas['http://json.schemastore.org/tsconfig'] = {
MonacoEditorSchemas['http://opentools.azurewebsites.net/jsconfig'] = {
'title': nls.localize('jsconfig.json.title', "JSON schema for the JavaScript configuration file"),
'type': 'object',
'default': { 'compilerOptions': { 'target': 'ES5' } },
'default': { 'compilerOptions': { 'target': 'ES6' } },
'properties': {
'compilerOptions': {
'type': 'object',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ export class LanguageServiceHost implements ts.LanguageServiceHost {
this._compilerOptions = options || ts.getDefaultCompilerOptions();
this._compilerOptions.allowNonTsExtensions = true; // because of JS* and mirror model we need this
this._compilerOptions.module = ts.ModuleKind.CommonJS; // because of JS*
this._compilerOptions.target = options && options.target !== undefined ? options.target : ts.ScriptTarget.Latest; // because of JS*
}

getCompilationSettings(): ts.CompilerOptions {
Expand Down

0 comments on commit 8bc42af

Please sign in to comment.