You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Files with .es6 suffix are treated as TypeScript files #5046
changed the title [-]Errors in ES6 JavaScript files with the extension .es6[/-][+]Files with .es6 suffix are treated as TypeScript files[/+]on Apr 7, 2016
What is happening is that VS Code registers .es6 files as JavaScript files and Code sends them over to the tsserver. Inside the tsserver .es6are not treated as JavaScript files but as TypeScript files. For this reason you get the additional errors.
Moving to TypeScript, there should be a way to configure that .es6 files need to be treated as JavaScript files. If VS Code doesn't send .es6 to the tsserver then the user doesn't get Intellisense and only coloring.
Activity
[-]Errors in ES6 JavaScript files with the extension .es6[/-][+]Files with .es6 suffix are treated as TypeScript files[/+]egamma commentedon Apr 7, 2016
What is happening is that VS Code registers
.es6files as JavaScript files and Code sends them over to the tsserver. Inside the tsserver.es6are not treated as JavaScript files but as TypeScript files. For this reason you get the additional errors.One work around is to disable the error diagnostics from the tsserver for js files in the settings:
"javascript.validate.enable": false. When you do so you should really setup eslint to get javascript diagnostics https://github.com/Microsoft/vscode-docs/blob/vnext/release-notes/vFebruary.md#linters.Moving to TypeScript, there should be a way to configure that
.es6files need to be treated as JavaScript files. If VS Code doesn't send .es6 to the tsserver then the user doesn't get Intellisense and only coloring.egamma commentedon Apr 7, 2016
This issue was moved to microsoft/TypeScript#7926