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
Require Object Literal Shorthand Syntax (object-shorthand) #1354
Comments
I'd love this. avoidQuotes
{ 'foo-bar'() {} } ignoreConstructorsWhy is this a thing, please? I don't understand how in the example the rule can figure out that it's a constructor. It determines according to the name of the function, And, again, why bother making it an exception at all? avoidExplicitReturnArrowsI kinda like it. Yes... I'd say |
A lot of eco-system breakage, still think we should do this and mass send out PRs though, the rule is fixable.
Maybe start with |
PR is up standard/eslint-config-standard#166 Just need to submit patches to all projects now 😄 |
This seems like a potential candidate rule for |
@standard/team Any feedback about this? @mcollina Any known performance issues related to this language feature? |
This is great to land, +1. |
Thoughts on enabling this rule? https://eslint.org/docs/rules/object-shorthand
ECMAScript 6 provides a concise form for defining object literal methods and properties. This syntax can make defining complex object literals much cleaner.
Here are a few common examples using the ES5 syntax:
Now here are ES6 equivalents:
Related to: #159
The text was updated successfully, but these errors were encountered: