You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The existing `eslint-plugin-react` is a plugin for `react-dom` but named react[¹], it only supports React DOM[²] and does not being expected to be used with x-platform.
12
12
13
13
Although you can use it with other renderers, it will always assume that you are using the React DOM, even if you are working with a codebase that uses a different renderer. This can sometimes cause confusion and problems[³].
14
14
15
15
Unfortunately, the maintainers of `eslint-plugin-react` refuse to change that[⁴].
16
16
17
-
Just as in [Beyond the DOM](https://legacy.reactjs.org/docs/design-principles.html#beyond-the-dom) we believe the future of React Linter is not limited to the DOM. This influences every decision made in `eslint-react`, and it is the reason why we created it.
17
+
Just as in [Beyond the DOM](https://legacy.reactjs.org/docs/design-principles.html#beyond-the-dom) we believe the future of React Linter is not limited to the DOM. This influences every decision made in ESLint React, and it is the reason why we created it.
18
18
19
19
</Accordion>
20
20
21
-
<Accordiontitle="What is included in eslint-react?">
21
+
<Accordiontitle='Why is there no "jsx-runtime" preset in ESLint React?'>
22
+
23
+
ESLint React uses the same JSX runtime as specified in your `tsconfig.json` or `jsconfig.json` and adjusts the relevant rules accordingly.
24
+
25
+
This avoids potential issues where the JSX runtime configured in ESLint might conflict with the one configured in `tsconfig.json` or `jsconfig.json`.
26
+
27
+
</Accordion>
28
+
29
+
<Accordiontitle="What is included in ESLint React?">
22
30
23
31
Currently, it includes the following:
24
32
@@ -29,21 +37,21 @@ Currently, it includes the following:
-[`eslint-plugin-react-dom`](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) - React DOM rules.
42
-
-[`eslint-plugin-react-web-api`](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-web-api) - Web API interaction rules.
43
-
-[`eslint-plugin-react-hooks-extra`](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-hooks-extra) - Extra React Hooks rules.
-[`eslint-plugin-react-debug`](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-debug) - Debugging rules for inspecting React patterns in code.
46
-
-[`@eslint-react/eslint-plugin`](https://www.npmjs.com/package/@eslint-react/eslint-plugin) - Main plugin combining all rules and presets from the above packages.
-[`eslint-plugin-react-dom`](https://github.com/Rel1cx/ESLint React/tree/main/packages/plugins/eslint-plugin-react-dom) - React DOM rules.
50
+
-[`eslint-plugin-react-web-api`](https://github.com/Rel1cx/ESLint React/tree/main/packages/plugins/eslint-plugin-react-web-api) - Web API interaction rules.
51
+
-[`eslint-plugin-react-hooks-extra`](https://github.com/Rel1cx/ESLint React/tree/main/packages/plugins/eslint-plugin-react-hooks-extra) - Extra React Hooks rules.
-[`eslint-plugin-react-debug`](https://github.com/Rel1cx/ESLint React/tree/main/packages/plugins/eslint-plugin-react-debug) - Debugging rules for inspecting React patterns in code.
54
+
-[`@ESLint React/eslint-plugin`](https://www.npmjs.com/package/@ESLint React/eslint-plugin) - Main plugin combining all rules and presets from the above packages.
47
55
48
56
**Website & Playground**
49
57
@@ -54,11 +62,11 @@ You can view our long-term plans on the [roadmap](/roadmap#plugins-with-ecologic
54
62
55
63
</Accordion>
56
64
57
-
<Accordiontitle="Is there anything to note about migrating from eslint-plugin-react to eslint-react?">
65
+
<Accordiontitle="Is there anything to note about migrating from eslint-plugin-react to ESLint React?">
58
66
59
-
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`.
67
+
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`.
60
68
61
-
To smoothly transition, we suggest reviewing the rules in `eslint-react` and running a comprehensive linting check on your codebase to identify and address any discrepancies introduced by the migration.
69
+
To smoothly transition, we suggest reviewing the rules in ESLint React and running a comprehensive linting check on your codebase to identify and address any discrepancies introduced by the migration.
0 commit comments