Skip to content

chore: code quality improvements and cleanup#381

Closed
everettbu wants to merge 2 commits into
mainfrom
cleanup/code-quality-improvements
Closed

chore: code quality improvements and cleanup#381
everettbu wants to merge 2 commits into
mainfrom
cleanup/code-quality-improvements

Conversation

@everettbu

Copy link
Copy Markdown

Mirror of facebook/react#35563
Original author: Programlog


Summary

This PR contains small code quality improvements and cleanup across the React codebase.

Changes

  1. Remove obsolete error code 355 for useOpaqueIdentifier

    • This error was for a feature that was never released
    • The error message itself contained a TODO: "This feature was never released so we should be able to remove this error from the map"
    • Confirmed no other references to this error code exist in the codebase
  2. Improve @deprecated documentation for noEmit compiler option

    • Clarify the migration path to use outputMode instead
    • Updated terminology from "Forget" to "the compiler" for consistency
    • Made the deprecation notice more actionable
  3. Remove stale TODO comment from ReactNative.js shim

    • The TODO suggested deleting the "legacy renderer" but this shim is still required for backward compatibility
    • Removing the misleading comment prevents confusion

Test Plan

These are documentation and dead code removal changes that don't affect runtime behavior:

  • Error code 355 was for an unreleased feature and has no usages
  • The noEmit option behavior is unchanged, only JSDoc improved
  • The ReactNative.js shim behavior is unchanged, only comment removed

- Remove obsolete error code 355 for useOpaqueIdentifier
  This error was for a feature that was never released, as noted in the
  TODO comment within the error message itself.

- Improve @deprecated documentation for noEmit compiler option
  Clarify the migration path to outputMode and update terminology from
  'Forget' to 'the compiler'.

- Remove stale TODO comment from ReactNative.js shim
  The comment suggested deleting the legacy renderer, but this shim is
  still needed for backward compatibility.
@greptile-apps

greptile-apps Bot commented Jan 19, 2026

Copy link
Copy Markdown

Greptile Summary

This PR performs code quality cleanup across three areas:

  • Removed obsolete error code 355: Deleted error message for useOpaqueIdentifier, a feature that was never released. The error message itself contained a TODO acknowledging it should be removed.
  • Enhanced deprecation documentation: Updated JSDoc for the noEmit compiler option to provide clearer migration guidance to outputMode and updated terminology from "Forget" to "the compiler" for consistency.
  • Removed misleading TODO: Deleted a stale TODO comment from the ReactNative shim that suggested removing the "legacy renderer", which is still needed for backward compatibility.

All changes are documentation and dead code removal that don't affect runtime behavior.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • All changes are documentation improvements and dead code removal with no runtime impact. The error code removal is explicitly acknowledged as safe (feature was never released), the JSDoc update improves clarity without changing behavior, and the TODO removal prevents future confusion without affecting functionality.
  • No files require special attention

Important Files Changed

Filename Overview
scripts/error-codes/codes.json Removed obsolete error code 355 for useOpaqueIdentifier, an unreleased feature
compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Options.ts Improved JSDoc for deprecated noEmit option with clearer migration path to outputMode
scripts/rollup/shims/react-native/ReactNative.js Removed misleading TODO comment suggesting deletion of legacy renderer

@everettbu

Copy link
Copy Markdown
Author

Upstream PR was closed or merged. Code is synced via branch mirror.

@everettbu everettbu closed this Jan 29, 2026
@everettbu
everettbu deleted the cleanup/code-quality-improvements branch January 29, 2026 00:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants