Clean up some unnecessary global definitions (location, sizeToContent) for ESLint
Categories
(Developer Infrastructure :: Lint and Formatting, task, P3)
Tracking
(firefox102 fixed)
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.
Assignee | ||
Comment 1•2 years ago
|
||
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
Comment 3•2 years ago
|
||
bugherder |
Comment 4•2 years ago
|
||
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
Updated•2 years ago
|
Description
•