objectShorthand
, eslint/object-shorthand
#4403
Replies: 3 comments 8 replies
-
@Conaclos @ematipico sorry to prod on this one, just came across the need for it and decided to check if I raised posted it here. thoughts? |
Beta Was this translation helpful? Give feedback.
-
noUselessRename shoudl cover a part of your suggestion. We could add a rule const x = {
// ok for this
- id: function() { return this }
+ id() { return this }
// not sure about this one (don't use `this`):
- f: function() {}
+ f() {}
} |
Beta Was this translation helpful? Give feedback.
-
I did some digging. I got two distinct proposals:
I could opt for the second proposal. @ematipico @jpike88 |
Beta Was this translation helpful? Give feedback.
-
https://eslint.org/docs/latest/rules/object-shorthand
Beta Was this translation helpful? Give feedback.
All reactions