Skip to content

Commit

Permalink
Fixed ESLint errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
tdulcet committed May 1, 2024
1 parent 385d65d commit 4fb466c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
9 changes: 4 additions & 5 deletions background.js
Original file line number Diff line number Diff line change
Expand Up @@ -873,11 +873,11 @@ function canceled(account, id/* , tab */) {
console.log(account, id);
const upload = uploads.get(id);
if (upload) {
if (!upload.canceled) {
if (upload.canceled) {
notification("❌ Upload already canceled", `Error: Upload of the “${upload.file.name}” file was already canceled.`);
} else {
upload.canceled = true;
notification("ℹ️ Canceling upload", `Canceling upload of the “${upload.file.name}” file.`);
} else {
notification("❌ Upload already canceled", `Error: Upload of the “${upload.file.name}” file was already canceled.`);
}
} else {
notification("❌ Unable to find file", "Error: Unable to find file to cancel upload. It may have already been deleted.");
Expand Down Expand Up @@ -978,10 +978,9 @@ init();
browser.runtime.onMessage.addListener(async (message, sender) => {

Check failure on line 978 in background.js

View workflow job for this annotation

GitHub Actions / ESLint

Expected to return a value at the end of async arrow function
// console.log(message);
switch (message.type) {
case BACKGROUND: {
case BACKGROUND:
setSettings(message.optionValue);
break;
}
case VERIFY: {
const response = {
type: VERIFY,
Expand Down
2 changes: 1 addition & 1 deletion common.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const numberFormat = new Intl.NumberFormat();
* @returns {string}
*/
export function outputunit(number, scale) {
let str = "";
let str;

const scale_base = scale ? 1000 : 1024;

Expand Down
4 changes: 2 additions & 2 deletions popup/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ document.getElementById("toggle").addEventListener("change", (event) => {
password.focus();
});

document.getElementById("generate").addEventListener("click", (event) => {
document.getElementById("generate").addEventListener("click", (/* event */) => {
let apassword = "";
let atext = "";

Expand Down Expand Up @@ -199,7 +199,7 @@ document.getElementById("settings").addEventListener("click", (event) => {
});
});

addEventListener("beforeunload", (event) => {
addEventListener("beforeunload", (/* event */) => {
if (!eventHasBeenSend) {
const response = {
type: POPUP,
Expand Down

0 comments on commit 4fb466c

Please sign in to comment.