Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .oxlintrc.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion apps/webapp/seed-queue-metrics.mts
Original file line number Diff line number Diff line change
@@ -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
Comment thread
carderne marked this conversation as resolved.

const { prisma } = dbServer;
const { createOrganization } = organizationServer;
Expand Down
12 changes: 10 additions & 2 deletions apps/webapp/test/dashboardAgentWatchQueueName.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down
2 changes: 1 addition & 1 deletion apps/webapp/test/helpers/sessionStream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
}