forked from mirrors/gecko-dev
Bug 1739708 - Turn off ESLint rule mozilla/reject-importGlobalProperties for sjs files. r=Gijs,webdriver-reviewers,whimboo
sjs files have a separate sandbox, and require Cu.importGlobalProperties for now. Differential Revision: https://phabricator.services.mozilla.com/D130693
This commit is contained in:
parent
8288a5976f
commit
b2e123ddca
6 changed files with 9 additions and 5 deletions
|
|
@ -99,7 +99,6 @@ module.exports = {
|
||||||
"mozilla/use-services": "warn",
|
"mozilla/use-services": "warn",
|
||||||
"mozilla/use-includes-instead-of-indexOf": "warn",
|
"mozilla/use-includes-instead-of-indexOf": "warn",
|
||||||
"mozilla/no-compare-against-boolean-literals": "warn",
|
"mozilla/no-compare-against-boolean-literals": "warn",
|
||||||
"mozilla/reject-importGlobalProperties": "warn",
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
/* Any copyright is dedicated to the Public Domain.
|
/* Any copyright is dedicated to the Public Domain.
|
||||||
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||||
|
|
||||||
/* eslint-disable-next-line mozilla/reject-importGlobalProperties */
|
|
||||||
Cu.importGlobalProperties(["TextEncoder"]);
|
Cu.importGlobalProperties(["TextEncoder"]);
|
||||||
|
|
||||||
let gTimer;
|
let gTimer;
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,6 @@ function readQuery(testCase) {
|
||||||
|
|
||||||
function handleRequest(request, response) {
|
function handleRequest(request, response) {
|
||||||
response.setHeader("Cache-Control", "no-cache", false);
|
response.setHeader("Cache-Control", "no-cache", false);
|
||||||
// eslint-disable-next-line mozilla/reject-importGlobalProperties
|
|
||||||
Cu.importGlobalProperties(["URLSearchParams"]);
|
Cu.importGlobalProperties(["URLSearchParams"]);
|
||||||
let query = new URLSearchParams(request.queryString);
|
let query = new URLSearchParams(request.queryString);
|
||||||
// Downgrade to test http/https -> HTTP referrer policy
|
// Downgrade to test http/https -> HTTP referrer policy
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
/* Any copyright is dedicated to the Public Domain.
|
/* Any copyright is dedicated to the Public Domain.
|
||||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||||
|
|
||||||
// eslint-disable-next-line mozilla/reject-importGlobalProperties
|
|
||||||
Cu.importGlobalProperties(["URLSearchParams"]);
|
Cu.importGlobalProperties(["URLSearchParams"]);
|
||||||
|
|
||||||
function handleRequest(request, response) {
|
function handleRequest(request, response) {
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@
|
||||||
|
|
||||||
// eslint-disable-next-line mozilla/use-chromeutils-import
|
// eslint-disable-next-line mozilla/use-chromeutils-import
|
||||||
Cu.import("resource://gre/modules/NetUtil.jsm");
|
Cu.import("resource://gre/modules/NetUtil.jsm");
|
||||||
// eslint-disable-next-line mozilla/reject-importGlobalProperties
|
|
||||||
Cu.importGlobalProperties(["URLSearchParams"]);
|
Cu.importGlobalProperties(["URLSearchParams"]);
|
||||||
|
|
||||||
function loadHTMLFromFile(path) {
|
function loadHTMLFromFile(path) {
|
||||||
|
|
|
||||||
|
|
@ -74,6 +74,15 @@ module.exports = {
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
// TODO Bug 1501127: sjs files have their own sandbox, and do not inherit
|
||||||
|
// the Window backstage pass directly. Turn this rule off for sjs files for
|
||||||
|
// now until we develop a solution.
|
||||||
|
files: ["**/*.sjs"],
|
||||||
|
rules: {
|
||||||
|
"mozilla/reject-importGlobalProperties": "off",
|
||||||
|
},
|
||||||
|
},
|
||||||
],
|
],
|
||||||
|
|
||||||
parserOptions: {
|
parserOptions: {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue