Closed Bug 1229603 Opened 5 years ago Closed 5 years ago

Make most of browser/base lintable by removing non-standard syntax

Categories

(Firefox :: General, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 45
Tracking Status
firefox45 --- fixed

People

(Reporter: Felipe, Assigned: Felipe)

References

Details

Attachments

(1 file)

With the landing of bug 1228655, this extra patch removes the remaining syntax problems that eslint can't deal with in most of the browser/base code. This includes browser.js and friends.
Bug 1229603 -  Make most of browser/base lintable by removing non-standard syntax. r=Mossop
Attachment #8694494 - Flags: review?(dtownsend)
Note: the patch fixes a number of problems in browser-social.js but still adds it to the exclusion list, because it has a getter that is also a generator and I'm unsure how to make eslint accept that.
Comment on attachment 8694494 [details]
MozReview Request: Bug 1229603 -  Make most of browser/base lintable by removing non-standard syntax. r=Mossop

https://reviewboard.mozilla.org/r/26787/#review24229

Looks good assuming it is passing tests.

::: browser/base/content/pageinfo/permissions.js:300
(Diff revision 1)
> -  let entries = [{name: item[1], permission: item[0]} for (item of permissionMap)];
> +  let entries = [];

Yeah something like:

    Array.from(permissionMap, item => ({ name: item[1], permission: item[0] }));
Attachment #8694494 - Flags: review?(dtownsend) → review+
https://treeherder.mozilla.org/#/jobs?repo=try&revision=adfcc4c9a781

I'll change "function *" to "function* " before landing as I saw that in one of the proposed eslint rules
Blocks: eslint
https://hg.mozilla.org/mozilla-central/rev/fc6e4f666152
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 45
You need to log in before you can comment on or make changes to this bug.