Chore: move to eslint (#6270)
Some checks failed
Docker CI / Linting Checks (push) Has been cancelled
Docker CI / Docker Build & Push (push) Has been cancelled
Crowdin Action / Crowdin Sync (push) Has been cancelled

This commit is contained in:
shamoon
2026-02-02 15:18:30 -08:00
committed by GitHub
parent 1233b5e803
commit 97e909ebf4
29 changed files with 121 additions and 85 deletions

View File

@@ -97,7 +97,6 @@ export default async function beszelProxyHandler(req, res) {
return res.status(status).send(data);
}
// eslint-disable-next-line no-unused-vars
[status, , data] = await httpProxy(url, {
method: "GET",
headers: {

View File

@@ -65,7 +65,6 @@ export default async function delugeProxyHandler(req, res) {
return res.status(status).end(data);
}
// eslint-disable-next-line no-unused-vars
[status, contentType, data] = await sendRpc(url, dataMethod, dataParams);
}

View File

@@ -97,7 +97,6 @@ export default async function dispatcharrProxyHandler(req, res) {
return res.status(status).send(data);
}
// eslint-disable-next-line no-unused-vars
[status, , data] = await httpProxy(url, {
method: "GET",
headers: {

View File

@@ -22,7 +22,6 @@ async function login(widget) {
});
}
// eslint-disable-next-line no-unused-vars
const [status, contentType, data] = await httpProxy(loginUrl, loginParams);
return [status, data];
}

View File

@@ -16,7 +16,7 @@ async function login(widget, service) {
const loginUrl = new URL(formatApiCall(api, { endpoint, ...widget }));
const loginBody = { username: widget.username.toString(), password: widget.password.toString() };
const headers = { "Content-Type": "application/json" };
// eslint-disable-next-line no-unused-vars
const [status, contentType, data, responseHeaders] = await httpProxy(loginUrl, {
method: "POST",
body: JSON.stringify(loginBody),

View File

@@ -1,4 +1,3 @@
/* eslint-disable no-underscore-dangle */
import crypto from "crypto";
import querystring from "querystring";

View File

@@ -79,7 +79,6 @@ export default async function npmProxyHandler(req, res) {
return res.status(status).send(data);
}
// eslint-disable-next-line no-unused-vars
[status, , data] = await httpProxy(url, {
method: "GET",
headers: {

View File

@@ -20,7 +20,6 @@ async function login(loginUrl, username, password, controllerVersionMajor) {
};
}
// eslint-disable-next-line no-unused-vars
const [status, contentType, data] = await httpProxy(loginUrl, {
method: "POST",
body: JSON.stringify(params),
@@ -234,7 +233,6 @@ export default async function omadaProxyHandler(req, res) {
? `${url}/api/v2/sites/${siteName}/alerts/num?token=${token}&currentPage=1&currentPageSize=1000`
: `${url}/${cId}/api/v2/sites/${siteName}/alerts/num?token=${token}&currentPage=1&currentPageSize=1000`;
// eslint-disable-next-line no-unused-vars
[status, contentType, data] = await httpProxy(alertUrl, {
headers: {
"Csrf-Token": token,

View File

@@ -1,4 +1,3 @@
/* eslint-disable no-underscore-dangle */
import cache from "memory-cache";
import { xml2json } from "xml-js";

View File

@@ -40,7 +40,6 @@ async function fetchFromPyloadAPI(url, sessionId, params, service) {
options.headers.Cookie = cache.get(`${sessionCacheKey}.${service}`);
}
// eslint-disable-next-line no-unused-vars
const [status, contentType, data, responseHeaders] = await httpProxy(url, options);
const returnData = parsePyloadResponse(url, data);
return [status, returnData, responseHeaders];
@@ -66,7 +65,6 @@ async function fetchFromPyloadAPIBasic(url, params, username, password) {
options.body = JSON.stringify(params);
}
// eslint-disable-next-line no-unused-vars
const [status, contentType, data, responseHeaders] = await httpProxy(parsedUrl, options);
const returnData = parsePyloadResponse(parsedUrl, data);
return [status, returnData, responseHeaders];

View File

@@ -15,7 +15,6 @@ async function login(widget) {
body: loginBody,
};
// eslint-disable-next-line no-unused-vars
const [status, contentType, data] = await httpProxy(loginUrl, loginParams);
return [status, data];
}

View File

@@ -24,7 +24,6 @@ export default async function xteveProxyHandler(req, res) {
const payload = { cmd: "status" };
if (widget.username && widget.password) {
// eslint-disable-next-line no-unused-vars
const [status, contentType, data] = await httpProxy(url, {
method,
body: JSON.stringify({