Skip to content

Commit ac68227

Browse files
committed
docs: update ESLint React FAQ and fix capitalization
1 parent 4cc1c85 commit ac68227

File tree

2 files changed

+23
-15
lines changed

2 files changed

+23
-15
lines changed

apps/website/content/docs/faq.mdx

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

77
<Accordions>
88

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

1111
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.
1212

1313
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[³].
1414

1515
Unfortunately, the maintainers of `eslint-plugin-react` refuse to change that[].
1616

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.
1818

1919
</Accordion>
2020

21-
<Accordion title="What is included in eslint-react?">
21+
<Accordion title='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+
<Accordion title="What is included in ESLint React?">
2230

2331
Currently, it includes the following:
2432

@@ -29,21 +37,21 @@ Currently, it includes the following:
2937
- `packages/utilities/ast`: TSESTree AST utility module.
3038
- `packages/utilities/var`: TSESTree AST utility module for static analysis of variables.
3139
- `packages/utilities/jsx`: TSESTree AST utility module for static analysis of JSX.
32-
- `packages/utilities/kit`: ESLint React's Plugin Kit for building plugins and rules.
40+
- `packages/utilities/kit`: ESLint React's plugin kit for building plugins and rules.
3341
- **Core & Shared Modules**
3442
- `packages/core`: Utility module for static analysis of React core APIs and patterns.
3543
- `packages/shared`: Shared constants, types and functions.
3644

3745
**Public Packages**
3846

3947
- **ESLint Plugins**
40-
- [`eslint-plugin-react-x`](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) - Core React rules.
41-
- [`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.
44-
- [`eslint-plugin-react-naming-convention`](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-naming-convention) - Naming convention rules.
45-
- [`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.
48+
- [`eslint-plugin-react-x`](https://github.com/Rel1cx/ESLint React/tree/main/packages/plugins/eslint-plugin-react-x) - Core React rules.
49+
- [`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.
52+
- [`eslint-plugin-react-naming-convention`](https://github.com/Rel1cx/ESLint React/tree/main/packages/plugins/eslint-plugin-react-naming-convention) - Naming convention rules.
53+
- [`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.
4755

4856
**Website & Playground**
4957

@@ -54,11 +62,11 @@ You can view our long-term plans on the [roadmap](/roadmap#plugins-with-ecologic
5462

5563
</Accordion>
5664

57-
<Accordion title="Is there anything to note about migrating from eslint-plugin-react to eslint-react?">
65+
<Accordion title="Is there anything to note about migrating from eslint-plugin-react to ESLint React?">
5866

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`.
6068

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.
6270

6371
</Accordion>
6472

packages/utilities/kit/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@eslint-react/kit",
33
"version": "1.40.0",
4-
"description": "ESLint React's Plugin Kit for building plugins and rules.",
4+
"description": "ESLint React's plugin kit for building plugins and rules.",
55
"homepage": "https://github.com/Rel1cx/eslint-react",
66
"bugs": {
77
"url": "https://github.com/Rel1cx/eslint-react/issues"

0 commit comments

Comments
 (0)