Closed
Bug 1171460
Opened 9 years ago
Closed 9 years ago
ESLint: Reconfigure comma-dangle
Categories
(DevTools :: General, defect)
DevTools
General
Tracking
(firefox41 fixed)
RESOLVED
FIXED
Firefox 41
Tracking | Status | |
---|---|---|
firefox41 | --- | fixed |
People
(Reporter: jryans, Assigned: jryans)
References
Details
Attachments
(1 file)
1.19 KB,
patch
|
pbro
:
review+
|
Details | Diff | Splinter Review |
The current setting of: "comma-dangle": 1, warns for trailing commas in objects, etc. But, I find these are helpful in most cases, so that when you add a new item below, you don't have to worry about the previous item. Anyway, to me I don't think this style point matters too much: it's fine to have them, and fine to not have them.
Comment 1•9 years ago
|
||
As discussed on IRC: <pbro> jryans: I don't feel strongly at all about that rule, I don't think it's big deal if we are inconsistent on this, it doesn't hurt readability of the code, and can't be a runtime problem anyway. I disallowed it in the original version because we had 3 persons agree on that in the ehterpad
Assignee | ||
Comment 2•9 years ago
|
||
Comment 3•9 years ago
|
||
Comment on attachment 8615348 [details] [diff] [review] 0001-Bug-1171460-ESLint-Allow-trailing-commas.-r-pbrosset.patch Review of attachment 8615348 [details] [diff] [review]: ----------------------------------------------------------------- ::: browser/devtools/.eslintrc @@ +31,5 @@ > // start and end braces on the same line. > "brace-style": [2, "1tbs", {"allowSingleLine": false}], > // Require camel case names > "camelcase": 2, > + // Allow trailing commas. Could you elaborate why we allow trailing commas in this comment? Mention that that they make it easy to add new items to lists, and that they don't hurt readability of the code, etc..
Attachment #8615348 -
Flags: review?(pbrosset) → review+
Comment 4•9 years ago
|
||
I should add: I think these comments are very useful because they are basically our style-guide.
https://hg.mozilla.org/mozilla-central/rev/ec9aa7541e4a
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox41:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 41
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•