Skip to content

Commit a906934

Browse files
committed
docs: update 'Why?' section in FAQ
1 parent 4098215 commit a906934

File tree

1 file changed

+18
-23
lines changed

1 file changed

+18
-23
lines changed

apps/website/content/docs/faq.mdx

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,19 @@ import { Accordion, Accordions } from 'fumadocs-ui/components/accordion';
66

77
<Accordions>
88

9-
<Accordion title="Why create ESLint React?">
9+
<Accordion title="Why?">
1010

11-
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).
1212

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:
1414

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-
<Accordion title='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
2818

2919
</Accordion>
3020

31-
<Accordion title="What is included in ESLint React?">
21+
<Accordion title="What's included?">
3222

3323
Currently, it includes the following:
3424

@@ -64,7 +54,17 @@ You can view our long-term plans on the [roadmap](/roadmap#plugins-with-ecologic
6454

6555
</Accordion>
6656

67-
<Accordion title="Is there anything to note about migrating from eslint-plugin-react to ESLint React?">
57+
<Accordion title='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+
<Accordion title="Is there anything to note about migrating from eslint-plugin-react?">
6868

6969
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`.
7070

@@ -73,8 +73,3 @@ To smoothly transition, we suggest reviewing the rules in ESLint React and runni
7373
</Accordion>
7474

7575
</Accordions>
76-
77-
[¹]: https://github.com/jsx-eslint/eslint-plugin-react/issues/3423#issuecomment-1930936266
78-
[²]: https://github.com/jsx-eslint/eslint-plugin-react/issues/3423#issuecomment-1314565853
79-
[³]: https://github.com/pmndrs/gltf-react-three/issues/38#issuecomment-2057794974
80-
[]: https://github.com/jsx-eslint/eslint-plugin-react/issues/3423#issuecomment-1314644323

0 commit comments

Comments
 (0)