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

Structuring name duplicate #223

Closed
dcousens opened this issue Aug 5, 2015 · 2 comments

Comments

@dcousens
Copy link
Member

commented Aug 5, 2015

I'm not sure of exact name for this syntax, but [assuming ES6 is detected], should we allow both of these syntaxes:

{ x: x } and { x }?
Or should we force { x } if both the lhs and rhs match?

@dcousens dcousens added the question label Aug 5, 2015

@feross

This comment has been minimized.

Copy link
Member

commented Aug 5, 2015

Right now, we're not actively pushing people toward ES6 features, so I'm -1.

If we end up detecting ES6 (discussion here: #159) then we should recommend { x } over { x: x } - agreed.

@feross feross closed this Aug 5, 2015

@jokeyrhyme

This comment has been minimized.

Copy link

commented Sep 15, 2015

@dcousens ESLint calls this "object shorthand properties" and "object shorthand methods", and has an object-shorthand rule.

@lock lock bot locked as resolved and limited conversation to collaborators May 11, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
3 participants
You can’t perform that action at this time.