Upgrading eslint

This commit is contained in:
David Négrier 2021-12-23 15:27:17 +01:00
parent 220c9433d1
commit 3e91a79078
20 changed files with 835 additions and 1641 deletions

View file

@ -36,9 +36,11 @@ export class DebugController {
return "BatchedMessages";
}
if (value instanceof Map) {
const obj: any = {}; // eslint-disable-line @typescript-eslint/no-explicit-any
const obj: { [key: string | number]: unknown } = {};
for (const [mapKey, mapValue] of value.entries()) {
obj[mapKey] = mapValue;
if (typeof mapKey === "number" || typeof mapKey === "string") {
obj[mapKey] = mapValue;
}
}
return obj;
} else if (value instanceof Set) {

View file

@ -1,12 +1,10 @@
import { App } from "../Server/sifrr.server";
import { HttpRequest, HttpResponse } from "uWebSockets.js";
const register = require("prom-client").register;
const collectDefaultMetrics = require("prom-client").collectDefaultMetrics;
import { register, collectDefaultMetrics } from "prom-client";
export class PrometheusController {
constructor(private App: App) {
collectDefaultMetrics({
timeout: 10000,
gcDurationBuckets: [0.001, 0.01, 0.1, 1, 2, 5], // These are the default buckets.
});