Editor and es7 syntax


Hey, got my certificate and decided to finish advanced algorithms, for fun, before moving on to React stuff.

Here’s the problem. I’m thinking editor is using something like jshint? Cause even on arrow functions it starts asking to use “ecmascript: 6”.

I mean cmon, it’s 2017, imagine using Object assign… the horror >.<
These “errors” can throw someone new off their guard.


This would probably be better as an issue on GitHub rather than on our forums. There’s not much we can do except agree and sympathize with you :slightly_smiling_face:

I believe that the challenges are run by the browser, so if your browser supports it, it should pass. If I remember there was a comment you could write to turn off the linter, but I’m not sure.

Edit: maybe try something like this?

/* jshint esversion:6 */


// jshint esversion:6

Also, in the beta I believe some of these things are being fixed, so you might want to try it on there.


It’s normal to have to specify the JavaScript version in linters.


Just regarding object rest/spread: it isn’t part of the language. It’s only a proposal. jsversion 6 won’t help because it’s not actually in any version of the language. There is a parser option specifically for that, but not sure how easy it is to include in comments - https://eslint.org/docs/user-guide/configuring#specifying-parser-options

re Es2016/16/17, yeah, add the comment and it should work fine - should only be a warning anyway, whereas {...foo, bar} will be a syntax error