Files
react-native/packages/eslint-plugin-react-native
Alex Hunt bfa679f0ea Expose 'react-native/setup-env' to replace InitializeCore (#57475)
Summary:
Pull Request resolved: https://github.com/react/react-native/pull/57475

NOTE: Resubmission of D110890810.

Replace `'react-native/Libraries/Core/InitializeCore'` with an explicit `'react-native/setup-env'` secondary export.

This was previously a special-case path excluded from our ESLint warnings. It is now formalised.

**Changes**

- Add new `src/setup-env.js` entry point and `package.json` mapping.
- Replace references in `packages/metro-config/` and `packages/community-cli-plugin/`.
- Update `warn-on-deep-imports` ESLint rule.

Changelog:
[General][Added] - Add `'react-native/setup-env'` entry point. This replaces the previous side-effectful `'react-native/Libraries/Core/InitializeCore'`.
[General][Deprecated] - Deprecate `'react-native/Libraries/Core/InitializeCore'`. Use `'react-native/setup-env'` instead.

Reviewed By: rubennorte

Differential Revision: D111022546

fbshipit-source-id: c9081997468b55b02c8a89544c7cb2026d625ad3
2026-07-08 09:33:30 -07:00
..

@react-native/eslint-plugin

npm npm downloads

ESLint rules for @react-native/eslint-config. You probably want to install that package instead.

Rules

platform-colors

Enforces that calls to PlatformColor and DynamicColorIOS are statically analyzable to enable performance optimizations.