MAINT: Bump eslint-plugin-react-hooks from 5.2.0 to 7.1.1 in /frontend#1984
Merged
romanlutz merged 4 commits intoJun 11, 2026
Merged
Conversation
Bumps [eslint-plugin-react-hooks](https://github.com/facebook/react/tree/HEAD/packages/eslint-plugin-react-hooks) from 5.2.0 to 7.1.1. - [Release notes](https://github.com/facebook/react/releases) - [Changelog](https://github.com/react/react/blob/main/packages/eslint-plugin-react-hooks/CHANGELOG.md) - [Commits](https://github.com/facebook/react/commits/eslint-plugin-react-hooks@7.1.1/packages/eslint-plugin-react-hooks) --- updated-dependencies: - dependency-name: eslint-plugin-react-hooks dependency-version: 7.1.1 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
dependabot
Bot
force-pushed
the
dependabot/npm_and_yarn/frontend/eslint-plugin-react-hooks-7.1.1
branch
from
June 10, 2026 14:25
ed54717 to
0d058cd
Compare
The bump to v7 enables the React Compiler rules including react-hooks/set-state-in-effect and react-hooks/refs by default, which flag 14 existing violations across 8 files. Refactors: - App.tsx ConnectionBanner: derive showReconnected from a dismissedCount counter so the auto-dismiss timer is the only setter (in a setTimeout callback). - ChatWindow.tsx: replace stale-pieceConversions cleanup effect with a useMemo; switch panel auto-open and message clear to the ''adjust state during render'' pattern; replace sendingConvIdsRef.current.has(...) in render with the sendingConversations state. - ConversationPanel.tsx, TargetConfig.tsx, Home.tsx, AttackHistory.tsx, ConverterPanel.tsx: move all setState calls into Promise .then/.catch/.finally callbacks; init isLoading based on initial fetch needs; trigger refetch via a state token bumped from event handlers. - CreateTargetDialog.tsx, ConverterPanel.tsx, ConversationPanel.tsx: use ''adjust state during render'' with a sentinel for prop-driven state syncs (existingTargets, attackResultId reset, clear preview). - AttackHistory.tsx: extract buildListParams helper; combine page reset with the fetch effect. Verified: - npm run lint -- 0 errors / 0 warnings - npm run type-check -- clean - npm test -- 28 suites, 649 tests passing (act() warning count unchanged from baseline) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Browser-based validation revealed a bug in the previous refactor: the clear-preview-when-empty logic used a sentinel keyed off (tab, input), which only fired the first time the input transitioned to empty per key. The original useEffect cleared on every empty render. Replace the sentinel with a prev-value comparison so the reset fires exactly once per input transition - even when the user types, clears, types, and clears again. Validated end-to-end with Playwright: - Type 'hello' -> base64 preview appears - Clear -> preview clears to placeholder - Type 'world' -> new base64 preview appears - Clear -> preview clears to placeholder again (was broken before) All 28 jest suites / 649 tests still pass; lint and type-check clean. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…rn/frontend/eslint-plugin-react-hooks-7.1.1
romanlutz
approved these changes
Jun 11, 2026
romanlutz
deleted the
dependabot/npm_and_yarn/frontend/eslint-plugin-react-hooks-7.1.1
branch
June 11, 2026 04:18
varunj-msft
added a commit
to varunj-msft/PyRIT
that referenced
this pull request
Jun 12, 2026
CI lints with the merged state of (PR branch + origin/main), and main upgraded eslint-plugin-react-hooks to v7 (PR microsoft#1984) which adds the `set-state-in-effect` rule. My branch's package.json still pins v5 locally so this wasn't caught pre-push, but the merge resolution at CI time gives v7 and the rule fires on the synchronous setLoading(true)/setError(null)/setResult(null) calls at the top of my useEffect body. Refactor: tag the cached result+error with the target name they were requested for (`requestedFor` state), then derive `loading`, `displayResult`, and `displayError` from current target vs that tag. Switching targets makes the prior tag no longer match, so the display reverts to the spinner without any synchronous state mutation inside the effect. Same-target reopen still needs the explicit reset in handleClose to re-fire the effect (the [open, name] deps tuple is identical across close→reopen). All 39 dialog+table tests still pass; full frontend suite 669/669 still green. Verified the fix against v7 locally by temporarily upgrading the lockfile and running eslint on just my changed files — clean. Reverted the lockfile bump because the upgrade belongs to PR microsoft#1984, not this PR; the merge will combine main's v7 plugin with my source-level fix. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.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.
Bumps eslint-plugin-react-hooks from 5.2.0 to 7.1.1.
Release notes
Sourced from eslint-plugin-react-hooks's releases.
Changelog
Sourced from eslint-plugin-react-hooks's changelog.
... (truncated)
Commits