Bug 1371292 - Clean up more ESLint global definitions in configuration files in mobile/android. r?Mossop
MozReview-Commit-ID: DuRpyDcZa20
--- a/mobile/android/.eslintrc.js
+++ b/mobile/android/.eslintrc.js
@@ -1,43 +1,11 @@
"use strict";
module.exports = {
- globals: {
- // TODO: Create custom rule for `Cu.import`
- "AddonManager": false,
- "AppConstants": false,
- "Downloads": false,
- "File": false,
- "FileUtils": false,
- "HelperApps": true, // TODO: Can be more specific here.
- "JNI": true, // TODO: Can be more specific here.
- "LightweightThemeManager": false,
- "Messaging": false,
- "Notifications": false,
- "OS": false,
- "ParentalControls": false,
- "PrivateBrowsingUtils": false,
- "Prompt": false,
- "Services": false,
- "SharedPreferences": false,
- "strings": false,
- "Strings": false,
- "Task": false,
- "TelemetryStopwatch": false,
- "UITelemetry": false,
- "UserAgentOverrides": 0,
- "XPCOMUtils": false,
- "ctypes": false,
- "exports": false,
- "importScripts": false,
- "module": false,
- "require": false,
- "uuidgen": false,
- },
rules: {
// XXX Bug 1358949 - This should be reduced down - probably to 20 or to
// be removed & synced with the mozilla/recommended value.
"complexity": ["error", 31],
// Rules enabled in mozilla/recommended, and disabled for now, we should
// re-enable these over time.
"block-spacing": "off",
--- a/mobile/android/chrome/content/.eslintrc.js
+++ b/mobile/android/chrome/content/.eslintrc.js
@@ -1,29 +1,11 @@
"use strict";
module.exports = {
- "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,
- "RokuApp": false,
- "SearchEngines": false,
- "ConsoleAPI": true,
- "Point": false,
- "Rect": false,
- },
"rules": {
"complexity": ["error", 20],
// Disabled stuff
"no-console": 0, // TODO: Can we use console?
"no-cond-assign": 0,
"no-fallthrough": 0,
}
--- a/mobile/android/components/extensions/.eslintrc.js
+++ b/mobile/android/components/extensions/.eslintrc.js
@@ -1,14 +1,5 @@
"use strict";
module.exports = {
"extends": "../../../../toolkit/components/extensions/.eslintrc.js",
-
- "globals": {
- "getCookieStoreIdForTab": false,
- "GlobalEventDispatcher": true,
- "GlobalEventManager": true,
- "tabTracker": true,
- "WindowEventManager": true,
- "windowTracker": true,
- },
};
--- a/mobile/android/components/extensions/test/mochitest/.eslintrc.js
+++ b/mobile/android/components/extensions/test/mochitest/.eslintrc.js
@@ -1,10 +1,5 @@
"use strict";
module.exports = {
"extends": "../../../../../../toolkit/components/extensions/test/mochitest/.eslintrc.js",
-
- "globals": {
- "isPageActionShown": true,
- "clickPageAction": true,
- },
};