Relax no-multi-spaces Eslint rule with ObjectExpression

RESOLVED FIXED in Firefox 46

Status

defect
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: mak, Assigned: mak)

Tracking

unspecified
mozilla46
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox46 fixed)

Details

Attachments

(1 attachment)

An example:

var containers = [
  { label: "Today",       offset: 0,  visible: true },
  { label: "Yesterday",   offset: -1, visible: true },
  { label: "Last 7 days", offset: -3, visible: true },
];
Hm, I would still prefer no spaces between the braces and the leading label and trailing value.

Can we special-case the alignment case in any way?
(In reply to :Gijs Kruitbosch from comment #1)
> Hm, I would still prefer no spaces between the braces and the leading label
> and trailing value.

this doesn't control that spacing, that is optional afaik.
This only controls the spacing after the comma.
(that is, this only allows/disallows multi-spaces, usually they are not allowed, so I'm adding exceptions to allow multi spaces when we usually use them to align)
Comment on attachment 8702911 [details]
MozReview Request: Bug 1235023 - Relax no-multi-spaces Eslint rule with ObjectExpression.r=Mossop

https://reviewboard.mozilla.org/r/29221/#review26015

rs=me
Attachment #8702911 - Flags: review?(gijskruitbosch+bugs) → review+
https://hg.mozilla.org/mozilla-central/rev/96561dda4aef
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
You need to log in before you can comment on or make changes to this bug.