fix(app): clear lint warnings breaking EAS deploy#1828
Merged
Conversation
The App Deploy (EAS) workflow runs `npm run lint` (eslint --max-warnings 0) and failed on three warnings introduced by the review changes: - useChapterData.ts: synchronous setIsLoading(false) in the no-bookId effect branch tripped react-hooks/set-state-in-effect — disabled inline, matching how the rest of the codebase handles intentional cases. - useDifficultPassages.ts: the cleanup mutates the live genRef.current to invalidate an in-flight load, which react-hooks/exhaustive-deps flags as a ref-in-cleanup risk; the live ref is intentional here — disabled inline with a rationale comment. - connectivity.ts: removed the now-unused _polling flag (the start guard is _started after the duplicate-listener fix), clearing no-unused-vars. These surfaced on master because EAS deploy's lint gate uses --max-warnings 0. npm run lint, tsc, and the affected tests are all green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LjYFnGX1vcGk4h5Lz3xmng
Test Results✅ All tests passed
Coverage
⏱️ Duration: 88.6s |
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
masteris red: App Deploy (EAS) / Lint and publish EAS update failed. That job runsnpm run lint(eslint src/ --max-warnings 0), which tripped on three warnings introduced by the code-review changes in #1827. The standalone PRlintcheck didn't gate on warnings the same way, so they slipped through on that PR.Fixes (3 warnings → 0)
useChapterData.ts— synchronoussetIsLoading(false)in the no-bookIdeffect branch trippedreact-hooks/set-state-in-effect. Disabled inline, matching how the rest of the codebase handles intentional cases of this rule.useDifficultPassages.ts— the effect cleanup mutates the livegenRef.currentto invalidate an in-flight load, whichreact-hooks/exhaustive-depsflags as a ref-in-cleanup risk. The live ref is intentional (a copied value wouldn't invalidate the running load); disabled inline with a rationale comment.connectivity.ts— removed the now-unused_pollingflag (the start guard became_startedin the duplicate-listener fix), clearing@typescript-eslint/no-unused-vars.Verification
npm run lint→ exit 0,tsc --noEmitclean, and the affected test suites (useChapterData,useDifficultPassages,connectivity) pass.🤖 Generated with Claude Code
Generated by Claude Code