Skip to content
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 deconstruction vs. shorthand property name. #549

Closed
leocavalcante opened this issue Jun 17, 2016 · 3 comments
Closed

Object deconstruction vs. shorthand property name. #549

leocavalcante opened this issue Jun 17, 2016 · 3 comments

Comments

@leocavalcante
Copy link

{foo}

I've seeing people deconstructing just like they construct new objects using shorthand property names. Since there is such standard like space after function name to distinguish function declarations from function calls, then should be nice to have a pattern for this case too.

I usually use spaces for deconstructing:
{ foo } = bar

And non-spaces for shorthand property names
const bar = {foo}

@ifraixedes
Copy link

My personal opinions on these kind of rules, is to choose one an used everywhere, less rules are easy to remember than having more and special case; at the end these kind of rules are a matter of style

@dcousens
Copy link
Member

dcousens commented Jun 18, 2016

Related #182, standard/eslint-config-standard#35

@leocavalcante
Copy link
Author

My bad, I searched for deconstruction instead of destructuring.

@lock lock bot locked as resolved and limited conversation to collaborators May 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

3 participants