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 upRule suggestion: No spaces in empty array/object declaration #555
Comments
This comment has been minimized.
This comment has been minimized.
|
Not particularly fussed on this one, I'm fine with it either way |
This comment has been minimized.
This comment has been minimized.
|
I would also be fine with either way, would prefer it if one of them was enforce though, and I have almost only seen without spaces being used in the community... |
dcousens
added
the
enhancement
label
Jun 28, 2016
This comment has been minimized.
This comment has been minimized.
|
+1 for |
This comment has been minimized.
This comment has been minimized.
|
This sounds good to me. Surprised that this isn't already part of the |
feross
added
blocked
help wanted
labels
Jul 13, 2016
This comment has been minimized.
This comment has been minimized.
|
@LinusU Can you open this as an issue on ESLint to see what the ESLint team thinks? There's nothing we can do in Once this is part of ESLint, I will notice it in the changelog when I upgrade the ESLint version or you can open an issue/PR to add the rule. |
feross
closed this
Aug 19, 2016
This comment has been minimized.
This comment has been minimized.
|
Done: eslint/eslint#7380 |
This comment has been minimized.
This comment has been minimized.
|
Re-opened as eslint/eslint#7927 |
This comment has been minimized.
This comment has been minimized.
|
Thank you ❤ |
LinusU commentedJun 27, 2016
I would like to propose a rule that prohibits writing empty objects as
{ }and instead enforces the shorter{}which I think is more commonly used. The same would be true for arrays, it should enforce[]instead of[ ].Thoughts? If this is wanted I could probably whip up a pull request towards es-lint.