Add support for ES2016 Object Spread Initializer
Object Spread Initializers is a proposed feature of ES2016 and is very useful when writing Redux reducers. The syntax is supported in babel, but when using the feature in Visual Studio Code it will mark the spread operator as a syntax error.
See: https://github.com/sebmarkbage/ecmascript-rest-spread/blob/master/Spread.md for more information of the feature.
It would be very nice if Visual Studio Code did not mark the use of this feature as an error with a red squiggly.
The current behavior in Visual Studio Code is also described in Issue #1640
+1 I've been pretty much ignoring my errors and warnings in VSCode in hopes that this would be addressed soon but it's been a few months now. I've also noticed some discussion in the ESLint project about this and their suggestion was to make use of babel-eslint. I wonder if that is possible to use in VSCode...
This issue was moved to Microsoft/TypeScript#6525
No point in moving this feature request to the TypeScript project. They already have the feature on their roadmap. It is planned for the 2.0 release of TypeScript.
https://github.com/Microsoft/TypeScript/wiki/Roadmap
I don't understand why Syntax checking of EcmaScript in Visual Studio Code is dependent on TypeScript though? Do you use TypeScript to check the syntax of plain .js files?
Yes
@jrieken shouldn't eslint and babel-eslint be doing that?
+1 I can't use VSCode at all b/c of this.. My code uses a ton of obj spread, so I am forced to use a different editor :-1:
Sorry to hear that. Since recent we do have an option to turn off validation for JavaScript - "javascript.validate.enable": false. That setting and a linter extension that supports object spread (like eslint) should bring you in a more comfortable spot.
@jrieken
// Place your settings in this file to overwrite the default settings
{ "javascript.validate.enable": false }
Doesn't seem to effect the red ~ for me... Am I doing it wrong?

two questions:
- what version of vs code are you running?
- this is a JavaScript file, not TypeScript?
This is a .js file (not .jsx or .ts)...

@dbaeumer Do you have ideas why that is?
@marc314 Try using the 0.10.15-insider build, and see if it changes... That same code seems to be working fine for me.
@jrieken the setting in not available in 0.10.11 (intellisense doesn't propose it either in that build)
Ok. mystery solved - @marc314 You got two options: Try out the 0.10.15-insider or wait for the next stable build is coming out very, very soon.
@jrieken @kumarharsh @dbaeumer Thanks guys! I installed the insider build and it solved my issue. Looking forward to the next stable build as well. Much obliged!
Just updated to v1.0 but spread operator is still marked as an error :disappointed:
I've also added jsconfig.json with target es6 to my project, but no luck
@albertogasparin Object spread is not es6 but up for es7 discussion. There is a setting to disable validation such that VS Code doesn't complain about the future there.
Regarding this, as a newcomer to VS Code I found the official docs very helpful.
To add what @jrieken has, you can use the eslint plugin to have eslint run, it will catch most of the same errors, but may miss some. I'm just ignoring these for now, still annoying.
The issue still exists - I'm using VS Code 1.7 and ESLint plugin for React.js