Skip to content

Commit f28987f

Browse files
committed
refactor(docs): streamline presets documentation and remove deprecated sections
1 parent ac2bf2d commit f28987f

File tree

1 file changed

+30
-85
lines changed

1 file changed

+30
-85
lines changed

website/content/docs/presets.mdx

Lines changed: 30 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -2,100 +2,45 @@
22
title: Presets
33
---
44

5-
import { Tab, Tabs } from 'fumadocs-ui/components/tabs';
6-
75
The following presets are available in `@eslint-react/eslint-plugin`:
86

9-
<Tabs items={["Flat Config", "Legacy Config"]}>
10-
11-
<Tab value="Flat Config">
12-
13-
<Callout type="info">These presets are for ESLint Flat Config (`eslint.config.js`) only.</Callout>
14-
15-
## Bare Bones
16-
17-
- **Core** (`core`)\
18-
Enable rules for `"react"`.
19-
- **DOM** (`dom`)\
20-
Enable rules for `"react-dom"`.
21-
- **Web API** (`web-api`)\
22-
Enable rules for interacting with Web APIs.
23-
24-
## General Purpose
25-
26-
- **Recommended** (`recommended`)\
27-
Enforce rules that are recommended by ESLint React for general purpose React + React DOM projects.\
28-
_This preset includes the `core`, `dom`, and `web-api` presets._
29-
30-
## TypeScript Specialized
31-
32-
- **Recommended TypeScript** (`recommended-typescript`)\
33-
Same as the `recommended` preset but disables rules that can be enforced by TypeScript.
34-
35-
- **Recommended Type-Checked** (`recommended-type-checked`)\
36-
Same as the `recommended-typescript` preset but enables additional rules that require type information.
37-
38-
## Other
39-
- **Disable DOM** (`disable-dom`)\
40-
Disable rules in the `dom` preset.
41-
- **Disable Web API** (`disable-web-api`)\
42-
Disable rules in the `web-api` preset.
43-
- **Disable Type-Checked** (`disable-type-checked`)\
44-
Disable rules that require type information.
45-
- **Off** (`off`)\
46-
Disable all rules in this plugin except for debug rules.
47-
48-
## Deprecated
49-
50-
| Preset | Replaced by |
51-
| :------------------- | :-------------------------- |
52-
| Off DOM (`off-dom`) | Disable DOM (`disable-dom`) |
53-
54-
</Tab>
55-
56-
<Tab value="Legacy Config">
57-
58-
<Callout type="warn">These presets are for ESLint Legacy Config (`.eslintrc.*`) only. The Legacy Config is deprecated and not enabled by default in ESLint >= 9.0.0.</Callout>
59-
60-
## Bare Bones
61-
62-
- **Core** (`core-legacy`)\
63-
Enable rules for `"react"`.
64-
- **DOM** (`dom-legacy`)\
65-
Enable rules for `"react-dom"`.
66-
- **Web API** (`web-api-legacy`)\
67-
Enable rules for interacting with Web APIs.
7+
<Callout type="info">For ESLint Legacy Config (`.eslintrc.*`), add a `-legacy` suffix to the preset name (e.g. `recommended-legacy`).</Callout>
688

69-
## General Purpose
9+
## Bare Bones
7010

71-
- **Recommended** (`recommended-legacy`)\
72-
Enforce rules that are recommended by ESLint React for general purpose React + React DOM projects.\
73-
_This preset includes the `core`, `dom`, and `web-api` presets._
11+
- **Core** (`core`)\
12+
Enable rules for `"react"`.
13+
- **DOM** (`dom`)\
14+
Enable rules for `"react-dom"`.
15+
- **Web API** (`web-api`)\
16+
Enable rules for interacting with Web APIs.
7417

75-
## TypeScript Specialized
18+
## General Purpose
7619

77-
- **Recommended TypeScript** (`recommended-typescript-legacy`)\
78-
Same as the `recommended` preset but disables rules that can be enforced by TypeScript.
20+
- **Recommended** (`recommended`)\
21+
Enforce rules that are recommended by ESLint React for general purpose React + React DOM projects.\
22+
_This preset includes the `core`, `dom`, and `web-api` presets._
7923

80-
- **Recommended Type-Checked** (`recommended-type-checked-legacy`)\
81-
Same as the `recommended-typescript` preset but enables additional rules that require type information.
24+
## TypeScript Specialized
8225

83-
## Other
84-
- **Disable DOM** (`disable-dom-legacy`)\
85-
Disable rules in the `dom` preset.
86-
- **Disable Web API** (`disable-web-api-legacy`)\
87-
Disable rules in the `web-api` preset.
88-
- **Disable Type-Checked** (`disable-type-checked-legacy`)\
89-
Disable rules that require type information.
90-
- **Off** (`off-legacy`)\
91-
Disable all rules in this plugin except for debug rules.
26+
- **Recommended TypeScript** (`recommended-typescript`)\
27+
Same as the `recommended` preset but disables rules that can be enforced by TypeScript.
9228

93-
## Deprecated
29+
- **Recommended Type-Checked** (`recommended-type-checked`)\
30+
Same as the `recommended-typescript` preset but enables additional rules that require type information.
9431

95-
| Preset | Replaced by |
96-
| :------------------------- | :--------------------------------- |
97-
| Off DOM (`off-dom-legacy`) | Disable DOM (`disable-dom-legacy`) |
32+
## Other
33+
- **Disable DOM** (`disable-dom`)\
34+
Disable rules in the `dom` preset.
35+
- **Disable Web API** (`disable-web-api`)\
36+
Disable rules in the `web-api` preset.
37+
- **Disable Type-Checked** (`disable-type-checked`)\
38+
Disable rules that require type information.
39+
- **Off** (`off`)\
40+
Disable all rules in this plugin except for debug rules.
9841

99-
</Tab>
42+
## Deprecated
10043

101-
</Tabs>
44+
| Preset | Replaced by |
45+
| :------------------- | :-------------------------- |
46+
| Off DOM (`off-dom`) | Disable DOM (`disable-dom`) |

0 commit comments

Comments
 (0)