Closed Bug 1768175 Opened 2 years ago Closed 2 years ago

Clean up some unnecessary global definitions (location, sizeToContent) for ESLint

Categories

(Developer Infrastructure :: Lint and Formatting, task, P3)

Tracking

(firefox102 fixed)

RESOLVED FIXED
102 Branch
Tracking Status
firefox102 --- fixed

People

(Reporter: standard8, Assigned: standard8)

Details

Attachments

(2 files)

In bug 1509270 we defined location as a global variable and allowed it to be written to. This was because at the time, the globals definition said it couldn't be written to. This was fixed ages ago, and has been in ESLint for a while, so we can drop the definition.

We also define sizeToContent for everywhere, but in reality this only applies to browser-window scopes. There's only two places in the tree that use it as sizeToContent(), everywhere else uses window.sizeToContent(). As this is not on a standards track, I think it is reasonable to require this to use the window form.

The 'location: true' addition has filtered down to ESLint a while ago, so we no longer need to define it ourselves.
sizeToContent can be used from the window object directly.

Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/247c55ef102e
Clean up some unnecessary global definitions (location, sizeToContent) for ESLint. r=Gijs
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 102 Branch
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/1c42c3b82bbb
Port Bug 1768175 - Clean up some unnecessary global definitions (sizeToContent) for ESLint. r=aleca
Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: