refactor: drop unused exports detected by fallow auto-fix

Run `fallow fix --auto-fixable` to remove `export` keywords from symbols
fallow's reachability analysis identifies as unused. Keeps only the cases
where the symbol is still referenced internally in its own file (so
removing `export` doesn't surface a new oxlint `no-unused-vars` error).

Result: fallow dead-code findings drop from 276 → 208 (68 fewer unused
exports), with no behavior change — each symbol is still defined and used
exactly the same way within its file.

Reverted ~20 files where fallow's auto-fix would have created cascading
"declared but never used" lint errors — those are cases where the symbol
isn't used at all, and properly cleaning them up means deleting the
declaration, not just dropping `export`. Better to land that as a
separate, narrower PR rather than mixing it into a mechanical de-export.

Also reverted four false positives where fallow missed real consumers:
- `captureCost.ts` (renderOrchestrator has two separate import blocks
  from the same module; fallow only saw the first)
- `propertyPanelHelpers.ts`, `domEditingLayers.ts` (real internal uses
  fallow's reachability missed)
- `render.ts` (functions imported via `await import()` dynamic import,
  which fallow's static analysis doesn't follow)

Test plan: bun run --filter '*' typecheck (clean), oxlint + oxfmt clean,
cli/core/studio/engine vitest suites pass (335 + 917 + 576 + 605 tests).
This commit is contained in:
James
2026-05-19 00:51:56 +00:00
parent 3eec777a29
commit 7e0a447325
38 changed files with 47 additions and 54 deletions
@@ -1,7 +1,7 @@
import { useState, useRef, useEffect, type ReactNode } from "react";
import { Zap } from "../../icons/SystemIcons";
export const FIELD =
const FIELD =
"min-w-0 rounded-xl border border-neutral-800 bg-neutral-900/95 px-3 py-2 text-neutral-100 shadow-[inset_0_1px_0_rgba(255,255,255,0.03)] transition-colors focus-within:border-neutral-600";
export const LABEL = "text-[11px] font-medium uppercase tracking-[0.18em] text-neutral-500";
export const RESPONSIVE_GRID = "grid grid-cols-[repeat(auto-fit,minmax(118px,1fr))] gap-3";
@@ -30,7 +30,7 @@ export function parsePlainNumber(value: string): number | null {
// ── CommitField ──
export function CommitField({
function CommitField({
value,
disabled,
onCommit,
@@ -10,7 +10,7 @@ import type { GroupOverlayItem } from "./domEditOverlayGeometry";
export type GestureKind = "drag" | "resize" | "rotate";
export const BLOCKED_MOVE_THRESHOLD_PX = 4;
export const MIN_RESIZE_EDGE_PX = 20;
const MIN_RESIZE_EDGE_PX = 20;
const ROTATION_COMMIT_EPSILON_DEGREES = 0.05;
const ROTATION_SNAP_DEGREES = 15;
@@ -163,7 +163,7 @@ export function normalizeTimelineCompositionSource(value: string | undefined): s
// ─── CSS escaping ─────────────────────────────────────────────────────────────
export function escapeCssIdentifier(value: string): string {
function escapeCssIdentifier(value: string): string {
const css = globalThis.CSS as { escape?: (input: string) => string } | undefined;
if (typeof css?.escape === "function") return css.escape(value);
@@ -8,7 +8,7 @@ const FONT_EXT_RE = /\.(eot|otf|ttc|ttf|woff2?)$/i;
const FONT_STYLE_SUFFIX_RE =
/\s+(thin|extralight|extra light|light|regular|roman|medium|semibold|semi bold|bold|extrabold|extra bold|black|italic|oblique|variable)$/i;
export function cssString(value: string): string {
function cssString(value: string): string {
return JSON.stringify(value);
}
@@ -370,7 +370,7 @@ function formatHex(channel: number): string {
return channel.toString(16).padStart(2, "0");
}
export function interpolateGradientStopColor(model: GradientModel, position: number): string {
function interpolateGradientStopColor(model: GradientModel, position: number): string {
const clampedPosition = clamp(position, 0, 100);
const sortedStops = [...model.stops].sort((a, b) => a.position - b.position);
const exact = sortedStops.find((stop) => Math.abs(stop.position - clampedPosition) < 0.001);
@@ -256,7 +256,7 @@ export function createManualOffsetDragMember(input: {
};
}
export function resolveManualOffsetDragMemberOffset(
function resolveManualOffsetDragMemberOffset(
member: ManualOffsetDragMember,
dx: number,
dy: number,
@@ -289,7 +289,7 @@ export function applyManualOffsetDragCommit(
return offset;
}
export function restoreManualOffsetDragMember(member: ManualOffsetDragMember): void {
function restoreManualOffsetDragMember(member: ManualOffsetDragMember): void {
restoreStudioPathOffset(member.element, member.initialPathOffset);
endStudioManualEditGesture(member.element, member.gestureToken);
}
@@ -18,7 +18,7 @@ const COLOR_PICKER_SIZE = { width: 292, height: 386 };
/* ColorSlider */
/* ------------------------------------------------------------------ */
export function ColorSlider({
function ColorSlider({
label,
value,
min,
@@ -1,7 +1,7 @@
import { useCallback, useEffect, useRef, useState, type ReactNode } from "react";
import { adjustNumericToken, FIELD, LABEL, parseNumericToken } from "./propertyPanelHelpers";
export function CommitField({
function CommitField({
value,
disabled,
liveCommit,
@@ -129,7 +129,7 @@ export function buildStudioGsapPresetMotion(
// ── Manifest parse/serialize ──
export function parseMotionValues(value: unknown): StudioGsapMotionValues | null {
function parseMotionValues(value: unknown): StudioGsapMotionValues | null {
if (!value || typeof value !== "object") return null;
const record = value as Record<string, unknown>;
const parsed: StudioGsapMotionValues = {};