fix eslint errors in toolkit/components/windowcreator/test/ and toolkit/components/windowwatcher/test/

RESOLVED FIXED in Firefox 53

Status

()

RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: myk, Assigned: myk)

Tracking

unspecified
mozilla53
Points:
---

Firefox Tracking Flags

(firefox53 fixed)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

2 years ago
After moving embedding/ code to toolkit/ in bug 1309049, we should fix the eslint errors in toolkit/components/windowcreator/test/ and toolkit/components/windowwatcher/test/.
(Assignee)

Comment 1

2 years ago
Created attachment 8826386 [details] [diff] [review]
re-enable eslint with obvious fixes to windowcreator/windowwatcher
Attachment #8826386 - Flags: review?(dtownsend)
Comment on attachment 8826386 [details] [diff] [review]
re-enable eslint with obvious fixes to windowcreator/windowwatcher

Review of attachment 8826386 [details] [diff] [review]:
-----------------------------------------------------------------

::: toolkit/components/windowcreator/test/browser_bug1204626.js
@@ +15,5 @@
>                               .frameLoader
>                               .QueryInterface(Ci.nsIWebBrowserPersistable);
>      persistable.startPersistence(/* outer window ID: */ 0, {
>        onDocumentReady,
> +      onError: function onError(status) {

It was asking for named functions?
Attachment #8826386 - Flags: review?(dtownsend) → review+
(Assignee)

Comment 3

2 years ago
Created attachment 8826415 [details] [diff] [review]
reenable eslint using the method shorthand

(In reply to Dave Townsend [:mossop] from comment #2)
> It was asking for named functions?

Erm, no, sorry, it was asking for the method shorthand, per the 'object-shorthand' rule in toolkit/.eslintrc.js.

>> ./mach eslint
>/Users/myk/Projects/gecko/toolkit/components/windowcreator/test/browser_bug1204626.js
>  19:7   error  Expected method shorthand.           object-shorthand (eslint)
>  …
>  48:7   error  Expected method shorthand.           object-shorthand (eslint)
>  …
>  49:7   error  Expected method shorthand.           object-shorthand (eslint)
>  …
>  50:7   error  Expected method shorthand.           object-shorthand (eslint)
>  …
>  51:7   error  Expected method shorthand.           object-shorthand (eslint)
>  …
>/Users/myk/Projects/gecko/toolkit/components/windowcreator/test/test_bug449141.html
>  37:3  error  Expected method shorthand.    object-shorthand (eslint)
>  40:3  error  Expected method shorthand.    object-shorthand (eslint)

I misinterpreted that to mean it wanted named function expressions (even though I too was surprised by that).  Here's an updated patch that uses the method shorthand instead.
Attachment #8826386 - Attachment is obsolete: true
Attachment #8826415 - Flags: review?(dtownsend)
Comment on attachment 8826415 [details] [diff] [review]
reenable eslint using the method shorthand

Review of attachment 8826415 [details] [diff] [review]:
-----------------------------------------------------------------

That makes more sense
Attachment #8826415 - Flags: review?(dtownsend) → review+

Comment 5

2 years ago
Pushed by myk@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/0f37bb9f5af0
re-enable eslint for toolkit/components/windowcreator|windowwatcher, r=mossop

Comment 6

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/0f37bb9f5af0
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
status-firefox53: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
You need to log in before you can comment on or make changes to this bug.