Repository navigation
Fix the pre-existing eslint errors and enable lint in CI - #54
Merged
portdeveloper merged 1 commit intoOct 4, 2026
Merged
Conversation
pnpm lint now exits 0 (18 errors across 12 files, no new warnings), and CI runs it before test and build. - Mip3HeroSection: one timer per frame from a small nextHeroTick timeline. The old effect scheduled the restart and then set running false, whose cleanup cancelled that same timer, so the counter played once and stopped. It now holds the last frame for 3s and starts over, with the same timings. - LanguageProvider, ExplainModeProvider and InfraContent read the saved locale, explain mode and URL-hash tab through useSyncExternalStore. The server and the hydrating client render the defaults and the saved value applies right after hydration, so the first client render matches the server markup. InfraContent keeps a hash-restored tab mounted after switching away, as before. - Auto-play in MemoryPoolSection, JumpdestSection and BundlerComparisonSection stops in the timer callback that reaches the last step instead of from the effect body; state and timing are unchanged. - ConstructionSection renders the reduced-motion final frame from the preference instead of writing it into state after hydration. - OraclePlayground resets when a different token is picked, in the click handler. AnalyzerPage guards its one-time ?q= auto-analyze with a ref and lists setTab so the compiler can keep the memoization. SpamHeroSection draws its first random block one task after hydration. - TransactionTimelineSection uses the useInView ref directly instead of writing to it from a ref callback. CollisionSection wraps its // labels in braces. Tests cover the hero timeline looping and the server render ignoring a saved preference, with window and localStorage present. Closes portdeveloper#17
|
@ShadowOfTime1 is attempting to deploy a commit to the MF Experimental Team on Vercel. A member of the Team first needs to authorize it. |
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.
Closes #17
pnpm lintnow exits 0 on master's 18 errors across 12 files, without new warnings (11 left, down from 12), and CI runspnpm lintbefore test and build. Behavior is kept; where it was already broken it now does what the code intended.Both points from the #32 review are covered, with tests:
nextHeroTicktimeline (src/components/mip3/heroTimeline.ts). On current master the effect scheduled the 3s restart and then calledsetRunning(false); that state change ran the effect cleanup, which cancelled the restart timer, so the counter played once and stopped. Now there is no stopped state for a cleanup to cancel: it holds the last frame for 3s and starts over, with the same 1s / 80ms / 0.5s timings.heroTimeline.test.tssteps through two full cycles.LanguageProvider,ExplainModeProviderandInfraContentread the saved locale, explain mode and URL-hash tab throughuseSyncExternalStore(a smallstoredPreferencehelper for the two localStorage values). The server and the hydrating client render the defaults, and the saved value applies right after hydration, so the first client render matches the server markup.src/lib/hydration.test.tsrenders the providers withreact-dom/serverwhilewindowandlocalStoragehold a saved value, and checks the markup still has the defaults; reading the saved value during render (as a state initializer would) makes it fail.InfraContentkeeps a hash-restored tab mounted after you switch away, as before.The rest:
MemoryPoolSection,JumpdestSectionandBundlerComparisonSectionstops in the timer callback that reaches the last step instead of from the effect body. Final state and timing are the same; in the bundler's "with MIP-4" mode the message is still decided from the same statuses at the same moment.ConstructionSectionrenders the reduced-motion final frame from the preference rather than writing it into state after hydration.OraclePlaygroundresets when a different token is picked, in the click handler (re-picking the current token does nothing, as before).AnalyzerPageguards the one-time?q=auto-analyze with a ref, and listssetTabinhandleQuickRepo's deps so the compiler can keep the memoization.SpamHeroSectiondraws its first random block one task after hydration.TransactionTimelineSectionuses theuseInViewref directly instead of writing to it from a ref callback;CollisionSectionwraps its//labels in braces.Verification:
pnpm lint(0 errors),tsc --noEmit,vitest run(78 passed),next build, and every touched page returns 200 from the built app.