mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-22 15:54:36 +00:00
Enable the @typescript-eslint/no-unsafe-assignment eslint rule (#1832)
## Description: Enable the `@typescript-eslint/no-unsafe-assignment` eslint rule. Fixes #1781 ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I process any text displayed to the user through translateText() and I've added it to the en.json file - [x] I have added relevant tests to the test directory - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced
This commit is contained in:
@@ -66,6 +66,7 @@ async function getGatekeeper(): Promise<Gatekeeper> {
|
||||
|
||||
// Use dynamic import for ES modules
|
||||
// Using a type assertion to avoid TypeScript errors for optional modules
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
const module = await import(
|
||||
"./gatekeeper/RealGatekeeper.js" as string
|
||||
).catch(() => import("./gatekeeper/RealGatekeeper.js" as string));
|
||||
|
||||
@@ -91,6 +91,7 @@ export async function startMaster() {
|
||||
|
||||
cluster.on("message", (worker, message) => {
|
||||
if (message.type === "WORKER_READY") {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
const workerId = message.workerId;
|
||||
readyWorkers.add(workerId);
|
||||
log.info(
|
||||
@@ -121,7 +122,7 @@ export async function startMaster() {
|
||||
|
||||
// Handle worker crashes
|
||||
cluster.on("exit", (worker, code, signal) => {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment
|
||||
const workerId = (worker as any).process?.env?.WORKER_ID;
|
||||
if (!workerId) {
|
||||
log.error(`worker crashed could not find id`);
|
||||
@@ -135,6 +136,7 @@ export async function startMaster() {
|
||||
|
||||
// Restart the worker with the same ID
|
||||
const newWorker = cluster.fork({
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
WORKER_ID: workerId,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user