react-native-macos/packages/eslint-plugin-react-native-...
Adam Foxman 5aead70e80 eslint config & plugin packages - prep for monorepo RFC (#34581)
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
2022-11-25 05:44:17 -08:00
..
__tests__ RN: Replace `error-subclass-name` with `require-extends-error` ESLint Rule 2022-09-27 14:37:29 -07:00
BUCK Move error-subclass-name lint rule to GitHub 2019-10-09 11:48:07 -07:00
README.md eslint config & plugin packages - prep for monorepo RFC (#34581) 2022-11-25 05:44:17 -08:00
index.js RN: Replace `error-subclass-name` with `require-extends-error` ESLint Rule 2022-09-27 14:37:29 -07:00
package.json eslint config & plugin packages - prep for monorepo RFC (#34581) 2022-11-25 05:44:17 -08:00
platform-colors.js Remove lint restricting properties on `DynamicColorIOS` (#33182) 2022-02-25 06:46:14 -08:00

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.