refactor(lint): break 1,314-line monolith into focused rule modules with plugin system#170
Merged
miguel-heygen merged 9 commits intomainfrom Mar 31, 2026
Merged
Conversation
…ee.js) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…GN_PATTERN to utils Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…ule modules Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…e modules Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…njection - Remove local WINDOW_TIMELINE_ASSIGN_PATTERN from gsap.ts; import from utils - Replace inline truncation in extractMediaUrls/extractScriptUrls with truncateSnippet() - Remove file: options.filePath from template_literal_selector; orchestrator injects it Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
vanceingalls
approved these changes
Mar 31, 2026
Collaborator
Author
Merge activity
|
2 tasks
miguel-heygen
added a commit
that referenced
this pull request
Apr 1, 2026
…files (#181) ## Summary - Splits the 872-line `hyperframeLinter.test.ts` into focused per-domain test files matching the rule module structure from #170 - Tests still use the public API (`lintHyperframeHtml`) — no internals exposed - Fixes misplaced tests: `gsap_css_transform_conflict` tests were inside `describe("lintScriptUrls")`, caption/adapter tests were inside `describe("template_literal_selector rule")` ## New structure ``` src/lint/ hyperframeLinter.test.ts — orchestrator integration + lintScriptUrls (8 tests) rules/ core.test.ts — root attrs, timeline registry, host id (6 tests) media.test.ts — duplicate ids, missing id/src, preload (6 tests) gsap.test.ts — clip element, transform conflict, missing script (12 tests) captions.test.ts — caption exit, overflow, relative position (5 tests) composition.test.ts — external script, template literal selector (5 tests) adapters.test.ts — missing Lottie/Three.js scripts (8 tests) ``` ## Test plan - [x] 404 tests pass (402 before — 2 extra from previously misplaced adapter tests now correctly counted) - [x] Lint + format clean
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
hyperframeLinter.tsfrom 1,314 lines (one massive function) into a plugin system of focused rule modulesLintContext— HTML is parsed once and shared across all rulesLintRule<TContext>type as the formal contract for ruleslintHyperframeHtml,lintMediaUrls,lintScriptUrlssignatures identicalNew file structure
Adding a new adapter rule going forward
src/lint/rules/my-adapter.tsexportingmyAdapterRules: LintRule[]ALL_RULESinhyperframeLinter.tsTest plan
pnpm build)pnpm tsc --noEmit)