Ensure browser/extensions/screenshots/assertIsBlankDocument.js passes eslint check
Categories
(Firefox :: Screenshots, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox89 | --- | fixed |
People
(Reporter: emmamalysz, Assigned: falgunimst95)
References
Details
(Whiteboard: [outreachy-2021-screenshots])
Attachments
(1 file, 1 obsolete file)
We should fix these errors in order to enable eslint in the screenshots directory.
To find the errors:
- Temporarily comment out https://searchfox.org/mozilla-central/rev/4fa18c26fa907f38d56b599571b9846af1506f3c/.eslintignore#43-45
- Run
./mach lint browser/extensions/screenshots/assertIsBlankDocument.js
First, check if this can receive an automatic fix via:
./mach lint browser/extensions/screenshots/assertIsBlankDocument.js --fix
.
Otherwise, investigate the failures and see if it requires a manual fix
Reporter | ||
Updated•3 years ago
|
Assignee | ||
Comment 1•3 years ago
|
||
Updated•3 years ago
|
Reporter | ||
Updated•3 years ago
|
Updated•3 years ago
|
In this file browser/extensions/screenshots/assertIsBlankDocument.js
, the eslint failues that need to be manually corrected is:
'browser' is undefined in line 10
.
I could not understand where do I need to import the browser. Or is there any other way to first define the browser
variable?
Reporter | ||
Comment 3•3 years ago
|
||
To fix that error, we can include a comment that indicates browser is a global var. Here's an example:
https://searchfox.org/mozilla-central/rev/54f37fc1ac0f98b590af51e01ce82bb74179bf63/browser/extensions/screenshots/background/analytics.js#1-5
For just browser we would want,
/* globals browser */
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Pushed by emalysz@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/78344c8e1ec2 fix eslint check passes in browser/extensions/screenshots/assertIsBlankDocument.js. r=emalysz
Comment 6•3 years ago
|
||
bugherder |
Updated•3 years ago
|
Description
•