🎉 Object Rest/Spread Properties arrived at stage 4
See original GitHub issuehttps://github.com/tc39/proposals/commit/7a04292f2e6f11fbcfef8a7b20a0bf5aedba79a4
It’s the time to update our rules to be according to the current ESTree spec.
- Update Espree to support the syntax in
ecmaVersion:2018
. I think we should keepecmaFeatures.experimentalObjectRestSpread
to avoid breaking changes.- If
ecmaVersion:2018
and noecmaFeatures.experimentalObjectRestSpread
, Espree generatesRestElement
/SpreadElement
. - If
ecmaFeatures.experimentalObjectRestSpread:true
, Espree generatesExperimentalRestProperty
/ExperimentalSpreadProperty
as is.
- If
- Update core rules to support the syntax.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:5
- Comments:15 (14 by maintainers)
Top Results From Across the Web
An Easy Guide to Object Rest/Spread Properties in JavaScript
Object spread allows easily to clone, merge, extend objects. While object rest collects rest of properties after destructuring.
Read more >ECMAScript - Object Rest/Spread Properties in ES2018 (ES9)
This article will examine the "Object Rest/Spread Properties" proposal which has been reached stage 4 in the TC39 process and will be ...
Read more >Why using object spread with reduce probably a bad idea
Explore why using object spread with .reduce() can sometimes significantly affect the performance of your JavaScript apps and libraries.
Read more >Tweets with replies by swisstofu (@swisstofu) / Twitter
No need to implement list formatting yourself The Intl.ListFormat object ... Rest/spread for properties made it to stage 4 and will be part...
Read more >Changelog - Cypress Documentation
Upgraded the bundled electron version shipped with Cypress from 18.0.4 to 18.3.0 . ... including async/await, object rest spread, and class properties.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@ljharb A similar argument could be made for
no-dupe-keys
with getters on the keys. The recommendation in both cases is the same: Use inline disable comments judiciously, or don’t use the rule. We can’t expect rules to account for all possible edge cases. 😄I don’t have a problem with ESLint getting confused if someone is using object spread for the purpose of repeatedly invoking a getter with side-effects, because anyone reading that code will probably be confused too.