Enable ESLint rule comma-dangle for browser/, services/, taskcluster/ and toolkit/

RESOLVED FIXED in Firefox 63

Status

()

RESOLVED FIXED
7 months ago
6 months ago

People

(Reporter: standard8, Assigned: standard8)

Tracking

unspecified
mozilla63
Points:
---

Firefox Tracking Flags

(firefox63 fixed)

Details

Attachments

(3 attachments)

(Assignee)

Description

7 months ago
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 first half of the files, namely those in:

browser/
services/
taskcluster/
toolkit/

In the patches I'm effectively enabling the rule for ESLint by default, and then blacklisting the other directories.

I am hoping to land this bug on Friday 31 August (GMT timezone), ahead of the 63 merges.
(Assignee)

Comment 1

7 months ago
Current stats: 1576 files changed, 7754 insertions(+), 7753 deletions(-)
(Assignee)

Updated

7 months ago
Blocks: 1486741
(Assignee)

Comment 2

7 months ago
Automatic changes by ESLint, except for manual corrections for .xml files.
(Assignee)

Comment 3

7 months ago
Enable globally by default by blacklist directories outside of the ones we're enabling. Remove now unnecessary existing configurations.
(Assignee)

Updated

7 months ago
Duplicate of this bug: 1476226
Comment on attachment 9004528 [details]
Bug 1486739 - Enable ESLint rule comma-dangle for browser/, services/, taskcluster/ and toolkit/ directories.

Dave Townsend [:mossop] has approved the revision.
Attachment #9004528 - Flags: review+
Comment on attachment 9004527 [details]
Bug 1486739 - Add missing dangling commas in browser/, services/, taskcluster/ and toolkit/.

Dave Townsend [:mossop] has approved the revision.
Attachment #9004527 - Flags: review+
(Assignee)

Comment 8

7 months ago
Up to date try push with a couple of extra comma fixes. I'll be landing this tomorrow morning UK time.

Comment 10

7 months ago
Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d7fcfbc15cfe
Add missing dangling commas in browser/, services/, taskcluster/ and toolkit/. r=mossop

Comment 11

7 months ago
Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1bc6d1a2d201
Enable ESLint rule comma-dangle for browser/, services/, taskcluster/ and toolkit/ directories. r=mossop

Comment 12

7 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/d7fcfbc15cfe
https://hg.mozilla.org/mozilla-central/rev/1bc6d1a2d201
Status: NEW → RESOLVED
Last Resolved: 7 months ago
status-firefox63: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla63

Comment 13

6 months ago
Commit pushed to master at https://github.com/mozilla/activity-stream

https://github.com/mozilla/activity-stream/commit/2076b6d27823afbdeef4abcfc0efe79a40acd13b
Port Bug 1486739 - Enable ESLint rule comma-dangle for browser/, services/, taskcluster/ and toolkit/ directories. r=mossop
You need to log in before you can comment on or make changes to this bug.