# @palastri/eslint-plugin-react

> ESLint plugin for React

Latest version **1.1.1** (published 2023-10-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install @palastri/eslint-plugin-react
pnpm add @palastri/eslint-plugin-react
yarn add @palastri/eslint-plugin-react
bun add @palastri/eslint-plugin-react
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2023-10-20 |
| First published | 2023-09-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | ^16.0.0 \|\| >= 18.0.0 |
| Dependencies | 12 |
| Unpacked size | 10.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Imam S Rifkan |
| Maintainers | esrifkan, palastri.optima |
| Keywords | eslint, eslintplugin, eslint-plugin, react, typescript |

## Links

- npm: https://www.npmjs.com/package/@palastri/eslint-plugin-react
- Repository: https://github.com/palastri/eslint-plugin-react
- Homepage: https://github.com/palastri/eslint-plugin-react#readme
- Issues: https://github.com/palastri/eslint-plugin-react/issues
- npm.io page: https://npm.io/package/@palastri/eslint-plugin-react

## Dependencies (12)

- [prettier](https://npm.io/package/prettier.md) ^2.8.8
- [eslint-plugin-react](https://npm.io/package/eslint-plugin-react.md) ^7.32.2
- [eslint-plugin-import](https://npm.io/package/eslint-plugin-import.md) ^2.28.1
- [eslint-config-prettier](https://npm.io/package/eslint-config-prettier.md) ^8.8.0
- [eslint-plugin-jsx-a11y](https://npm.io/package/eslint-plugin-jsx-a11y.md) ^6.7.1
- [eslint-plugin-prettier](https://npm.io/package/eslint-plugin-prettier.md) ^4.2.1
- [@typescript-eslint/parser](https://npm.io/package/@typescript-eslint/parser.md) ^6.0.0
- [eslint-plugin-react-hooks](https://npm.io/package/eslint-plugin-react-hooks.md) ^4.6.0
- [eslint-import-resolver-node](https://npm.io/package/eslint-import-resolver-node.md) ^0.3.9
- [eslint-plugin-eslint-plugin](https://npm.io/package/eslint-plugin-eslint-plugin.md) ^5.1.0
- [@typescript-eslint/eslint-plugin](https://npm.io/package/@typescript-eslint/eslint-plugin.md) ^6.0.0
- [eslint-import-resolver-typescript](https://npm.io/package/eslint-import-resolver-typescript.md) ^3.6.1

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.1.1 (latest) — 2023-10-20
- 1.1.0 — 2023-09-05
- 1.0.0 — 2023-09-01

## README

# eslint-plugin-react

[![Build Status](https://github.com/palastri/eslint-plugin-react/workflows/Release/badge.svg?branch=main)](https://github.com/palastri/eslint-plugin-react/actions/workflows/production.yml)

## Installation

```bash
yarn add --dev eslint @palastri/eslint-plugin-react
```

## Usage

Add `@palastri/eslint-plugin-react` to the plugins section of your `.eslintrc` configuration file. You
can omit the `eslint-plugin-` prefix:

```json
{
  "extends": ["@palastri/react/recommended"],
  "plugins": ["@palastri/react"]
}
```

## Shareable configurations

### Recommended

This plugin exports a recommended configuration that enforces good testing practices.
To enable this configuration, please use the `extends` property in the `.eslintrc` config file:

```json
{
  "extends": ["plugin:@palastri/react/recommended"]
}
```

### Stylistic

This plugin also exports a configuration named `stylistic`, which adds some stylistic rules. The rules considered to be best practice for modern TypeScript codebase, but that do not impact program logic.
To enable this configuration, please use the `extends` property in the `.eslintrc` config file:

```json
{
  "extends": ["plugin:@palastri/react/stylistic"]
}
```

### Next.js

This plugin is ready to integrate with [Next.js](https://nextjs.org/). Instead of using `recommended`, it must use `next` for the configuration. To enable this configuration, please use the `extends` property in the `.eslintrc` config file:

```json
{
  "extends": ["plugin:@palastri/react/next", "next"]
}
```

## Recommended plugin ruleset

This plugin includes the following plugins:

- [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint)
- [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier)
- [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import)
- [eslint-plugin-jsx-a11y](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y)
- [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier)
- [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react)
- [eslint-plugin-react-hooks](https://github.com/facebook/react/tree/main/packages/eslint-plugin-react-hooks)

One or more default rules from those plugins are overridden such as:

| Name                                 | Description                                                       | Rules                                                                                    |
| :----------------------------------- | :---------------------------------------------------------------- | :--------------------------------------------------------------------------------------- |
| `@typescript-eslint/array-type`      | Require consistently using either `T[]` or `Array<T>` for arrays. | `["error", { default: "array-simple" }]`                                                 |
| `@typescript-eslint/member-ordering` | Require a consistent member declaration order.                    | `["error", { default: { optionallyOrder: "required-first", order: "alphabetically" } }]` |
| `react/prop-types`                   | Disallow missing props validation in a React component definition | `"off"`                                                                                  |

## Changelog

Detailed changes for each release are documented in [CHANGELOG.md](./CHANGELOG.md)

---
_Source: https://npm.io/package/@palastri/eslint-plugin-react · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
