Repository navigation
refactor(hooks): avoid direct Date construction during render in useSteamAchievementsBatch - #373
Merged
Merged
Conversation
…chievementsBatch oxlint 1.86 adds the react(purity) rule to correctness, which flags the `new Date()` call in the render-phase state adjustment. The branch only runs once per appIds change, so route the clock read through a small helper. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
finallyjay
enabled auto-merge (squash)
October 8, 2026 14:56
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing (1)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Problem
Dependabot PR #372 (bumps oxlint 1.85.0 -> 1.86.0) fails the required
qualitycheck at thepnpm lintstep:oxlint 1.86 adds
react(purity)to the correctness category.main(oxlint 1.85.0) lints clean, so the failure comes from the bump.Fix
The flagged
setLastUpdated(new Date())is inside the render-phase "adjust state when appIds change" branch, which is guarded byprevAppIdsKey !== appIdsKeyand runs once per change. The clock read is deliberate there, so it now goes through a small module-levelcurrentTimestamp()helper. Behavior is unchanged.Verification (local)
pnpm lintpasses,pnpm exec oxfmt --checkpasses,pnpm test:coverage74 files / 745 tests passed.main(oxlint 1.85.0) with this change:pnpm lintandoxfmt --checkpass.After merge, #372 needs a Dependabot rebase to pick this up.
🤖 Generated with Claude Code