Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@

- [`@eslint-react/eslint-plugin`](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin) - A unified plugin that combines all individual plugins into one.

> [!NOTE]\
> Dont know which one to use? See our [FAQ](https://eslint-react.xyz/docs/faq#which-one-should-i-use-unified-plugin-or-individual-plugins) for guidance.
## Installation

> [!NOTE]\
Expand Down
16 changes: 16 additions & 0 deletions apps/website/content/docs/faq.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,22 @@ import { Accordion, Accordions } from "fumadocs-ui/components/accordion";
For more information, see the [JSX Transform](/docs/configuration/configure-project-config#jsx-transform) section on the [Configure Project Config](/docs/configuration/configure-project-config) page.
</Accordion>

<Accordion title="Which one should I use? Unified plugin or individual plugins?">
For users who use the presets we provide (such as `recommended` or `strict`), it is recommended to use the unified plugin `@eslint-react/eslint-plugin`. This simplifies configuration and ensures that all relevant rules are enabled correctly.

For users who need more fine-grained control, choose to use the unified plugin or individual plugins depending on the degree of modification relative to the initial presets we provide:

- **Minor Adjustments**: If you only need to make minor adjustments to the presets (for example, disabling some rules or adding a few custom rules), it is recommended to continue using the unified plugin `@eslint-react/eslint-plugin`. This makes managing the configuration simpler while still benefiting from the comprehensiveness of the presets.
- **Major Customization**: If you need to make significant changes to the rule set (for example, using only the rules of a specific plugin, or requiring a completely different rule set), it is recommended to use individual plugins (such as `eslint-plugin-react-x`, `eslint-plugin-react-dom`, etc.). This
allows you to have full control over the enabled rules and customize them according to your project's needs.

For users who want to build and maintain an ESLint configuration for themselves or their organization, it is **always recommended to use individual plugins**. This allows you to freely select plugins and compose rules as needed, without being limited by presets.

<Callout type="warning">
The unified plugin (`@eslint-react/eslint-plugin`) contains some historical decisions and internal behaviors that were originally made to be compatible with both Legacy Config and Flat Config. Reducing external package dependencies on it is better in the long run.
</Callout>
</Accordion>

<Accordion title="Is there anything to note about migrating from 'eslint-plugin-react'?">
Please be aware that some rules may behave differently when transitioning to ESLint React. The rules in ESLint React are more closely aligned with the guidelines provided by [react.dev](https://react.dev). This alignment is due to ESLint React adopting [react.dev](https://react.dev) as its primary reference, rather than `eslint-plugin-react`.

Expand Down
3 changes: 3 additions & 0 deletions packages/plugins/eslint-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@

- [`@eslint-react/eslint-plugin`](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin) - A unified plugin that combines all individual plugins into one.

> [!NOTE]\
> Dont know which one to use? See our [FAQ](https://eslint-react.xyz/docs/faq#which-one-should-i-use-unified-plugin-or-individual-plugins) for guidance.
## Installation

> [!NOTE]\
Expand Down