make developer-toolbar eslint-clean

RESOLVED FIXED in Firefox 52

Status

P3
normal
RESOLVED FIXED
2 years ago
4 months ago

People

(Reporter: tromey, Assigned: tromey)

Tracking

(Blocks: 1 bug)

unspecified
Firefox 52

Firefox Tracking Flags

(firefox52 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

2 years ago
I happened to notice an eslint exclusion for developer-toolbar.js.
This bug is for converting it to be eslint-clean.
(Assignee)

Comment 1

2 years ago
Most of the patch is obvious but I converted |show| to use Task.spawn in order
to avoid an eslint error about too many nested functions.
Comment hidden (mozreview-request)
Priority: -- → P3
(Assignee)

Updated

2 years ago
Blocks: 1231957

Comment 3

2 years ago
mozreview-review
Comment on attachment 8809575 [details]
Bug 1316700 - make developer-toolbar.js eslint-clean;

https://reviewboard.mozilla.org/r/92124/#review92120

Thanks, looks like a great cleanup, especially with all the indentation cleanup!

::: devtools/client/shared/developer-toolbar.js:427
(Diff revision 1)
>      return this._showPromise;
>    }
>  
> +  this._showPromise = Task.spawn((function* () {
> -  // hide() is async, so ensure we don't need to wait for hide() to finish
> +    // hide() is async, so ensure we don't need to wait for hide() to finish
> -  var waitPromise = this._hidePromise || promise.resolve();
> +    yield this._hidePromise || promise.resolve();

Hmm, what's the precedence of `yield` vs. `||`?

Probably the following is easier to follow:

```
if (this._hidePromise) {
  yield this._hidePromise;
}
```
Attachment #8809575 - Flags: review?(jryans) → review+
Comment hidden (mozreview-request)

Comment 5

2 years ago
Pushed by ttromey@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a9d5f467f78d
make developer-toolbar.js eslint-clean; r=jryans

Comment 6

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/a9d5f467f78d
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
status-firefox52: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 52

Updated

4 months ago
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.