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
_Data collected from GitHub dependents network, if there are any mismatch or outdated information, feel free to [open issue](https://github.com/Rel1cx/eslint-react/issues/new?assignees=&labels=type%3A+documentation&projects=&template=docs_report.md&title=%5Bdocs%5D+) or pull request._
17
-
15
+
_Data collected from GitHub dependents network, if there are any mismatch or outdated information, feel free to [open issue](https://github.com/Rel1cx/eslint-react/issues/new?assignees=\&labels=type%3A+documentation\&projects=\&template=docs_report.md\&title=%5Bdocs%5D+) or pull request._
Copy file name to clipboardExpand all lines: apps/website/content/docs/configuration/using-custom-parsers/ts-blank-eslint-parser.mdx
+5-6Lines changed: 5 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,14 +4,13 @@ description: "Using ts-blank-eslint-parser as an alternative parser for TypeScri
4
4
---
5
5
6
6
<Callouttype="warn">
7
-
The `ts-blank-eslint-parser` is a work in progress and comes with limitations:
7
+
The `ts-blank-eslint-parser` is a work in progress and comes with limitations:
8
8
9
-
- No support for [TypeScript syntax](https://github.com/bloomberg/ts-blank-space/blob/main/docs/unsupported_syntax.md) that need transformation like enums, namespaces, decorators
10
-
- No support for rules that require type information
11
-
- No fixable support for types (the types will also be stripped out in the fix output)
12
-
13
-
Use it only if you are okay with the limitations.
9
+
- No support for [TypeScript syntax](https://github.com/bloomberg/ts-blank-space/blob/main/docs/unsupported_syntax.md) that need transformation like enums, namespaces, decorators
10
+
- No support for rules that require type information
11
+
- No fixable support for types (the types will also be stripped out in the fix output)
**ESLint React addresses critical gaps of the existing `eslint-plugin-react` in modern React ecosystems**. While named "react", the current plugin implementation specifically targets React DOM and maintains DOM-centric assumptions, creating friction when used with alternative renderers like React Native, React Three Fiber, or custom renderers.
8
10
9
-
<Accordiontitle="Why?">
11
+
Our solution treating DOM as one of many supported targets rather than the default assumption. This paradigm shift enables:
10
12
11
-
**ESLint React addresses critical gaps of the existing `eslint-plugin-react` in modern React ecosystems**. While named "react", the current plugin implementation specifically targets React DOM and maintains DOM-centric assumptions, creating friction when used with alternative renderers like React Native, React Three Fiber, or custom renderers.
13
+
-**Context-aware linting**: Adapting to different runtime environments
14
+
-**Future-proof architecture**: Compatibility with emerging React platforms
15
+
-**Unified code quality standards**: Consistent linting across diverse projects
16
+
</Accordion>
12
17
13
-
Our solution treating DOM as one of many supported targets rather than the default assumption. This paradigm shift enables:
18
+
<Accordiontitle="What's included?">
19
+
Currently, it includes the following:
14
20
15
-
-**Context-aware linting**: Adapting to different runtime environments
16
-
-**Future-proof architecture**: Compatibility with emerging React platforms
17
-
-**Unified code quality standards**: Consistent linting across diverse projects
21
+
**Internal Packages**
18
22
19
-
</Accordion>
23
+
-**Utility Modules**
24
+
-`@eslint-react/eff`: JavaScript and TypeScript utilities (previously some re-exports of the `effect` library).
-[`eslint-plugin-react-dom`](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) - React DOM rules.
37
+
-[`eslint-plugin-react-web-api`](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-web-api) - Web API interaction 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.
40
+
-[`@eslint-react/eslint-plugin`](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin) - A unified plugin that combines all individual plugins into one.
24
41
25
-
**Internal Packages**
42
+
**Website & Playground**
26
43
27
-
-**Utility Modules**
28
-
-`@eslint-react/eff`: JavaScript and TypeScript utilities (previously some re-exports of the `effect` library).
-[`eslint-plugin-react-dom`](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) - React DOM rules.
41
-
-[`eslint-plugin-react-web-api`](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-web-api) - Web API interaction 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.
44
-
-[`@eslint-react/eslint-plugin`](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin) - A unified plugin that combines all individual plugins into one.
50
+
<Accordiontitle="Why isn't there a 'jsx-runtime' preset?">
51
+
ESLint React automatically detects your JSX runtime type from the compiler options in your `tsconfig.json` or `jsconfig.json` file, as well as from JSX pragma comments (e.g., `/** @jsxRuntime automatic */`) in each file. This means you don't need to set a preset for the JSX runtime.
45
52
46
-
**Website & Playground**
53
+
For more information, see the [JSX Transform](/docs/configuration/configure-project-config#jsx-transform) section on the [Configure Project Config](/docs/configuration/configure-project-config) page.
54
+
</Accordion>
47
55
48
-
-`website`: This documentation website.
49
-
-`playground`: The playground for ESLint React (WIP).
56
+
<Accordiontitle="Is there anything to note about migrating from 'eslint-plugin-react'?">
57
+
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`.
50
58
51
-
You can view our long-term plans on the [roadmap](/roadmap#plugins-with-ecological-niche-explanation).
52
-
53
-
</Accordion>
54
-
55
-
<Accordiontitle="Why isn't there a 'jsx-runtime' preset?">
56
-
57
-
ESLint React automatically detects your JSX runtime type from the compiler options in your `tsconfig.json` or `jsconfig.json` file, as well as from JSX pragma comments (e.g., `/** @jsxRuntime automatic */`) in each file. This means you don't need to set a preset for the JSX runtime.
58
-
59
-
For more information, see the [JSX Transform](/docs/configuration/configure-project-config#jsx-transform) section on the [Configure Project Config](/docs/configuration/configure-project-config) page.
60
-
61
-
</Accordion>
62
-
63
-
<Accordiontitle="Is there anything to note about migrating from 'eslint-plugin-react'?">
64
-
65
-
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`.
66
-
67
-
For a comprehensive migration guide with a complete rule comparison table, see our [Migration Guide](/docs/migration). This guide covers all rules from `eslint-plugin-react`, their ESLint React equivalents, missing functionality, and migration tips.
68
-
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.
70
-
71
-
</Accordion>
59
+
For a comprehensive migration guide with a complete rule comparison table, see our [Migration Guide](/docs/migration). This guide covers all rules from `eslint-plugin-react`, their ESLint React equivalents, missing functionality, and migration tips.
72
60
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.
Once you've correctly configured the project for the files to be linted, ESLint React utilizes the information from the TypeScript compiler to provide better linting results.
104
-
105
-
For more information, see the [Configure Project Config](/docs/configuration/configure-project-config) section.
106
-
107
-
</Callout>
89
+
"include": ["**/*.js", "**/*.jsx"]
90
+
}
91
+
```
108
92
109
-
</Step>
93
+
<Callouttitle="TIP">
94
+
Once you've correctly configured the project for the files to be linted, ESLint React utilizes the information from the TypeScript compiler to provide better linting results.
110
95
96
+
For more information, see the [Configure Project Config](/docs/configuration/configure-project-config) section.
0 commit comments