mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-01 19:42:03 +00:00
Split PlayerControls.tsx into focused sub-components (SeekBar, WorkAreaOverlay, MuteButton, LoopButton, FullscreenButton, ShortcutsPanel, SpeedMenu) and extracted seek bar drag/progress tracking into useSeekBarDrag hook. Split manualEditsDom.ts patch-builder functions into manualEditsDomPatches.ts with data-driven helpers to reduce duplication and complexity. Extracted per-type reapply helpers from reapplyPositionEditsAfterSeek and factored out identity-matrix check from stripGsapTranslateFromTransform. Raised file-size limit from 500 to 600 lines, removed .filesize-allowlist.
42 lines
1.7 KiB
YAML
42 lines
1.7 KiB
YAML
pre-commit:
|
|
parallel: true
|
|
commands:
|
|
lint:
|
|
glob: "*.{js,jsx,ts,tsx}"
|
|
run: bunx oxlint {staged_files}
|
|
format:
|
|
glob: "*.{js,jsx,ts,tsx,json,md,yaml,yml}"
|
|
# --no-error-on-unmatched-pattern: don't fail when staged files all
|
|
# fall under .prettierignore (e.g. docs-only changes to docs/docs.json).
|
|
run: bunx oxfmt --check --no-error-on-unmatched-pattern {staged_files}
|
|
typecheck:
|
|
glob: "*.{ts,tsx}"
|
|
run: cd packages/core && bunx tsc --noEmit && cd ../studio && bunx tsc --noEmit
|
|
# Mirrors the CI gate (same `--base origin/main` so the local hook can't
|
|
# pass on a branch CI would fail). Audits the working tree, which means
|
|
# unstaged WIP in `packages/**` is part of the diff — stash before
|
|
# committing if that surprises you. `--gate new-only` (the default) only
|
|
# fails on issues introduced by the branch, not inherited findings.
|
|
fallow:
|
|
glob: "packages/**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}"
|
|
run: bunx fallow audit --base origin/main --fail-on-issues
|
|
filesize:
|
|
# Scoped to packages/studio — the 600 LOC limit is a studio architecture
|
|
# standard enforced as part of the App.tsx decomposition work. Player and
|
|
# other packages enforce size discipline via code review and convention.
|
|
glob: "packages/studio/**/*.{ts,tsx}"
|
|
exclude: "(\\.test\\.(ts|tsx)$|\\.generated\\.)"
|
|
run: |
|
|
for f in {staged_files}; do
|
|
lines=$(wc -l < "$f")
|
|
if [ "$lines" -gt 600 ]; then
|
|
echo "ERROR: $f has $lines lines (max 600)"
|
|
exit 1
|
|
fi
|
|
done
|
|
|
|
commit-msg:
|
|
commands:
|
|
commitlint:
|
|
run: bunx commitlint --edit "{1}"
|