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
Closed

Structuring name duplicate #223

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

Comments

@dcousens
Copy link
Member

dcousens 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?

@feross
Copy link
Member

feross 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 as completed Aug 5, 2015
@jokeyrhyme
Copy link

@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.
Labels
Projects
Archived in project
Development

No branches or pull requests

3 participants