Skip to content

Commit 26fe553

Browse files
committed
chore: fix lint warnings
1 parent d1ac3d5 commit 26fe553

4 files changed

Lines changed: 18 additions & 5 deletions

File tree

.oxlintrc.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
{
22
"$schema": "./node_modules/oxlint/configuration_schema.json",
3+
"categories": {
4+
"correctness": "error"
5+
},
36
"plugins": ["typescript", "import", "react"],
47
"jsPlugins": [
58
"./oxlint-plugins/no-thrown-unawaited-redirect.mjs",
@@ -32,7 +35,7 @@
3235
"no-control-regex": "off",
3336
"typescript/no-non-null-asserted-optional-chain": "off",
3437
"no-unused-expressions": [
35-
"warn",
38+
"error",
3639
{
3740
"allowShortCircuit": true,
3841
"allowTernary": true

apps/webapp/seed-queue-metrics.mts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
import { boundedIn } from "@trigger.dev/database";
22
import { ClickHouse } from "@internal/clickhouse";
33
import type { QueueMetricsRawV1Input } from "@internal/clickhouse";
4-
// App modules compile to CommonJS under tsx, so import them as default bindings.
4+
// App modules compile to CommonJS under tsx, so these intentionally use default bindings.
5+
// oxlint-disable import/default
56
import dbServer from "./app/db.server";
67
import organizationServer from "./app/models/organization.server";
78
import projectServer from "./app/models/project.server";
89
import friendlyIdentifiers from "./app/v3/friendlyIdentifiers";
10+
// oxlint-enable import/default
911

1012
const { prisma } = dbServer;
1113
const { createOrganization } = organizationServer;

apps/webapp/test/dashboardAgentWatchQueueName.test.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,16 @@ async function createFor(seeded: Seeded, spec: WatchSpec, chatId?: string) {
180180
}
181181

182182
async function persistedQueueName(created: { watchId?: string }) {
183-
const watch = await getWatch(ctx.agentDb, { id: created.watchId! });
184-
return (watch?.spec as { queue: string }).queue;
183+
if (!created.watchId) {
184+
throw new Error("Expected the created watch to have an ID");
185+
}
186+
187+
const watch = await getWatch(ctx.agentDb, { id: created.watchId });
188+
if (!watch) {
189+
throw new Error(`Expected watch ${created.watchId} to exist`);
190+
}
191+
192+
return (watch.spec as { queue: string }).queue;
185193
}
186194

187195
/** The queue as `QueueRetrievePresenter` hands it to the page: the prefix already stripped. */

apps/webapp/test/helpers/sessionStream.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ export async function collectSessionOut(
274274
if (!gotNew) {
275275
await new Promise((r) => setTimeout(r, 100));
276276
}
277-
} while (true);
277+
} while (true); // oxlint-disable-line no-constant-condition
278278

279279
return { parts, durationMs: performance.now() - started, subscription };
280280
}

0 commit comments

Comments
 (0)