mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-03 04:38:33 +00:00
refactor: extract @hyperframes/lint from core (#1756)
* refactor: extract @hyperframes/lint package from core Moves all lint rules, hyperframeLinter, lintProject, and related types from packages/core/src/lint/ into a new standalone packages/lint package. Core keeps a thin re-export stub at @hyperframes/core/lint for backward compatibility. Consumer imports (cli lint command, producer hyperframeLint) are updated to import from @hyperframes/lint directly. Depends on @hyperframes/parsers (PR #1755). * fix: restore postcss-selector-parser in core (sourceMutation.ts still uses it) * fix(ci): add parsers+lint to Dockerfile and build before preview tests * chore: update bun.lock after restoring postcss-selector-parser dep * test(cli): update lintProject test for string-dir signature from @hyperframes/lint * refactor(core): single-source the lint engine in @hyperframes/lint Delete core's byte-identical copy of the lint rule engine and re-point staticGuard at @hyperframes/lint, so the render-time render-gate and the studio preview share one rule engine instead of two copies that could silently diverge. Back-compat preserved via the @hyperframes/core/lint stub. Addresses review feedback on the dual-copy footgun.
This commit is contained in:
+24
-1
@@ -267,6 +267,18 @@
|
||||
"packages/parsers/src/gsapWriterParity.acorn.test.ts",
|
||||
"packages/parsers/src/htmlParser.roundtrip.test.ts",
|
||||
"packages/parsers/src/htmlParser.test.ts",
|
||||
// @hyperframes/lint rule test files: parallel arrange/act/assert test cases
|
||||
// (pre-existing structure from when lint lived in packages/core/src/lint/).
|
||||
"packages/lint/src/rules/adapters.test.ts",
|
||||
"packages/lint/src/rules/captions.test.ts",
|
||||
"packages/lint/src/rules/composition.test.ts",
|
||||
"packages/lint/src/rules/core.test.ts",
|
||||
"packages/lint/src/rules/fonts.test.ts",
|
||||
"packages/lint/src/rules/gsap.test.ts",
|
||||
"packages/lint/src/rules/media.test.ts",
|
||||
"packages/lint/src/rules/slideshow.test.ts",
|
||||
"packages/lint/src/rules/textures.test.ts",
|
||||
"packages/lint/src/hyperframeLinter.test.ts",
|
||||
// slideshowPanelHelpers.ts: setSlideNotes/addFragment/addHotspot share an
|
||||
// intentional parallel shape (signature + mapSlidesIn → exists-check →
|
||||
// map/append); the per-slide mutation differs, so a shared abstraction
|
||||
@@ -311,6 +323,13 @@
|
||||
"packages/parsers/src/htmlParser.ts",
|
||||
// executeGsapMutation (CRITICAL) pre-dates this PR; studio-api still lives in core.
|
||||
"packages/core/src/studio-api/routes/files.ts",
|
||||
// lint rule implementations and project linter: pre-existing complexity
|
||||
// (moved from packages/core/src/lint/). File-level exemption avoids the
|
||||
// line-shift fingerprint problem for inherited findings.
|
||||
"packages/lint/src/rules/media.ts",
|
||||
"packages/lint/src/rules/textures.ts",
|
||||
"packages/lint/src/rules/gsap.ts",
|
||||
"packages/lint/src/project.ts",
|
||||
// SlideshowPanel.tsx: top-level editor panel that wires several independent
|
||||
// sections (slides/inspector/branches/hotspot). Its cyclomatic count comes
|
||||
// from that fan-out; splitting it would scatter shared state without
|
||||
@@ -329,7 +348,7 @@
|
||||
// generated table's shape test; this is dev tooling, not shipped runtime.
|
||||
"packages/cli/scripts/sync-agent-dirs.ts",
|
||||
// Files modified only for import-path updates (one-line changes to switch
|
||||
// from @hyperframes/core/* subpaths to @hyperframes/parsers). Their complexity
|
||||
// from @hyperframes/core/* subpaths to the new packages). Their complexity
|
||||
// is pre-existing; the line-shift fingerprint problem makes fallow treat
|
||||
// the violations as new even though no logic changed.
|
||||
"packages/core/src/core.types.ts",
|
||||
@@ -338,6 +357,10 @@
|
||||
"packages/studio/src/hooks/gsapShared.ts",
|
||||
"packages/studio/src/hooks/gsapDragPositionCommit.ts",
|
||||
"packages/studio/src/hooks/gsapKeyframeCacheHelpers.ts",
|
||||
"packages/cli/src/commands/lint.ts",
|
||||
"packages/cli/src/commands/preview.ts",
|
||||
"packages/cli/src/commands/publish.ts",
|
||||
"packages/cli/src/server/studioServer.ts",
|
||||
// set-version.ts: compareSemver helper has pre-existing complexity from
|
||||
// semver string parsing logic; line-shift fingerprint problem from new
|
||||
// packages added to PACKAGES array makes fallow treat it as new.
|
||||
|
||||
Reference in New Issue
Block a user