diff --git a/mobile/android/.eslintrc.js b/mobile/android/.eslintrc.js index 2db1a54294ed..e64585fff32c 100644 --- a/mobile/android/.eslintrc.js +++ b/mobile/android/.eslintrc.js @@ -1,14 +1,6 @@ "use strict"; module.exports = { - rules: { - // Rules enabled in mozilla/recommended, and disabled for now, we should - // re-enable these over time. - "consistent-return": "off", - "no-empty": "off", - "no-redeclare": "off", - }, - "overrides": [{ files: [ // Bug 1425048 - mainly going away, see bug 1583370. diff --git a/mobile/android/actors/LoadURIDelegateChild.jsm b/mobile/android/actors/LoadURIDelegateChild.jsm index bf0c0171884a..e6b482fb808a 100644 --- a/mobile/android/actors/LoadURIDelegateChild.jsm +++ b/mobile/android/actors/LoadURIDelegateChild.jsm @@ -51,7 +51,7 @@ class LoadURIDelegateChild extends GeckoViewActorChild { if (!this.isContentWindow) { debug`loadURI: not a content window`; // This is an internal Gecko window, nothing to do - return; + return false; } return LoadURIDelegate.load( @@ -72,7 +72,7 @@ class LoadURIDelegateChild extends GeckoViewActorChild { if (!this.isContentWindow) { // This is an internal Gecko window, nothing to do debug`handleLoadError: not a content window`; - return; + return null; } if (aUri && LoadURIDelegate.isSafeBrowsingError(aError)) { diff --git a/mobile/android/components/extensions/ext-utils.js b/mobile/android/components/extensions/ext-utils.js index c07d2f898743..d8d42f5ea2cf 100644 --- a/mobile/android/components/extensions/ext-utils.js +++ b/mobile/android/components/extensions/ext-utils.js @@ -14,7 +14,6 @@ ChromeUtils.defineModuleGetter( "resource://gre/modules/GeckoViewTab.jsm" ); -/* globals EventDispatcher */ var { EventDispatcher } = ChromeUtils.import( "resource://gre/modules/Messaging.jsm" ); diff --git a/mobile/android/components/geckoview/GeckoViewPermission.js b/mobile/android/components/geckoview/GeckoViewPermission.js index ebe4910f72e7..695d661b0d57 100644 --- a/mobile/android/components/geckoview/GeckoViewPermission.js +++ b/mobile/android/components/geckoview/GeckoViewPermission.js @@ -116,7 +116,7 @@ GeckoViewPermission.prototype = { }) .then(devices => { if (win.closed) { - return; + return Promise.resolve(); } let sources = devices.map(device => { diff --git a/mobile/android/components/geckoview/GeckoViewPrompt.js b/mobile/android/components/geckoview/GeckoViewPrompt.js index 0f530d783813..de1684ae1f6e 100644 --- a/mobile/android/components/geckoview/GeckoViewPrompt.js +++ b/mobile/android/components/geckoview/GeckoViewPrompt.js @@ -484,7 +484,7 @@ PromptDelegate.prototype = { _showPrompt(aMsg) { let result = undefined; if (!this._domWin || !this._changeModalState(/* aEntering */ true)) { - return; + return result; } try { this.asyncShowPrompt(aMsg, res => (result = res)); diff --git a/mobile/android/geckoview/src/androidTest/assets/www/hungScript.html b/mobile/android/geckoview/src/androidTest/assets/www/hungScript.html index 8595725df149..695ff5392e94 100644 --- a/mobile/android/geckoview/src/androidTest/assets/www/hungScript.html +++ b/mobile/android/geckoview/src/androidTest/assets/www/hungScript.html @@ -5,7 +5,8 @@ - \ No newline at end of file + diff --git a/mobile/android/modules/geckoview/GeckoViewMedia.jsm b/mobile/android/modules/geckoview/GeckoViewMedia.jsm index bfdc34cbd8f7..02ebe879cdd1 100644 --- a/mobile/android/modules/geckoview/GeckoViewMedia.jsm +++ b/mobile/android/modules/geckoview/GeckoViewMedia.jsm @@ -81,6 +81,8 @@ const GeckoViewRecordingMedia = { return STATUS_RECORDING; case MediaManagerService.STATE_NOCAPTURE: return STATUS_INACTIVE; + default: + throw new Error("Unexpected activityStatus value"); } }; diff --git a/mobile/android/modules/geckoview/GeckoViewUtils.jsm b/mobile/android/modules/geckoview/GeckoViewUtils.jsm index e91c77024ad2..82b6e3b4cc45 100644 --- a/mobile/android/modules/geckoview/GeckoViewUtils.jsm +++ b/mobile/android/modules/geckoview/GeckoViewUtils.jsm @@ -482,7 +482,7 @@ var GeckoViewUtils = { } } - return aLogger[aLevel.toLowerCase()](strs, ...aExprs); + aLogger[aLevel.toLowerCase()](strs, ...aExprs); }, }; diff --git a/mobile/android/tests/browser/chrome/test_android_log.html b/mobile/android/tests/browser/chrome/test_android_log.html index b1cd6ac14910..70dcac433309 100644 --- a/mobile/android/tests/browser/chrome/test_android_log.html +++ b/mobile/android/tests/browser/chrome/test_android_log.html @@ -12,8 +12,6 @@ Migrated from Robocop: https://bugzilla.mozilla.org/show_bug.cgi?id=1184186