5aead70e80
Summary: The [monorepo RFC](https://github.com/react-native-community/discussions-and-proposals/pull/480) calls for renaming: * `react-native-community/eslint-config` -> `react-native/eslint-config` * `react-native-community/eslint-plugin` -> `react-native/eslint-plugin` It also calls for the versions to be aligned with the rest of main -- currently `0.72.0`. ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [General][Changed] - Renamed `react-native-community/eslint-config` to `react-native/eslint-config` v0.72.0 to align with other packages [General][Changed] - Renamed `react-native-community/eslint-plugin` to `react-native/eslint-plugin` v0.72.0 to align with other packages Pull Request resolved: https://github.com/facebook/react-native/pull/34581 Test Plan: First test is to run `yarn lint`, and verify that output matches before and after this change. Second test is to change the ESLint config to use the "old" packages (under `react-native-commnuity`) and run `yarn lint` to make sure that they work as expected. This is what customers will experience, until they manually move to the new ESLint packages. Reviewed By: cortinico Differential Revision: D41520500 Pulled By: hoxyq fbshipit-source-id: a61e5ae15d5aaf11f0143a3b0257a60a03b1550b |
||
---|---|---|
.. | ||
__tests__ | ||
BUCK | ||
README.md | ||
index.js | ||
package.json | ||
platform-colors.js |
README.md
@react-native/eslint-plugin
This plugin is intended to be used in @react-native/eslint-config
. You probably want to install that package instead.
Installation
yarn add --dev eslint @react-native/eslint-plugin
Note: We're using yarn
to install deps. Feel free to change commands to use npm
3+ and npx
if you like
Usage
Add to your eslint config (.eslintrc
, or eslintConfig
field in package.json
):
{
"plugins": ["@react-native"]
}
Rules
platform-colors
Enforces that calls to PlatformColor
and DynamicColorIOS
are statically analyzable to enable performance optimizations.