Skip to content

chore(apollo-vertex): lint for manual memoization with React Compiler#485

Merged
KokoMilev merged 1 commit intomainfrom
ruudandriessen/lint-no-manual-memo
Apr 10, 2026
Merged

chore(apollo-vertex): lint for manual memoization with React Compiler#485
KokoMilev merged 1 commit intomainfrom
ruudandriessen/lint-no-manual-memo

Conversation

@ruudandriessen
Copy link
Copy Markdown
Collaborator

Summary

  • Adds an oxlint no-restricted-imports rule banning useMemo, useCallback, and memo from react — the React Compiler handles memoization automatically
  • Removes the equivalent Biome linter rule that was configured but never enforced (no script ran biome lint)
  • Fixes existing violations in icon-grid.tsx and feature-flag-demo.tsx by replacing manual memoization with plain expressions/functions
  • Disables the rule for registry/** files to avoid false positives from import * as React namespace imports used by shadcn components

Test plan

  • pnpm lint passes with 0 errors
  • pnpm build succeeds
  • Verified rule catches import { useMemo } from "react" in app code
  • Verified import * as React in registry files is not flagged

Add oxlint no-restricted-imports rule to ban useMemo, useCallback, and
memo from react — the React Compiler handles memoization automatically.
Remove the equivalent but unenforced Biome linter rule, and fix existing
usages in icon-grid and feature-flag-demo.
@ruudandriessen ruudandriessen requested a review from a team as a code owner April 10, 2026 09:54
@ruudandriessen ruudandriessen requested review from angeloaltamiranom and frankkluijtmans and removed request for a team April 10, 2026 09:54
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (PT)
apollo-canvas 🟢 Ready Preview, Logs Apr 10, 2026, 02:55:32 AM
apollo-landing 🟢 Ready Preview, Logs Apr 10, 2026, 02:55:18 AM
apollo-ui-react 🟢 Ready Preview, Logs Apr 10, 2026, 02:55:24 AM
apollo-vertex 🟢 Ready Preview, Logs Apr 10, 2026, 02:56:34 AM
apollo-wind 🟢 Ready Preview, Logs Apr 10, 2026, 02:55:18 AM

@KokoMilev KokoMilev enabled auto-merge (rebase) April 10, 2026 09:54
@github-actions github-actions bot added the size:M 30-99 changed lines. label Apr 10, 2026
@github-actions
Copy link
Copy Markdown

Dependency License Review

  • 1948 package(s) scanned
  • ✅ No license issues found
  • ⚠️ 4 package(s) excluded (see details below)
License distribution
License Packages
MIT 1707
ISC 89
Apache-2.0 61
BSD-3-Clause 28
BSD-2-Clause 23
BlueOak-1.0.0 8
MPL-2.0 5
MIT OR Apache-2.0 3
MIT-0 3
CC0-1.0 3
LGPL-3.0-or-later 2
Unknown 2
(MIT OR Apache-2.0) 2
Unlicense 2
Python-2.0 1
CC-BY-4.0 1
(MPL-2.0 OR Apache-2.0) 1
Artistic-2.0 1
(WTFPL OR MIT) 1
(BSD-2-Clause OR MIT OR Apache-2.0) 1
CC-BY-3.0 1
0BSD 1
(MIT OR CC0-1.0) 1
MIT AND ISC 1
Excluded packages
Package Version License Reason
@img/sharp-libvips-linux-x64 1.2.4 LGPL-3.0-or-later LGPL pre-built binary, not linked
@img/sharp-libvips-linuxmusl-x64 1.2.4 LGPL-3.0-or-later LGPL pre-built binary, not linked
@uipath/proteus-client 0.1.10 Unknown UiPath internal package, Proprietary license
khroma 2.1.0 Unknown MIT per GitHub repo, missing license field in package.json

@KokoMilev KokoMilev merged commit b9b4867 into main Apr 10, 2026
41 checks passed
@KokoMilev KokoMilev deleted the ruudandriessen/lint-no-manual-memo branch April 10, 2026 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants