Bug 1881094 - 8. remove some eslint exclusions for firefox-android, using mach lint --fix r=android-reviewers,frontend-codestyle-reviewers,webcompat-reviewers,denschub,Gijs,gl

This eliminates some eslint errors on firefox-android code by running 'mach lint --linter=eslint --fix'.
The eslint --fix only addresses a few simple issues, but this allows us to remove some lint exclusions.

Differential Revision: https://phabricator.services.mozilla.com/D210107
This commit is contained in:
Geoff Brown 2024-05-14 13:59:26 +00:00
parent c2874fbf0c
commit 7a89041656
11 changed files with 19 additions and 50 deletions

View file

@ -191,32 +191,20 @@ mobile/android/installer/
mobile/android/locales/
# TODO - Bug 1881094: temporarily ignored for firefox-android migration
mobile/android/android-components/components/browser/engine-system/src/main/res/raw/domain_blocklist.json
mobile/android/android-components/components/browser/engine-system/src/main/res/raw/domain_safelist.json
mobile/android/android-components/components/browser/errorpages/src/main/assets/errorPageScripts.js
mobile/android/android-components/components/browser/errorpages/src/main/assets/error_page_js.html
mobile/android/android-components/components/browser/icons/src/main/assets/extensions/browser-icons/icons.js
mobile/android/android-components/components/browser/session-storage/src/androidTest/assets/index.html
mobile/android/android-components/components/concept/engine/src/test/resources/manifests/example_mdn.json
mobile/android/android-components/components/concept/engine/src/test/resources/manifests/invalid_json.json
mobile/android/android-components/components/concept/engine/src/test/resources/manifests/spec_typical.json
mobile/android/android-components/components/concept/engine/src/test/resources/manifests/twitter_mobile.json
mobile/android/android-components/components/feature/accounts/src/main/assets/extensions/fxawebchannel/background.js
mobile/android/android-components/components/feature/accounts/src/main/assets/extensions/fxawebchannel/fxawebchannel.js
mobile/android/android-components/components/feature/addons/src/test/resources/collection.json
mobile/android/android-components/components/feature/addons/src/test/resources/collection_with_empty_values.json
mobile/android/android-components/components/feature/addons/src/test/resources/localized_collection.json
mobile/android/android-components/components/feature/readerview/src/main/assets/extensions/readerview/
mobile/android/android-components/components/feature/search/src/main/assets/extensions/ads/adsTelemetry.js
mobile/android/android-components/components/feature/search/src/main/assets/extensions/search/searchTelemetry.js
mobile/android/android-components/components/feature/webcompat-reporter/src/main/assets/
mobile/android/android-components/components/feature/webcompat/src/main/assets/extensions/webcompat/
mobile/android/android-components/docs/assets/js/icon-js.js
mobile/android/android-components/samples/browser/src/main/assets/extensions/test/background.js
mobile/android/fenix/app/src/androidTest/assets/
mobile/android/fenix/app/src/androidTest/java/org/mozilla/fenix/syncintegration/
mobile/android/fenix/app/src/main/assets/
mobile/android/focus-android/app/src/androidTest/assets/
mobile/android/android-components/docs/assets/js/icon-js.js
# Pre-processed/pref files
modules/libpref/greprefs.js

View file

@ -1,11 +0,0 @@
/* 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/. */
"use strict";
module.exports = {
rules: {
"prefer-const": "error",
},
};

View file

@ -66,12 +66,10 @@ function updateShowSSL(queryMap) {
const showSSL = queryMap.showSSL;
if (typeof document.addCertException === "undefined") {
document.getElementById("advancedButton").style.display = "none";
} else if (showSSL === "true") {
document.getElementById("advancedButton").style.display = "block";
} else {
if (showSSL === "true") {
document.getElementById("advancedButton").style.display = "block";
} else {
document.getElementById("advancedButton").style.display = "none";
}
document.getElementById("advancedButton").style.display = "none";
}
}

View file

@ -76,7 +76,7 @@ collect_meta_name_icons(icons, "msapplication-TileImage");
let message = {
url: document.location.href,
icons: icons,
icons,
};
browser.runtime.sendNativeMessage("MozacBrowserIcons", message);

View file

@ -296,7 +296,7 @@ function fetchDocument(url) {
function getPreparedDocument(id, url) {
return new Promise((resolve, reject) => {
browser.runtime
.sendMessage({ action: "getSerializedDoc", id: id })
.sendMessage({ action: "getSerializedDoc", id })
.then(serializedDoc => {
if (serializedDoc) {
let doc = new JSDOMParser().parse(serializedDoc, url);
@ -361,7 +361,7 @@ function connectNativePort() {
break;
case "checkReaderState":
port.postMessage({
baseUrl: baseUrl,
baseUrl,
activeUrl: articleUrl,
readerable: true,
});

View file

@ -52,8 +52,8 @@ function getCookies() {
value = value.join("=");
result.push({
name: name,
value: value,
name,
value,
});
});

View file

@ -31,8 +31,8 @@ function getCookies() {
value = value.join("=");
result.push({
name: name,
value: value,
name,
value,
});
});

View file

@ -86,11 +86,8 @@ function getFile(iconName, downloadUrl) {
addSingleItemToTable("Loading");
let promises = [];
for (let i = 0; i < response.length; i++) {
let iconName = response[i]["name"].substr(
0,
response[i]["name"].length - 4
);
promises.push(getFile(iconName, response[i]["download_url"]));
let iconName = response[i].name.substr(0, response[i].name.length - 4);
promises.push(getFile(iconName, response[i].download_url));
}
Promise.all(promises).then(values => {
document.querySelector("#preview_table > tbody").innerHTML = "";

View file

@ -24,10 +24,9 @@
if (currentCookie.localeCompare("REFRESHED") == 0) {
setCookie("DEFAULT");
return "DEFAULT";
} else {
setCookie("REFRESHED");
return "REFRESHED";
}
setCookie("REFRESHED");
return "REFRESHED";
}
var textToShow = valSwap();

View file

@ -75,7 +75,7 @@
updateCookieStatus(event.data, list);
}
});
}, false);
});
</script>
</body>
</html>

View file

@ -67,12 +67,10 @@ function updateShowSSL(queryMap) {
const showSSL = queryMap.showSSL;
if (typeof document.addCertException === "undefined") {
document.getElementById("advancedButton").style.display = "none";
} else if (showSSL === "true") {
document.getElementById("advancedButton").style.display = "block";
} else {
if (showSSL === "true") {
document.getElementById("advancedButton").style.display = "block";
} else {
document.getElementById("advancedButton").style.display = "none";
}
document.getElementById("advancedButton").style.display = "none";
}
}