Bug 1439315 - 9 - Remove no more necessary placesOverlayModules. r=standard8
MozReview-Commit-ID: Fa7b0qf4mix
--- a/tools/lint/eslint/eslint-plugin-mozilla/lib/environments/places-overlay.js
+++ b/tools/lint/eslint/eslint-plugin-mozilla/lib/environments/places-overlay.js
@@ -11,61 +11,49 @@
"use strict";
// -----------------------------------------------------------------------------
// Rule Definition
// -----------------------------------------------------------------------------
var path = require("path");
var helpers = require("../helpers");
var globals = require("../globals");
-var modules = helpers.modulesGlobalData;
const placesOverlayFiles = [
"toolkit/content/globalOverlay.js",
"browser/base/content/utilityOverlay.js"
];
const extraPlacesDefinitions = [
// Via Components.utils, defineModuleGetter, defineLazyModuleGetters or
// defineLazyScriptGetter (and map to
// single) variable.
{name: "XPCOMUtils", writable: false},
{name: "Task", writable: false},
+ {name: "PlacesUtils", writable: false},
{name: "PlacesUIUtils", writable: false},
{name: "PlacesTransactions", writable: false},
{name: "ForgetAboutSite", writable: false},
{name: "PlacesTreeView", writable: false},
{name: "PlacesInsertionPoint", writable: false},
{name: "PlacesController", writable: false},
{name: "PlacesControllerDragHelper", writable: false}
];
-const placesOverlayModules = [
- "PlacesUtils.jsm"
-];
-
function getScriptGlobals() {
let fileGlobals = [];
for (let file of placesOverlayFiles) {
let fileName = path.join(helpers.rootDir, file);
try {
fileGlobals = fileGlobals.concat(globals.getGlobalsForFile(fileName));
} catch (e) {
// The file isn't present, this is probably not an m-c repo.
}
}
- for (let file of placesOverlayModules) {
- if (file in modules) {
- for (let globalVar of modules[file]) {
- fileGlobals.push({name: globalVar, writable: false});
- }
- }
- }
-
return fileGlobals.concat(extraPlacesDefinitions);
}
function mapGlobals(fileGlobals) {
var globalObjects = {};
for (let global of fileGlobals) {
globalObjects[global.name] = global.writable;
}