Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upObject deconstruction vs. shorthand property name. #549
Comments
This comment has been minimized.
This comment has been minimized.
ifraixedes
commented
Jun 18, 2016
|
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
added
the
i wanna be the very best
label
Jun 18, 2016
This comment has been minimized.
This comment has been minimized.
|
Related #182, standard/eslint-config-standard#35 |
This comment has been minimized.
This comment has been minimized.
|
My bad, I searched for deconstruction instead of destructuring. |
leocavalcante
closed this
Jun 18, 2016
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.
leocavalcante commentedJun 17, 2016
{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 } = barAnd non-spaces for shorthand property names
const bar = {foo}