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:
Scott Anderson
2025-08-15 21:57:25 -04:00
committed by GitHub
parent 356364d200
commit 2dfd39f316
12 changed files with 20 additions and 34 deletions
+1
View File
@@ -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));
+3 -1
View File
@@ -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,
});