Skip to content
This repository has been archived by the owner on Jan 9, 2019. It is now read-only.

Enforce "never" spacing for empty constructs #3

Open
aduth opened this issue Sep 26, 2016 · 0 comments
Open

Enforce "never" spacing for empty constructs #3

aduth opened this issue Sep 26, 2016 · 0 comments

Comments

@aduth
Copy link
Contributor

aduth commented Sep 26, 2016

Guideline:

No filler spaces in empty constructs (e.g., {}, [], fn()).

https://github.com/Automattic/wp-calypso/blob/master/docs/coding-guidelines/javascript.md#spacing

The configuration specifies always for array-bracket-spacing, object-curly-spacing, and space-in-parens, which while including built-in exceptions for allowing omission of spacing for empty arrays, objects, and functions, does not enforce the omissions.

The docs for the space-in-parens rule details how to define such exceptions, but it's unclear how these apply to equivalent array and object rules (confusingly, the exceptions docs show empty objects and arrays).

Related: Automattic/wp-calypso#8128 (comment) (cc @mattm @yoavf)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant