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.
11
+
ESLint React was created to address the fundamental limitations of `eslint-plugin-react`in modern React development ecosystems. While the existing plugin uses the name "react", its implementation specifically targets React DOM and maintains DOM-centric assumptions that create friction when used with alternative renderers like React Native, React Three Fiber, or custom reconcilers. This implicit DOM dependency persists despite React's core design principle of renderer-agnosticism as outlined in [Beyond the DOM](https://legacy.reactjs.org/docs/design-principles.html#beyond-the-dom).
12
12
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[³].
13
+
Our solution treating DOM as one of many supported targets rather than the default assumption. This paradigm shift enables:
14
14
15
-
Unfortunately, the maintainers of `eslint-plugin-react` refuse to change that[⁴].
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.
18
-
19
-
</Accordion>
20
-
21
-
<Accordiontitle='Why is there no "jsx-runtime" preset in ESLint React?'>
22
-
23
-
ESLint React reads your `tsconfig.json` or `jsconfig.json` configuration files to determines how to perform the JSX analysis internally. This means that you don't need to configure the JSX runtime in ESLint React, as it will automatically use the one configured in your project.
24
-
25
-
Additionally, this approach avoids potential problems where the JSX runtime configured in `eslint.config.js` might conflict with the one configured in `tsconfig.json` or `jsconfig.json`.
26
-
27
-
For more information, see the [JSX Runtime](/docs/configuration/configure-language-config#jsx-runtime) section on the [Configure Language Config](/docs/configuration/configure-language-config) page.
15
+
- Context-aware checks adapting to different environments
16
+
- Future-proof architecture for emerging React-based platforms
17
+
- Consistent code quality standards and shmelless linting experiences
28
18
29
19
</Accordion>
30
20
31
-
<Accordiontitle="What is included in ESLint React?">
21
+
<Accordiontitle="What's included?">
32
22
33
23
Currently, it includes the following:
34
24
@@ -64,7 +54,17 @@ You can view our long-term plans on the [roadmap](/roadmap#plugins-with-ecologic
64
54
65
55
</Accordion>
66
56
67
-
<Accordiontitle="Is there anything to note about migrating from eslint-plugin-react to ESLint React?">
57
+
<Accordiontitle='Why is there no "jsx-runtime" preset?'>
58
+
59
+
ESLint React reads your `tsconfig.json` or `jsconfig.json` configuration files to determines how to perform the JSX analysis internally. This means that you don't need to configure the JSX runtime in ESLint React, as it will automatically use the one configured in your project.
60
+
61
+
Additionally, this approach avoids potential problems where the JSX runtime configured in `eslint.config.js` might conflict with the one configured in `tsconfig.json` or `jsconfig.json`.
62
+
63
+
For more information, see the [JSX Runtime](/docs/configuration/configure-language-config#jsx-runtime) section on the [Configure Language Config](/docs/configuration/configure-language-config) page.
64
+
65
+
</Accordion>
66
+
67
+
<Accordiontitle="Is there anything to note about migrating from eslint-plugin-react?">
68
68
69
69
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`.
70
70
@@ -73,8 +73,3 @@ To smoothly transition, we suggest reviewing the rules in ESLint React and runni
0 commit comments