Repository navigation
🧹 chore(lint): react-hooks 7.1.1 — 28 erori reparate fără eslint-disable (+ bug fix buton cameră KYC) - #58
Merged
Merged
Conversation
…ori (refs / set-state-in-effect / immutability) fără eslint-disable Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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
eslint-plugin-react-hooks7.1.1 (din grupul Dependabot) aduce regulile derivate din React Compiler (refs,set-state-in-effect,immutability,purity) → 28 de erori în 20 de fișiere. În #57 am pin-uit plugin-ul la 7.0.1 ca să nu slăbim config-ul; aici îl deblocăm și reparăm erorile.What was done
eslint-plugin-react-hooks^7.1.1.eslint-disable, fără schimbări îneslint.config.js: loader-e hoistate deasupra efectelor (immutability), mount-loaders apelate prinqueueMicrotask(setState-ul sincron se mută un microtask mai târziu, înainte de paint — identic observabil), reset-uri de stare mutate în handler-ele care declanșează schimbarea (ChatWidget, BankConsentPage, ApplicationWizardPage), pattern „adjust state during render" cu guard (FullKycPage),useInViewdestructurat la apel (LandingPage), id de mesaj din funcție pură (ChatPage).KycScanPageButonul „Deschide camera" / „Fotografiază" citea
streamRef.currentîn render, dar nimic nu re-randa după pornirea camerei → butonul rămânea pe „Deschide camera" (bug latent, confirmat de review pe codul vechi). AcumcameraActivee stare reală, setată la pornirea stream-ului și curățată înstopCamera→ butonul comută corect. De verificat manual o dată pe telefon fluxul/kyc/scan/:token.Checks performed
npm run lint0 erori / 0 avertismente ·npx tsc -b --force --noEmitcurat ·npm run buildok · smoke Playwright 8/8.🤖 Generated with Claude Code