WIP ESLint fixes

This commit is contained in:
2025-03-28 11:35:51 +01:00
parent 4b9df95721
commit 9a905e83f7
40 changed files with 92 additions and 91 deletions

View File

@ -44,7 +44,7 @@ export class APIClient {
*/
static async exec(args: RequestParams): Promise<APIResponse> {
let body: string | undefined | FormData = undefined;
let headers: any = {};
const headers: any = {};
// JSON request
if (args.jsonData) {
@ -67,17 +67,17 @@ export class APIClient {
const res: XMLHttpRequest = await new Promise((resolve, reject) => {
const xhr = new XMLHttpRequest();
xhr.upload.addEventListener("progress", (e) =>
args.upProgress!(e.loaded / e.total)
{ args.upProgress!(e.loaded / e.total); }
);
xhr.addEventListener("load", () => resolve(xhr));
xhr.addEventListener("load", () => { resolve(xhr); });
xhr.addEventListener("error", () =>
reject(new Error("File upload failed"))
{ reject(new Error("File upload failed")); }
);
xhr.addEventListener("abort", () =>
reject(new Error("File upload aborted"))
{ reject(new Error("File upload aborted")); }
);
xhr.addEventListener("timeout", () =>
reject(new Error("File upload timeout"))
{ reject(new Error("File upload timeout")); }
);
xhr.open(args.method, url, true);
xhr.withCredentials = true;