New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Object "spread" properties (stage 2 proposal) not supported #2991
Comments
JSHint does not currently support this proposed language feature. It recently reached "Stage 2" in the standardization process, though, so we are interested in adding support in a future version. |
Oh thank you @jugglinmike, any idea about how can i make jshint ignore it at least? |
Sure, you'll want to use the in-line directives args: {
+ // jshint ignore:start
...connectionArgs,
+ // jshint ignore:end
}, |
I've updated the issue title to more accurately describe the feature request. |
Would be great to have JSHint support for this, since it's now Stage 3 |
It's now in stage 3 in the standardization process and ember recommends using it in their documentation. Needed until jshint/jshint#2991 is fixed.
+1 for supporting this. It's already widely used in React/Redux |
+1. Is anyone working on this? |
+1 for getting this done. Thanks guys! |
+1 would enjoy this very much |
+1 |
1 similar comment
+1 |
Support for this language feature has been merged to the |
This comment has been minimized.
This comment has been minimized.
+1 can't wait for v2.10.0 to be released. Good job! Is there any timeline for v2.10.0? |
When running jshint@2.9.5 When I have both {
"esnext": true,
"esversion": 6,
} I get the following error:
|
Same here re: What's the timeline for |
I also get
|
The idea of that error is really "don't use both 'esversion' and 'esnext' (or 'es3', or 'es5'), afaiu. The text could be clearer, but the goal of the error seems to be "emit warnings so that eventually we can remove these options and people just use 'esversion'). @jugglinmike do you think we should just make it a non-fatal error instead, or otherwise allow explicit 'esversion' to override the legacy version options? |
@chaddjohnson That branch is available to promote transparency and to enable collaboration. You are of course welcome to run any code in this project, but please understand that we do not endorse the use of unreleased code because we do not have the bandwidth to support it. @caitp I'd prefer to disallow ambiguity rather than attempt to interpret it. I'll share more detail in a response to your pull request. |
@jugglinmike Then do you mean to say that it's impossible right now to use jshint? |
Not at all, @NatoBoram. I'm discouraging the use of unpublished versions of the project. |
Hmmm as anyone found a solution for the:
|
any resolution of this ? when will jshint support LATEST syntaxes ? |
Any word on this? I really appreciate this tool, but needing to litter my scripts with "ignore" comments is the worst. |
Would someone have time to take a look at this? I'm running 2.9.7 which is the latest version of jshint, inside Atom editor, and my React Native app code is littered with syntax errors about the spread operator in object literals. Setting "esnext":true in .jshintrc doesn't help. The tool refuses to work when both "esnext":true and "esversion":6 are set. If anyone has a workaround that works right now, would you please post it? |
Support for this feature will be available in JSHint version 2.10.0 which we expect to release early next |
We just released support for object rest/spread in JSHint version 2.10.0. |
I got something like this
And jshint its complaining about
xpected '}' to match '{' from line 167 and instead saw '...'.
What should i add to my
.jshintrc
file to allow destructing?The text was updated successfully, but these errors were encountered: