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

@@ -1,4 +1,3 @@
/* eslint-disable no-console */
import { promises as fs } from "fs";
import path from "path";
@@ -100,7 +99,6 @@ function convertLayoutGroupToGroup(name, layoutGroup) {
function mergeSubgroups(configuredGroups, mergedGroup) {
configuredGroups.forEach((group) => {
if (group.name === mergedGroup.name) {
// eslint-disable-next-line no-param-reassign
group.services = mergedGroup.services;
} else if (group.groups) {
mergeSubgroups(group.groups, mergedGroup);

View File

@@ -1,4 +1,3 @@
/* eslint-disable no-console */
import { copyFileSync, existsSync, mkdirSync, readFileSync } from "fs";
import { join } from "path";

View File

@@ -1,5 +1,3 @@
/* eslint-disable */
/*
Code primarely based on shvl repository: https://github.com/robinvdvleuten/shvl

View File

@@ -1,4 +1,3 @@
// eslint-disable-next-line import/prefer-default-export
export const columnMap = [
"grid-cols-1 md:grid-cols-1 lg:grid-cols-1",
"grid-cols-1 md:grid-cols-1 lg:grid-cols-1",

View File

@@ -1,4 +1,3 @@
/* eslint-disable no-console */
import { format as utilFormat } from "node:util";
import winston from "winston";
@@ -9,10 +8,9 @@ let winstonLogger;
function combineMessageAndSplat() {
return {
// eslint-disable-next-line no-unused-vars
transform: (info, opts) => {
// combine message and args if any
// eslint-disable-next-line no-param-reassign
info.message = utilFormat(info.message, ...(info[Symbol.for("splat")] || []));
return info;
},

View File

@@ -1,4 +1,3 @@
/* eslint-disable no-param-reassign */
import { Cookie, CookieJar } from "tough-cookie";
const cookieJar = new CookieJar();

View File

@@ -30,7 +30,6 @@ export async function sendJsonRpcRequest(url, method, params, widget) {
body,
};
// eslint-disable-next-line no-unused-vars
const [status, contentType, data] = await httpProxy(url, httpRequestParams);
if (status === 200) {
const json = JSON.parse(data.toString());

View File

@@ -48,7 +48,7 @@ async function getApiInfo(serviceWidget, apiName, serviceName) {
}
const infoUrl = formatApiCall(INFO_ENDPOINT, serviceWidget);
// eslint-disable-next-line no-unused-vars
const [status, contentType, data] = await httpProxy(infoUrl);
if (status === 200) {
@@ -74,7 +74,6 @@ async function getApiInfo(serviceWidget, apiName, serviceName) {
async function handleUnsuccessfulResponse(serviceWidget, url, serviceName) {
logger.debug(`Attempting login to ${serviceWidget.type}`);
// eslint-disable-next-line no-unused-vars
const [apiPath, maxVersion] = await getApiInfo(serviceWidget, AUTH_API_NAME, serviceName);
const authArgs = { path: apiPath ?? "entry.cgi", maxVersion: maxVersion ?? 7, ...serviceWidget };

View File

@@ -1,5 +1,3 @@
/* eslint-disable prefer-promise-reject-errors */
/* eslint-disable no-param-reassign */
import { createUnzip, constants as zlibConstants } from "node:zlib";
import { http, https } from "follow-redirects";

View File

@@ -1,4 +1,3 @@
/* eslint-disable no-console */
import createLogger from "utils/logger";
import widgets from "widgets/widgets";