|
2 | 2 |
|
3 | 3 | ## What is the purpose of `eslint-react`?
|
4 | 4 |
|
5 |
| -The purpose of `eslint-react` is to provide ESLint rules for not just for React DOM but also other libraries and frameworks that use React as a runtime. |
| 5 | +The purpose of `eslint-react` is to provide ESLint plugins for not just for React DOM but also other libraries and frameworks that use React as a runtime. Currently, it provides: |
6 | 6 |
|
7 |
| -## What are the differences between `@eslint-react/eslint-plugin` and `eslint-plugin-react`? |
| 7 | +- `eslint-plugin-react-x` - Core rules (DOM Irrelevant, Render Target Agnostic, Formatting Independent). |
| 8 | +- `eslint-plugin-react-dom` - DOM specific rules for React DOM. |
| 9 | +- `eslint-plugin-react-debug` - Debugging rules. |
| 10 | +- `eslint-plugin-react-hooks-extra` - Extra React Hooks rules. |
| 11 | +- `eslint-plugin-react-naming-convention` - Naming convention rules. |
8 | 12 |
|
9 |
| -The main difference is when using `@eslint-react/eslint-plugin` you can customize the behavior of the rules depending on the what render target you are using. While `eslint-plugin-react` will always assume you are using React DOM even if you are working with a project that only uses React Three Fiber (You can learn more through encounters like [1] in [2]). |
| 13 | +## What are the differences between `eslint-plugin-react-x` and `eslint-plugin-react`? |
10 | 14 |
|
11 |
| -## Is `@eslint-react/eslint-plugin` a replacement for `eslint-plugin-react`? |
| 15 | +The main difference is when using `eslint-plugin-react-x` you can customize the behavior of the rules depending on the what render target you are using. **While `eslint-plugin-react` will always assume you are using `React DOM`** even if you are working with a project that only uses React Three Fiber (You can learn more through encounters like [1] in [2]). |
12 | 16 |
|
13 |
| -No, `@eslint-react/eslint-plugin` is not meant to be a drop-in replacement for `eslint-plugin-react`. But you can still using it as a replacement if you want to. Keep in mind that certain rules may behave differently, and the rules provided by `eslint-react` are more adhere to [react.dev](https://react.dev/). |
| 17 | +## Is `eslint-plugin-react-x` a replacement for `eslint-plugin-react`? |
| 18 | + |
| 19 | +No, `eslint-plugin-react-x` is not meant to be a drop-in replacement for `eslint-plugin-react`. But you can still using it as a replacement if you want to. Keep in mind that certain rules may behave differently, and the rules provided by `eslint-react` are more adhere to [react.dev](https://react.dev/). |
14 | 20 |
|
15 | 21 | [1]: https://github.com/pmndrs/react-three-fiber/discussions/2487
|
16 | 22 | [2]: https://github.com/jsx-eslint/eslint-plugin-react/issues/3423#issuecomment-1930936266
|
0 commit comments