Skip to content

Commit b33e91b

Browse files
chore(lint): enforce eslint/no-unsafe-optional-chaining
1 parent 91abda5 commit b33e91b

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎apps/server/src/orchestration-v2/ThreadLaunchService.test.ts‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1845,10 +1845,9 @@ it.effect("shared intake preserves durable attachment bytes after a lost launch
18451845
);
18461846
assert.isDefined(stored);
18471847
assert.notEqual(stored.attachments[0]?.id, attachment.id);
1848-
assert.equal(
1849-
(stored.context?.records[0] as { attachmentId: string }).attachmentId,
1850-
stored.attachments[0]?.id,
1851-
);
1848+
const record = stored.context?.records[0];
1849+
assert.isDefined(record);
1850+
assert.equal((record as { attachmentId: string }).attachmentId, stored.attachments[0]?.id);
18521851
const userItem = accepted.turnItems.find(
18531852
(item) => item.type === "user_message" && item.messageId === stored.id,
18541853
);

‎vite.config.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ export default defineConfig({
216216
perf: "warn",
217217
},
218218
rules: {
219+
"eslint/no-unsafe-optional-chaining": "error",
219220
"eslint/no-unneeded-ternary": "error",
220221
"unicorn/no-useless-spread": "error",
221222
"unicorn/no-useless-fallback-in-spread": "error",

0 commit comments

Comments
 (0)