fix(lint): resolve caption and cloud integration diagnostics

This commit is contained in:
webadderall
2026-09-20 20:44:10 +10:00
parent 4d20066b02
commit fb3d6b1ff6
5 changed files with 11 additions and 9 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ export function mergeCaptionSources(
system: CaptionCuePayload[],
): CaptionCuePayload[] {
// Sound-event labels are not competing microphone speech.
const micSpeech = microphone.filter((cue) => !/^(?:\s*[\[(][^\])]+[\])]\s*)+$/.test(cue.text));
const micSpeech = microphone.filter((cue) => !/^(?:\s*[[(][^\])]+[\])]\s*)+$/.test(cue.text));
const overlapsMic = (startMs: number, endMs: number) =>
micSpeech.some((cue) => startMs < cue.endMs && endMs > cue.startMs);
const systemCues: CaptionCuePayload[] = [];
+2 -2
View File
@@ -916,7 +916,7 @@ async function handleMultipartAbort(request, env, shareCode, uploadId) {
try {
const multipartUpload = env.VIDEOS_BUCKET.resumeMultipartUpload(key, uploadId);
await multipartUpload.abort();
} catch (e) {
} catch (_e) {
// Ignore errors — upload may already be completed or expired
}
return jsonResponse({ ok: true });
@@ -1068,7 +1068,7 @@ async function handleVideoStream(request, env, shareCode) {
try {
object = await env.VIDEOS_BUCKET.get(key, { range: r2Range });
} catch (e) {
} catch (_e) {
// R2 throws on an unsatisfiable range (e.g. offset past end of object).
return new Response('Range not satisfiable', { status: 416 });
}
@@ -1,10 +1,9 @@
---
interface Props {
export interface Props {
title: string;
}
import '../styles/global.css';
const { title } = Astro.props;
---
<!DOCTYPE html>
@@ -13,7 +12,7 @@ const { title } = Astro.props;
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="color-scheme" content="dark">
<title>{title}</title>
<title>{Astro.props.title}</title>
<slot name="head" />
</head>
<body>
@@ -4,8 +4,11 @@ const state = vi.hoisted(() => ({ refs: [] as { current: unknown }[], index: 0 }
vi.mock("react", () => ({
useCallback: (callback: unknown) => callback,
useEffect: () => {},
useRef: (current: unknown) =>
state.refs[state.index++] ?? (state.refs[state.index - 1] = { current }),
useRef: (current: unknown) => {
const index = state.index++;
state.refs[index] ??= { current };
return state.refs[index];
},
}));
vi.mock("@/components/ui/toast", () => ({
toast: { error: vi.fn(), info: vi.fn(), success: vi.fn() },
+1 -1
View File
@@ -188,7 +188,7 @@ function ExportState({ mode }: { mode: string }) {
<EditorExportMenu
projectTitle="Demo recording"
prepareExportForShare={async () => undefined}
onRequestShareSignIn={() => {}}
onRequestShareSignIn={() => undefined}
shareRequestNonce={0}
t={t}
exportSettings={exportSettings}