Skip to content

Commit 1a587f2

Browse files
committed
Add FAQ entry for plugin selection guidance
1 parent 0e3198f commit 1a587f2

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@
5050

5151
- [`@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.
5252

53+
> [!NOTE]\
54+
> 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.
55+
5356
## Installation
5457

5558
> [!NOTE]\

apps/website/content/docs/faq.mdx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,22 @@ import { Accordion, Accordions } from "fumadocs-ui/components/accordion";
5252
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.
5353
</Accordion>
5454

55+
<Accordion title="Which one should I use? Unified plugin or individual plugins?">
56+
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.
57+
58+
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:
59+
60+
- **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.
61+
- **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
62+
allows you to have full control over the enabled rules and customize them according to your project's needs.
63+
64+
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.
65+
66+
<Callout type="warning">
67+
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.
68+
</Callout>
69+
</Accordion>
70+
5571
<Accordion title="Is there anything to note about migrating from 'eslint-plugin-react'?">
5672
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`.
5773

packages/plugins/eslint-plugin/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@
5050

5151
- [`@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.
5252

53+
> [!NOTE]\
54+
> 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.
55+
5356
## Installation
5457

5558
> [!NOTE]\

0 commit comments

Comments
 (0)