Closed Bug 1954826 Opened 1 month ago Closed 25 days ago

ContentTaskUtils seems to be incorrectly configured as a global in eslint for tests

Categories

(Developer Infrastructure :: Lint and Formatting, task)

Tracking

(firefox138 fixed)

RESOLVED FIXED
138 Branch
Tracking Status
firefox138 --- fixed

People

(Reporter: julienw, Assigned: julienw)

References

(Regressed 1 open bug)

Details

Attachments

(2 files)

When adding this code:

const { ContentTaskUtils } = ChromeUtils.importESModule(
  "resource://testing-common/ContentTaskUtils.sys.mjs"
);

to devtools/client/performance-new/test/browser/helpers.js, I get an error due to the eslint rule mozilla/no-redeclare-with-import-autofix (this is in https://phabricator.services.mozilla.com/D240071).

According to :Standard8:

I think this definition is wrong.

I believe ContentTaskUtils isn't generally available, and we do have code to say it is available if particular function calls are made.

So we should probably remove it from there, and fix the few issues that are showing up.

I'll try removing the definition and see what happens.

Attachment #9472929 - Attachment description: Bug 1954826 - Remove ContentTaskUtils from the list of eslint globals r=standard8 → Bug 1954826 - Remove ContentTaskUtils from the list of eslint globals for tests r=standard8
Attachment #9472929 - Attachment description: Bug 1954826 - Remove ContentTaskUtils from the list of eslint globals for tests r=standard8 → WIP: Bug 1954826 - Remove ContentTaskUtils from the list of eslint globals for tests r=standard8
Attachment #9472929 - Attachment description: WIP: Bug 1954826 - Remove ContentTaskUtils from the list of eslint globals for tests r=standard8 → Bug 1954826 - Remove ContentTaskUtils from the list of eslint globals for tests r=standard8
Pushed by jwajsberg@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7581b670c001 Remove ContentTaskUtils from the list of eslint globals for tests r=frontend-codestyle-reviewers,mossop https://hg.mozilla.org/integration/autoland/rev/8ea416e43464 Add ContentTaskUtils as a global in specific test files, where it's necessary r=Standard8,translations-reviewers

I had to update some devtools test fixtures.
Here is a new try build after these updates:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=59dab9e465fbb3ca98a0cb2c7b8f80e993f52be7

Flags: needinfo?(felash)
Pushed by jwajsberg@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/190b26a351c5 Remove ContentTaskUtils from the list of eslint globals for tests r=frontend-codestyle-reviewers,mossop https://hg.mozilla.org/integration/autoland/rev/c3c6243b121d Add ContentTaskUtils as a global in specific test files, where it's necessary r=Standard8,translations-reviewers
Regressions: 1955999
No longer regressions: 1955999
Regressions: 1955999
Status: NEW → RESOLVED
Closed: 25 days ago
Resolution: --- → FIXED
Target Milestone: --- → 138 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: