Closed
Bug 1486741
Opened 6 years ago
Closed 6 years ago
Enable ESLint rule comma-dangle for all of mozilla-central
Categories
(Core :: General, enhancement, P1)
Core
General
Tracking
()
RESOLVED
FIXED
mozilla64
People
(Reporter: standard8, Assigned: standard8)
References
Details
Attachments
(3 files, 1 obsolete file)
As discussed on firefox-dev and dev.platform, we should require dangling commas for multi-line object/arrays in Javascript code for mozilla-central. Why: - Multiple components in toolkit/ and browser/ already have comma-dangle enabled. - Having asked around in a few locations, I'm seeing support from the Firefox developer team and others in favour of enabling it. - It helps make blame cleaner. - It makes editing easier, and helps for a consistent style. - Having automation available to cover the requirement reduces the need for review nits. This bug is for the second half of the files, those not already enabled by bug 1486739. I am hoping to land this bug on Friday 19 October (GMT timezone), ahead of the 64 merges.
Comment 1•6 years ago
|
||
This auto-rewriting won't touch anything in js/src/tests or js/src/jit-test, will it? Absence of a trailing comma can't be presumed to be meaningless there, and much of the former is imported anyway.
Assignee | ||
Comment 2•6 years ago
|
||
(In reply to Jeff Walden [:Waldo] from comment #1) > This auto-rewriting won't touch anything in js/src/tests or js/src/jit-test, > will it? Absence of a trailing comma can't be presumed to be meaningless > there, and much of the former is imported anyway. They are ignored by default for ESLint, so they won't be touched: https://searchfox.org/mozilla-central/rev/55da592d85c2baf8d8818010c41d9738c97013d2/.eslintignore#284,292,294
Comment 3•6 years ago
|
||
I hope this change will also be applied to /testing? Specifically for testing/marionette we want to adopt as much of the repository-wide lint rules as possible.
Assignee | ||
Comment 4•6 years ago
|
||
(In reply to Andreas Tolfsen ﹝:ato﹞ from comment #3) > I hope this change will also be applied to /testing? Specifically > for testing/marionette we want to adopt as much of the repository-wide > lint rules as possible. It will be applied for everywhere that ESLint is enabled (i.e. anywhere not ignored by .eslintignore). Note: comma-dangle is already enabled for testing/marionette, so all that will happen there is the sub-directory specific configuration will be removed in preference to the main one (tools/lint/eslint/eslint-plugin-mozilla/lib/configs/recommended.js).
Assignee | ||
Comment 5•6 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=7a9bcbb2615df11c08371ea5722ab21e64db0d7a
Assignee | ||
Comment 6•6 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=ba38826371ea7a79a72322eb39a92534f5295968
Assignee | ||
Comment 7•6 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=50381fa64622383d3e972f5940b8160c1a6500ee
Updated•6 years ago
|
Priority: -- → P1
Assignee | ||
Comment 8•6 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=43f37dc9e3527d76232e796b30f08db85bf4b9dd
Assignee | ||
Comment 9•6 years ago
|
||
Updated•6 years ago
|
Attachment #9016296 -
Attachment is obsolete: true
Assignee | ||
Comment 10•6 years ago
|
||
Assignee | ||
Comment 11•6 years ago
|
||
Depends on D8389
Assignee | ||
Comment 12•6 years ago
|
||
Depends on D8391
Assignee | ||
Comment 13•6 years ago
|
||
Try push: https://treeherder.mozilla.org/#/jobs?repo=try&revision=b602cb2eb9e8a6102beff52b1e016ff88a293a0d&selectedJob=204791782
Assignee | ||
Comment 14•6 years ago
|
||
Note: Aiming for landing next Friday (19th Oct)
Comment 15•6 years ago
|
||
Pushed by mbanner@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/edc4ae8f78e2 Enable ESLint rule comma-dangle for all of mozilla-central (automatic fixes). r=mossop https://hg.mozilla.org/integration/autoland/rev/988056e6d054 Enable ESLint rule comma-dangle for all of mozilla-central (manual fixes). r=mossop https://hg.mozilla.org/integration/autoland/rev/1ac84aa579d6 Enable ESLint rule comma-dangle for all of mozilla-central (setup ESLint). r=mossop
Comment 16•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/edc4ae8f78e2 https://hg.mozilla.org/mozilla-central/rev/988056e6d054 https://hg.mozilla.org/mozilla-central/rev/1ac84aa579d6
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox64:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
Comment 17•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/345543cd8045
Updated•6 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•