Bug 1170804 - Set non-final eslintrc for chrome/content. r=margaret

Still a lot of errors but it's progress.
This commit is contained in:
Michael Comella 2015-06-25 10:27:38 -07:00
parent be4ab9aaba
commit ae3df68416
7 changed files with 42 additions and 4 deletions

View File

@ -3,6 +3,10 @@ tests/
# Uses `#filter substitution`
app/mobile.js
chrome/content/healthreport-prefs.js
# Uses `#expand`
chrome/content/about.js
# Not much JS to lint and non-standard at that
installer/

View File

@ -23,6 +23,7 @@ globals:
Services: false
SharedPreferences: false
strings: false
Strings: false
Task: false
TelemetryStopwatch: false
UITelemetry: false

View File

@ -0,0 +1,24 @@
globals:
# TODO: Maybe this should be by file
BrowserApp: false
Cc: false
Ci: false
Cu: false
NativeWindow: false
PageActions: false
ReaderMode: false
SimpleServiceDiscovery: false
TabMirror: false
MediaPlayerApp: false
MatchstickApp: false
RokuApp: false
SearchEngines: false
ConsoleAPI: true
Point: false
Rect: false
rules:
# Disabled stuff
no-console: 0 # TODO: Can we use console?
no-cond-assign: 0
no-fallthrough: 0

View File

@ -5,6 +5,8 @@
"use strict";
/*globals MAX_URI_LENGTH, MAX_TITLE_LENGTH */
let Reader = {
// These values should match those defined in BrowserContract.java.
STATUS_UNFETCHED: 0,

View File

@ -1,6 +1,9 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/*globals PermissionsInstaller */
let Cc = Components.classes;
let Ci = Components.interfaces;
let Cu = Components.utils;

View File

@ -4,6 +4,8 @@
"use strict";
/*globals gChromeWin */
let Ci = Components.interfaces, Cc = Components.classes, Cu = Components.utils;
Cu.import("resource://gre/modules/Services.jsm")
@ -14,14 +16,14 @@ const AMO_ICON = "chrome://browser/skin/images/amo-logo.png";
let gStringBundle = Services.strings.createBundle("chrome://browser/locale/aboutAddons.properties");
XPCOMUtils.defineLazyGetter(window, "gChromeWin", function()
XPCOMUtils.defineLazyGetter(window, "gChromeWin", function() {
window.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIWebNavigation)
.QueryInterface(Ci.nsIDocShellTreeItem)
.rootTreeItem
.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIDOMWindow)
.QueryInterface(Ci.nsIDOMChromeWindow));
.QueryInterface(Ci.nsIDOMChromeWindow)});
var ContextMenus = {
target: null,

View File

@ -6,6 +6,8 @@
*
* ***** END LICENSE BLOCK ***** */
/*globals gChromeWin */
let Ci = Components.interfaces, Cc = Components.classes, Cu = Components.utils;
Cu.import("resource://gre/modules/Services.jsm")
@ -18,14 +20,14 @@ const DEFAULT_ICON = "chrome://browser/skin/images/default-app-icon.png";
let gStrings = Services.strings.createBundle("chrome://browser/locale/aboutApps.properties");
XPCOMUtils.defineLazyGetter(window, "gChromeWin", function()
XPCOMUtils.defineLazyGetter(window, "gChromeWin", function() {
window.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIWebNavigation)
.QueryInterface(Ci.nsIDocShellTreeItem)
.rootTreeItem
.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIDOMWindow)
.QueryInterface(Ci.nsIDOMChromeWindow));
.QueryInterface(Ci.nsIDOMChromeWindow)});
document.addEventListener("DOMContentLoaded", onLoad, false);