react-native-macos/packages/eslint-plugin-react-native-...
Tim Yung 4f83498462 RN: Replace `error-subclass-name` with `require-extends-error` ESLint Rule
Summary:
Removes the `error-subclass-name` ESLint rule from `react-native/eslint-plugin`, and implements a new `require-extends-error` ESLint rule inside the React Native repository. This rule was only intended to be used for internal development of React Native.

This will change `react-native/eslint-plugin` to no longer provide the `error-subclass-name` rule.

NOTE: One behavior difference here is that I also implemented the desired behavior of checking classes that extend `Library.SomeError`.

Changelog:
[General][Removed] - `react-native/eslint-plugin` no longer provides the `error-subclass-name` rule.

Reviewed By: lunaleaps

Differential Revision: D39858882

fbshipit-source-id: 27b53216d77a15b3425bd9669dbc9d954c1c61da
2022-09-27 14:37:29 -07: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 RN: Replace `error-subclass-name` with `require-extends-error` ESLint Rule 2022-09-27 14:37:29 -07:00
index.js RN: Replace `error-subclass-name` with `require-extends-error` ESLint Rule 2022-09-27 14:37:29 -07:00
package.json Bump version of @react-native-community/eslint-plugin to 1.2.0 2022-04-20 13:19:43 -07:00
platform-colors.js Remove lint restricting properties on `DynamicColorIOS` (#33182) 2022-02-25 06:46:14 -08:00

README.md

eslint-plugin-react-native-community

This plugin is intended to be used in @react-native-community/eslint-config. You probably want to install that package instead.

Installation

yarn add --dev eslint @react-native-community/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-community"]
}

Rules

platform-colors

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