Closed Bug 1934690 Opened 1 year ago Closed 1 year ago

Unnecessary lint eslint-disable in worker-loader.sys.mjs

Categories

(DevTools :: General, task)

task

Tracking

(firefox135 fixed)

RESOLVED FIXED
135 Branch
Tracking Status
firefox135 --- fixed

People

(Reporter: arai, Assigned: arai)

Details

Attachments

(1 file)

worker-loader.sys.mjs contains the eslint-disable comment for the reject-global-this rule,

https://searchfox.org/mozilla-central/rev/48556b26b96a32672caa46b9abb6d56c234cd84f/devtools/shared/loader/worker-loader.sys.mjs#6

/* eslint-disable mozilla/reject-global-this */

but the only consumer of the global thisthis is the following:

https://searchfox.org/mozilla-central/rev/48556b26b96a32672caa46b9abb6d56c234cd84f/devtools/shared/loader/worker-loader.sys.mjs#480

var {
...
} = function () {
...
}.call(this);

Given this is an ES module, the global this is always undefined, and there's no point of calling the function with explicitly passing this.

I suppose this is an artifact from the pre-ESM code which was using the global this for defining globals, but now all the related code is rewritten with globalThis.

Pushed by arai_a@mac.com: https://hg.mozilla.org/integration/autoland/rev/24f0e5423a0a Stop using global this in worker-loader.sys.mjs. r=devtools-reviewers,nchevobbe
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 135 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: