-
Notifications
You must be signed in to change notification settings - Fork 37.2k
Closed
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugjavascriptJavaScript support issuesJavaScript support issues
Description
This issue is a followup to @zoltanzf in #3804 (comment) saying:
As I see the
.vuefiles are recognized as HTML by vscode, so the HTML syntax need to be extended with object rest/spread support.
Since this fix that landed in version 1.8, Code is fine with using Object rest spread in .js files.
However, in JS-embedded-in-HTML (or in EDIT Vetur seems to be fine, see below discussion), a JS validation error .vue files via all of the extensions supporting it -- I tried vue, Vue Components, Vetur --Property assignment expected continues to be returned.
- VSCode Version:
- Version 1.9.0-insider
- Commit fcac9b6
- Date 2017-01-31T01:06:33.637Z
- Shell 1.4.6
- Renderer 53.0.2785.143
- Node 6.5.0
- OS Version:
Steps to Reproduce:
- Create two new files
- In the first file, paste this plain JS code and save as
.js:
var obj = { a:1, b: 2 }; var obj2 = { ...obj }; - In the second file, paste the code below and save as
.html:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script>
var obj = { a: 1, b: 2 };
var obj2 = { ...obj };
</script>
</head>
<body>
</body>
</html>Expected:
None of the files should yield errors.
Actual
In the second case (js within html), Code's JS validator yields error Property assignment expected. on the var obj2 = { ...obj }; line
mickdekkers, mudrz and mfp22
Metadata
Metadata
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugjavascriptJavaScript support issuesJavaScript support issues