Closed
Bug 1338585
Opened 8 years ago
Closed 8 years ago
Add an eslint rule to require using .ownerGlobal instead of .ownerDocument.defaultView
Categories
(Developer Infrastructure :: Lint and Formatting, defect)
Tracking
(firefox54 fixed)
RESOLVED
FIXED
mozilla54
Tracking | Status | |
---|---|---|
firefox54 | --- | fixed |
People
(Reporter: florian, Assigned: florian)
References
Details
Attachments
(1 file)
(deleted),
patch
|
jaws
:
review+
|
Details | Diff | Splinter Review |
The tree-wide cleanup was already done in bug 1334156, this is just about adding an eslint rule to enforce it.
The rule has to be disabled in a few folders and on a few lines because ownerGlobal isn't defined in content privileged windows.
Assignee | ||
Comment 1•8 years ago
|
||
Attachment #8836129 -
Flags: review?(jaws)
Comment hidden (obsolete) |
Assignee | ||
Comment 3•8 years ago
|
||
Comment 4•8 years ago
|
||
Comment on attachment 8836129 [details] [diff] [review]
Patch
Review of attachment 8836129 [details] [diff] [review]:
-----------------------------------------------------------------
::: devtools/client/.eslintrc.js
@@ +3,5 @@
> +module.exports = {
> + "rules": {
> + // See bug 1288147, the devtools front-end wants to be able to run in
> + // content privileged windows, where ownerGlobal doesn't exist.
> + "mozilla/use-ownerGlobal": 0,
Use "off" instead of 0.
::: devtools/shared/.eslintrc.js
@@ +3,5 @@
> +module.exports = {
> + "rules": {
> + // See bug 1288147, the devtools front-end wants to be able to run in
> + // content privileged windows, where ownerGlobal doesn't exist.
> + "mozilla/use-ownerGlobal": 0,
Use "off" instead of 0.
::: toolkit/components/prompts/test/.eslintrc.js
@@ +5,5 @@
> "../../../../testing/mochitest/mochitest.eslintrc.js"
> + ],
> + "rules": {
> + // ownerGlobal doesn't exist in content privileged windows.
> + "mozilla/use-ownerGlobal": 0,
Use "off" instead of 0.
::: tools/lint/eslint/eslint-plugin-mozilla/lib/index.js
@@ +51,5 @@
> "no-useless-parameters": 0,
> "no-useless-removeEventListener": 0,
> "reject-importGlobalProperties": 0,
> "reject-some-requires": 0,
> + "use-ownerGlobal": 0,
Can you please file a bug to convert these to their string alternates? You can clone bug 1316096.
Attachment #8836129 -
Flags: review?(jaws) → review+
Assignee | ||
Comment 5•8 years ago
|
||
(In reply to Jared Wein [:jaws] (please needinfo? me) from comment #4)
Thanks for the review!
> ::: tools/lint/eslint/eslint-plugin-mozilla/lib/index.js
> @@ +51,5 @@
> > "no-useless-parameters": 0,
> > "no-useless-removeEventListener": 0,
> > "reject-importGlobalProperties": 0,
> > "reject-some-requires": 0,
> > + "use-ownerGlobal": 0,
>
> Can you please file a bug to convert these to their string alternates? You
> can clone bug 1316096.
Filed bug 1339042.
Assignee | ||
Comment 6•8 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/2f98a702c07b52b0a597bddb9a155d8e138d9033
Bug 1338585 - Add an eslint rule to require using .ownerGlobal instead of .ownerDocument.defaultView, r=jaws.
Comment 7•8 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox54:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
Updated•7 years ago
|
Product: Testing → Firefox Build System
Updated•6 years ago
|
Version: Version 3 → 3 Branch
Updated•2 years ago
|
Product: Firefox Build System → Developer Infrastructure
You need to log in
before you can comment on or make changes to this bug.
Description
•