fix(deps): update dependency typescript-eslint to ^8.28.0 (#2693)

* fix(deps): update dependency typescript-eslint to ^8.28.0

* fix: lint issues

---------

Co-authored-by: homarr-renovate[bot] <158783068+homarr-renovate[bot]@users.noreply.github.com>
Co-authored-by: Meier Lukas <meierschlumpf@gmail.com>
This commit is contained in:
homarr-renovate[bot]
2025-03-26 20:17:23 +00:00
committed by GitHub
parent 07f0abf28c
commit f624611540
5 changed files with 64 additions and 71 deletions

View File

@@ -65,9 +65,7 @@ export class KubernetesClient {
}
public static getInstance(): KubernetesClient {
if (!KubernetesClient.instance) {
KubernetesClient.instance = new KubernetesClient();
}
KubernetesClient.instance ??= new KubernetesClient();
return KubernetesClient.instance;
}
}

View File

@@ -8,12 +8,9 @@ export const extractBaseUrlFromHeaders = (
headers: ReadonlyHeaders,
fallbackProtocol: "http" | "https" = "http",
): `${string}://${string}` => {
let protocol = headers.get("x-forwarded-proto");
// If the protocol is not set or an empty string
if (!protocol) {
protocol = fallbackProtocol;
}
// For empty string we also use the fallback protocol
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
let protocol = headers.get("x-forwarded-proto") || fallbackProtocol;
// @see https://support.glitch.com/t/x-forwarded-proto-contains-multiple-protocols/17219
if (protocol.includes(",")) {

View File

@@ -17,10 +17,8 @@ export class RedisTransport extends Transport {
this.emit("logged", info);
});
if (!this.redis) {
// Is only initialized here because it did not work when initialized in the constructor or outside the class
this.redis = new Redis();
}
// Is only initialized here because it did not work when initialized in the constructor or outside the class
this.redis ??= new Redis();
this.redis
.publish(