chore: fix lint warnings (#4605)
This commit is contained in:
+4
-1
@@ -1,5 +1,8 @@
|
||||
{
|
||||
"$schema": "./node_modules/oxlint/configuration_schema.json",
|
||||
"categories": {
|
||||
"correctness": "error"
|
||||
},
|
||||
"plugins": ["typescript", "import", "react"],
|
||||
"jsPlugins": [
|
||||
"./oxlint-plugins/no-thrown-unawaited-redirect.mjs",
|
||||
@@ -32,7 +35,7 @@
|
||||
"no-control-regex": "off",
|
||||
"typescript/no-non-null-asserted-optional-chain": "off",
|
||||
"no-unused-expressions": [
|
||||
"warn",
|
||||
"error",
|
||||
{
|
||||
"allowShortCircuit": true,
|
||||
"allowTernary": true
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
import { boundedIn } from "@trigger.dev/database";
|
||||
import { ClickHouse } from "@internal/clickhouse";
|
||||
import type { QueueMetricsRawV1Input } from "@internal/clickhouse";
|
||||
// App modules compile to CommonJS under tsx, so import them as default bindings.
|
||||
// App modules compile to CommonJS under tsx, so these intentionally use default bindings.
|
||||
// oxlint-disable import/default
|
||||
import dbServer from "./app/db.server";
|
||||
import organizationServer from "./app/models/organization.server";
|
||||
import projectServer from "./app/models/project.server";
|
||||
import friendlyIdentifiers from "./app/v3/friendlyIdentifiers";
|
||||
// oxlint-enable import/default
|
||||
|
||||
const { prisma } = dbServer;
|
||||
const { createOrganization } = organizationServer;
|
||||
|
||||
@@ -180,8 +180,16 @@ async function createFor(seeded: Seeded, spec: WatchSpec, chatId?: string) {
|
||||
}
|
||||
|
||||
async function persistedQueueName(created: { watchId?: string }) {
|
||||
const watch = await getWatch(ctx.agentDb, { id: created.watchId! });
|
||||
return (watch?.spec as { queue: string }).queue;
|
||||
if (!created.watchId) {
|
||||
throw new Error("Expected the created watch to have an ID");
|
||||
}
|
||||
|
||||
const watch = await getWatch(ctx.agentDb, { id: created.watchId });
|
||||
if (!watch) {
|
||||
throw new Error(`Expected watch ${created.watchId} to exist`);
|
||||
}
|
||||
|
||||
return (watch.spec as { queue: string }).queue;
|
||||
}
|
||||
|
||||
/** The queue as `QueueRetrievePresenter` hands it to the page: the prefix already stripped. */
|
||||
|
||||
@@ -274,7 +274,7 @@ export async function collectSessionOut(
|
||||
if (!gotNew) {
|
||||
await new Promise((r) => setTimeout(r, 100));
|
||||
}
|
||||
} while (true);
|
||||
} while (true); // oxlint-disable-line no-constant-condition
|
||||
|
||||
return { parts, durationMs: performance.now() - started, subscription };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user