Skip to content

refactor: clear the react-hooks/exhaustive-deps lint warnings - #3583

Merged
Lisa18289 merged 1 commit into
mainfrom
claude/brave-rubin-ab701f
Nov 3, 2026
Merged

Lisa18289 merged 1 commit into
mainfrom
claude/brave-rubin-ab701f

Conversation

@Lisa18289

@Lisa18289 Lisa18289 commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

pnpm lint on main passed with 69 warnings, all react-hooks/exhaustive-deps. This clears all but one of them without changing behaviour.

  • Where an equivalent dependency exists, the deps now use it, e.g. regularValue instead of valueFromProps, tunnel instead of providerId, and renderPromise instead of src. OverlayController depends on a controller alias instead of this. The react-hook-form Field stories get [form]; useForm returns a stable object.
  • The unused useAutorunEffect is gone.
  • Deliberate deps get an eslint-disable-next-line with the reason. This covers hooks that take deps from their callers, aria-live announcements that must not repeat, values kept per id or per src, and refs whose .current re-runs an effect once the element attaches.

LightBoxGallery.tsx gets the same disable line as #3513 on next. PropsContextProvider.tsx keeps its warning: next rewrote that memo, so a disable line here would conflict on the next main → next merge. Merging this PR into next is clean (git merge-tree).

🤖 Generated with Claude Code

@Lisa18289 Lisa18289 self-assigned this Oct 27, 2026
@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Coverage Report for ./packages/components/

Status Category Percentage Covered / Total
🔵 Lines 64.85% 1412 / 2177
🔵 Statements 64.31% 1451 / 2256
🔵 Functions 50.63% 318 / 628
🔵 Branches 58.94% 758 / 1286
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/components/src/lib/controller/overlay/OverlayController.ts 38.63% 16.66% 32% 41.17% 67, 68, 69, 84-117, 140, 151-163
packages/components/src/lib/hooks/useOnChange.ts 16.66% 0% 0% 16.66% 9-15
packages/components/src/lib/mobx/useSelector.ts 66.66% 100% 33.33% 66.66% 14-15
Generated in workflow #7510 for commit f2924f1 by the Vitest Coverage Report Action

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Preview Deployment

Preview environments are ready:

Type URL
docs pr-3583.docs.review.flow-components.de
storybook pr-3583.storybook.review.flow-components.de

Images:

  • docs: ghcr.io/mittwald/flow/docs:pr-3583
  • storybook: ghcr.io/mittwald/flow/storybook:pr-3583

@Lisa18289
Lisa18289 marked this pull request as ready for review October 28, 2026 07:44
@Lisa18289
Lisa18289 requested a review from a team October 28, 2026 07:44
@Lisa18289
Lisa18289 enabled auto-merge (squash) November 3, 2026 06:34

@ins0 ins0 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: The commit messages contradict each other. fa204ae says LightBoxGallery.tsx keeps its warning, and 139217e says the useWatchPathname and NotificationRenderController warnings stay until the code is fixed. The commits after them silence all three. A squash merge keeps those messages out of main's history.

Deps use an equivalent value where one exists; deliberate deps get an
eslint-disable-next-line with the reason. The unused useAutorunEffect is
gone. PropsContextProvider keeps its warning: next rewrote that memo, so
touching it here would conflict on the next main → next merge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Lisa18289
Lisa18289 force-pushed the claude/brave-rubin-ab701f branch from 980df57 to f2924f1 Compare November 3, 2026 07:19
@Lisa18289

Copy link
Copy Markdown
Member Author

Squashed into one commit (f2924f1), so the contradicting messages are gone.

@ins0 ins0 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: The PR body says "clears all but one of them", but the lint job reports two warnings, both on PropsContextProvider.tsx:24: the missing providedProps and the spread element in the dependency array.

@Lisa18289
Lisa18289 merged commit 1666843 into main Nov 3, 2026
27 of 28 checks passed
@Lisa18289
Lisa18289 deleted the claude/brave-rubin-ab701f branch November 3, 2026 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants