Backed out 2 changesets (bug 1591013) for eslint failure at inspector/node.js on a CLOSED TREE.

Backed out changeset 5d53ab2f3152 (bug 1591013)
Backed out changeset d888aded0e70 (bug 1591013)
This commit is contained in:
Gurzau Raul 2019-10-30 00:56:04 +02:00
parent 3071f2992e
commit 29cef09b45
4 changed files with 2 additions and 15 deletions

View File

@ -82,14 +82,6 @@ module.exports = {
"rules": {
"no-unused-vars": ["error", {"args": "none", "vars": "local"}],
}
}, {
// For all server files, prevent requiring devtools/client modules.
"files": [
"server/**",
],
"rules": {
"mozilla/reject-some-requires": ["error", "^(resource\://)?devtools/client"],
}
}, {
// Cu, Cc etc... are not available in most devtools modules loaded by require.
"files": [

View File

@ -68,9 +68,6 @@ loader.lazyRequireGetter(
);
loader.lazyRequireGetter(this, "ObjectFront", "devtools/shared/fronts/object");
// This import to chrome code is forbidden according to the inspector specific
// eslintrc. TODO: Fix in Bug 1591091.
// eslint-disable-next-line mozilla/reject-some-requires
loader.lazyImporter(
this,
"DeferredTask",

View File

@ -8,8 +8,6 @@ const { Ci, Cu } = require("chrome");
// Note that this is only used in WebConsoleCommands, see $0, screenshot and pprint().
if (!isWorker) {
// TODO: Fix this server -> client import in Bug 1591055
// eslint-disable-next-line mozilla/reject-some-requires
loader.lazyImporter(
this,
"VariablesView",
@ -630,6 +628,7 @@ WebConsoleCommands._registerOriginal("pprint", function(owner, object) {
for (const name in obj) {
const desc = WebConsoleUtils.getPropertyDescriptor(obj, name) || {};
if (desc.get || desc.set) {
// TODO: Bug 842672 - toolkit/ imports modules from browser/.
const getGrip = VariablesView.getGrip(desc.get);
const setGrip = VariablesView.getGrip(desc.set);
const getString = VariablesView.getString(getGrip);

View File

@ -40,8 +40,7 @@ module.exports = function(context) {
} else if (
node.callee.type == "MemberExpression" &&
node.callee.property.type == "Identifier" &&
(node.callee.property.name == "lazyRequireGetter" ||
node.callee.property.name == "lazyImporter") &&
node.callee.property.name == "lazyRequireGetter" &&
node.arguments.length >= 3 &&
node.arguments[2].type == "Literal"
) {