зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
8288a5976f
Коммит
b2e123ddca
|
@ -99,7 +99,6 @@ module.exports = {
|
|||
"mozilla/use-services": "warn",
|
||||
"mozilla/use-includes-instead-of-indexOf": "warn",
|
||||
"mozilla/no-compare-against-boolean-literals": "warn",
|
||||
"mozilla/reject-importGlobalProperties": "warn",
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
/* eslint-disable-next-line mozilla/reject-importGlobalProperties */
|
||||
Cu.importGlobalProperties(["TextEncoder"]);
|
||||
|
||||
let gTimer;
|
||||
|
|
|
@ -37,7 +37,6 @@ function readQuery(testCase) {
|
|||
|
||||
function handleRequest(request, response) {
|
||||
response.setHeader("Cache-Control", "no-cache", false);
|
||||
// eslint-disable-next-line mozilla/reject-importGlobalProperties
|
||||
Cu.importGlobalProperties(["URLSearchParams"]);
|
||||
let query = new URLSearchParams(request.queryString);
|
||||
// Downgrade to test http/https -> HTTP referrer policy
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
// eslint-disable-next-line mozilla/reject-importGlobalProperties
|
||||
Cu.importGlobalProperties(["URLSearchParams"]);
|
||||
|
||||
function handleRequest(request, response) {
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
// eslint-disable-next-line mozilla/use-chromeutils-import
|
||||
Cu.import("resource://gre/modules/NetUtil.jsm");
|
||||
// eslint-disable-next-line mozilla/reject-importGlobalProperties
|
||||
Cu.importGlobalProperties(["URLSearchParams"]);
|
||||
|
||||
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: {
|
||||
|
|
Загрузка…
Ссылка в новой задаче