Closed Bug 1288830 Opened 4 years ago Closed 4 years ago

Start running ESLint on some of the performance tool

Categories

(DevTools :: Performance Tools (Profiler/Timeline), defect, P1)

50 Branch
defect

Tracking

(firefox50 fixed)

RESOLVED FIXED
Firefox 50
Tracking Status
firefox50 --- fixed

People

(Reporter: gregtatum, Assigned: gregtatum)

Details

Attachments

(1 file)

Begin the process of converting the performance tool over to using ESLint.
Assignee: nobody → gtatum
Priority: -- → P1
This should be fairly straight forward. The only scary thing I did was remove
`const { Cc, Ci, Cu, Cr } = require("chrome");` from `devtools/client/performance/panel.js`
as it didn't appear to be used, or in the same global scope as the other files.

For the most part I kept all of the lint comments at the beginning of the files, except
for performance controller which had a large amount. I kept those near to the declarations
so they'll be easier to (eventually) clean-up.
Attachment #8773939 - Flags: review?(jsantell)
Comment on attachment 8773939 [details] [diff] [review]
Start to lint parts of the performance tool

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

::: devtools/client/performance/performance-controller.js
@@ +2,5 @@
>   * License, v. 2.0. If a copy of the MPL was not distributed with this file,
>   * You can obtain one at http://mozilla.org/MPL/2.0/. */
>  "use strict";
>  
> +/* globals document, PerformanceView, ToolbarView, RecordingsView, DetailsView */

You may find it simpler to use the import-globals-from <FILE> syntax, such as this[1] example:

/* import-globals-from ../../debugger-controller.js */

[1]: https://dxr.mozilla.org/mozilla-central/rev/4c05938a64a7fde3ac2d7f4493aee1c5f2ad8a0a/devtools/client/debugger/content/views/event-listeners-view.js#7
Comment on attachment 8773939 [details] [diff] [review]
Start to lint parts of the performance tool

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

lgtm
Attachment #8773939 - Flags: review?(jsantell) → review+
Keywords: checkin-needed
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/fx-team/rev/2d23f317a203
Start to lint parts of the performance tool. r=jsantell
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/2d23f317a203
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 50
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.