fix: resolve oxlint errors across codebase (#24)

## Summary
- Remove 5 unused `beforeEach` imports from test files
- Remove unused imports (`existsSync`, `TimelineCompositionElement`)
- Remove unused destructured variables (`options`, `width`, `height`, `goldenEl`)
- Remove dead `formatDuration` function
- Fix unused catch parameters (`catch (err)` → `catch`)
- Prefix unused `renderError` state with `_`
- Add `eslint-disable-next-line` for 2 React exhaustive-deps false positives (stable ref + zustand setter)

Part 2/4 of [VA-851](https://linear.app/heygen/issue/VA-851/pre-migration-configure-eslint-prettier-and-conventional-commits)

## Test plan
- [x] `pnpm lint` — 0 errors on 193 files
- [x] All 348 tests pass (core + engine)
This commit is contained in:
Vance Ingalls
2026-03-23 16:41:41 -07:00
committed by GitHub
parent 17e90f0671
commit 323ff8f860
15 changed files with 13 additions and 21 deletions
@@ -4,7 +4,7 @@
import { describe, it, expect } from "vitest";
import { generateHyperframesHtml, generateGsapTimelineScript, generateHyperframesStyles } from "./hyperframes.js";
import { GSAP_CDN } from "../templates/constants.js";
import type { TimelineTextElement, TimelineMediaElement, TimelineCompositionElement } from "../core.types";
import type { TimelineTextElement, TimelineMediaElement } from "../core.types";
function makeTextElement(overrides: Partial<TimelineTextElement> = {}): TimelineTextElement {
return {
@@ -280,7 +280,6 @@ export function generateHyperframesHtml(
includeStyles = false,
} = options;
const { width, height } = CANVAS_DIMENSIONS[resolution];
// Include zoom keyframes in duration calculation
const maxZoomTime =
stageZoomKeyframes && stageZoomKeyframes.length > 0 ? Math.max(...stageZoomKeyframes.map((kf) => kf.time)) : 0;
@@ -1,4 +1,4 @@
import { describe, it, expect, vi, beforeEach } from "vitest";
import { describe, it, expect, vi } from "vitest";
import { createCssAdapter } from "./css";
describe("css adapter", () => {
@@ -1,4 +1,4 @@
import { describe, it, expect, vi, beforeEach } from "vitest";
import { describe, it, expect, vi } from "vitest";
import { createWaapiAdapter } from "./waapi";
describe("waapi adapter", () => {
+1 -1
View File
@@ -1,4 +1,4 @@
import { describe, it, expect, vi, beforeEach } from "vitest";
import { describe, it, expect, vi } from "vitest";
import { installRuntimeControlBridge } from "./bridge";
function createMockDeps() {
+1 -1
View File
@@ -1,4 +1,4 @@
import { describe, it, expect, vi, beforeEach, afterEach } from "vitest";
import { describe, it, expect, vi, afterEach } from "vitest";
import { refreshRuntimeMediaCache, syncRuntimeMedia } from "./media";
import type { RuntimeMediaClip } from "./media";
+1 -1
View File
@@ -1,4 +1,4 @@
import { describe, it, expect, vi, beforeEach } from "vitest";
import { describe, it, expect, vi } from "vitest";
import { createRuntimePlayer } from "./player";
import type { RuntimeTimelineLike } from "./types";