Skip to content

Commit 0a2b44f

Browse files
committed
docs: update changelog and add removed rules documentation
1 parent 9e6d1f6 commit 0a2b44f

File tree

7 files changed

+149
-94
lines changed

7 files changed

+149
-94
lines changed

CHANGELOG.md

Lines changed: 39 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -10,30 +10,44 @@
1010
- Drop support for ESLint 8, minimum required version is now ESLint 9.3.6
1111
- Drop support for TypeScript 4, minimum required version is now TypeScript 5.9.2
1212

13-
**The following rules have been renamed:**
14-
15-
- `react-x/no-comment-textnodes` -> `react-x/jsx-no-comment-textnodes`
16-
- `react-x/no-nested-components` -> `react-x/no-nested-component-definitions`
17-
- `react-x/prefer-react-namespace-import` -> `react-x/prefer-namespace-import`
18-
19-
**The following rules have been consolidated into new rules:**
20-
21-
- `react-x/jsx-shorthand-boolean` replaces `avoid-shorthand-boolean` and `prefer-shorthand-boolean`
22-
- `react-x/jsx-shorthand-fragment` replaces `avoid-shorthand-fragment` and `prefer-shorthand-fragment`
23-
- `react-hooks-extra/no-direct-set-state-in-use-effect` replaces `no-direct-set-state-in-use-layout-effect`
24-
25-
**The following rules have been moved to new plugins:**
26-
27-
- `react-hooks-extra/no-unnecessary-use-callback` -> `react-x/no-unnecessary-use-callback`
28-
- `react-hooks-extra/no-unnecessary-use-memo` -> `react-x/no-unnecessary-use-memo`
29-
- `react-hooks-extra/no-unnecessary-use-prefix` -> `react-x/no-unnecessary-use-prefix`
30-
- `react-hooks-extra/prefer-use-state-lazy-initialization` -> `react-x/prefer-use-state-lazy-initialization`
31-
32-
**The following settings have been removed from `settings["react-x"]`:**
33-
34-
- `additionalComponents`
35-
- `additionalHooks`
36-
- `skipImportCheck`
13+
**Removed Rules**
14+
15+
| Rule | Replaced by | Removed in | Reason |
16+
| :------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------- | :--------- | :----------- |
17+
| [`react-x/avoid-shorthand-boolean`](/docs/rules/avoid-shorthand-boolean) | [`react-x/jsx-shorthand-boolean`](/docs/rules/jsx-shorthand-boolean) | 2.0.0 | consolidated |
18+
| [`react-x/avoid-shorthand-fragment`](/docs/rules/avoid-shorthand-fragment) | [`react-x/jsx-shorthand-fragment`](/docs/rules/jsx-shorthand-fragment) | 2.0.0 | consolidated |
19+
| [`react-x/ensure-forward-ref-using-ref`](/docs/rules/ensure-forward-ref-using-ref) | [`react-x/no-useless-forward-ref`](/docs/rules/no-useless-forward-ref) | 2.0.0 | relocated |
20+
| [`react-x/jsx-no-duplicate-props`](/docs/rules/jsx-no-duplicate-props) | [`react-x/jsx-no-duplicate-props`](/docs/rules/jsx-no-duplicate-props) | 2.0.0 | renamed |
21+
| [`react-x/no-comment-textnodes`](/docs/rules/no-comment-textnodes) | [`react-x/jsx-no-comment-textnodes`](/docs/rules/jsx-no-comment-textnodes) | 2.0.0 | renamed |
22+
| [`react-x/no-complicated-conditional-rendering`](/docs/rules/no-complicated-conditional-rendering) | | 2.0.0 | discontinued |
23+
| [`react-x/no-nested-components`](/docs/rules/no-nested-components) | [`react-x/no-nested-component-definitions`](/docs/rules/no-nested-component-definitions) | 2.0.0 | renamed |
24+
| [`react-x/prefer-react-namespace-import`](/docs/rules/prefer-react-namespace-import) | [`react-x/prefer-namespace-import`](/docs/rules/prefer-namespace-import) | 2.0.0 | renamed |
25+
| [`react-x/prefer-shorthand-boolean`](/docs/rules/prefer-shorthand-boolean) | [`react-x/jsx-shorthand-boolean`](/docs/rules/jsx-shorthand-boolean) | 2.0.0 | consolidated |
26+
| [`react-x/prefer-shorthand-fragment`](/docs/rules/prefer-shorthand-fragment) | [`react-x/jsx-shorthand-fragment`](/docs/rules/jsx-shorthand-fragment) | 2.0.0 | consolidated |
27+
| [`react-x/use-jsx-vars`](/docs/rules/use-jsx-vars) | [`react-x/jsx-uses-vars`](/docs/rules/jsx-uses-vars) | 2.0.0 | renamed |
28+
| [`react-dom/no-children-in-void-dom-elements`](/docs/rules/dom-no-children-in-void-dom-elements) | [`react-dom/no-void-elements-with-children`](/docs/rules/dom-no-void-elements-with-children) | 2.0.0 | renamed |
29+
| [`react-hooks-extra/no-direct-set-state-in-use-layout-effect`](/docs/rules/hooks-extra-no-direct-set-state-in-use-layout-effect) | [`react-hooks-extra/no-direct-set-state-in-use-effect`](/docs/rules/hooks-extra-no-direct-set-state-in-use-effect) | 2.0.0 | consolidated |
30+
| [`react-hooks-extra/no-unnecessary-use-callback`](/docs/rules/hooks-extra-no-unnecessary-use-callback) | [`react-x/no-unnecessary-use-callback`](/docs/rules/no-unnecessary-use-callback) | 2.0.0 | relocated |
31+
| [`react-hooks-extra/no-unnecessary-use-memo`](/docs/rules/hooks-extra-no-unnecessary-use-memo) | [`react-x/no-unnecessary-use-memo`](/docs/rules/no-unnecessary-use-memo) | 2.0.0 | relocated |
32+
| [`react-hooks-extra/no-unnecessary-use-prefix`](/docs/rules/hooks-extra-no-unnecessary-use-prefix) | [`react-x/no-unnecessary-use-prefix`](/docs/rules/no-unnecessary-use-prefix) | 2.0.0 | relocated |
33+
| [`react-hooks-extra/prefer-use-state-lazy-initialization`](/docs/rules/hooks-extra-prefer-use-state-lazy-initialization) | [`react-x/prefer-use-state-lazy-initialization`](/docs/rules/prefer-use-state-lazy-initialization) | 2.0.0 | relocated |
34+
35+
**Removed Presets**
36+
37+
| Preset | Replaced by | Removed in | Reason |
38+
| :-------- | :------------ | :--------- | :------ |
39+
| `core` | `x` | 2.0.0 | renamed |
40+
| `off-dom` | `disable-dom` | 2.0.0 | renamed |
41+
42+
**Removed Settings**
43+
44+
| Setting | Replaced by | Removed in | Reason |
45+
| :--------------------- | :---------- | :--------- | :----------- |
46+
| `additionalComponents` | | 2.0.0 | discontinued |
47+
| `additionalHooks` | | 2.0.0 | discontinued |
48+
| `skipImportCheck` | | 2.0.0 | discontinued |
49+
50+
The rule implementations have been refactored to improve performance and maintainability.
3751

3852
### ✨ New
3953

@@ -83,8 +97,8 @@ New configuration preset added:
8397

8498
### 🪄 Improvements
8599

100+
- refactor: simplify React APIs detection logic
86101
- refactor: cleanup utilities and simplify rule implementations
87-
- refactor: rework React API detection logic to better align with `eslint-plugin-react-hooks`
88102
- docs: add comparison table between `eslint-plugin-react` and `eslint-react` rules
89103
- docs: replace `tseslint.config` with `defineConfig` in all examples
90104
- build: migrate build system from `tsup` to `tsdown` for better performance

apps/website/content/docs/changelog.md

Lines changed: 39 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -14,30 +14,44 @@ title: Changelog
1414
- Drop support for ESLint 8, minimum required version is now ESLint 9.3.6
1515
- Drop support for TypeScript 4, minimum required version is now TypeScript 5.9.2
1616

17-
**The following rules have been renamed:**
18-
19-
- `react-x/no-comment-textnodes` -> `react-x/jsx-no-comment-textnodes`
20-
- `react-x/no-nested-components` -> `react-x/no-nested-component-definitions`
21-
- `react-x/prefer-react-namespace-import` -> `react-x/prefer-namespace-import`
22-
23-
**The following rules have been consolidated into new rules:**
24-
25-
- `react-x/jsx-shorthand-boolean` replaces `avoid-shorthand-boolean` and `prefer-shorthand-boolean`
26-
- `react-x/jsx-shorthand-fragment` replaces `avoid-shorthand-fragment` and `prefer-shorthand-fragment`
27-
- `react-hooks-extra/no-direct-set-state-in-use-effect` replaces `no-direct-set-state-in-use-layout-effect`
28-
29-
**The following rules have been moved to new plugins:**
30-
31-
- `react-hooks-extra/no-unnecessary-use-callback` -> `react-x/no-unnecessary-use-callback`
32-
- `react-hooks-extra/no-unnecessary-use-memo` -> `react-x/no-unnecessary-use-memo`
33-
- `react-hooks-extra/no-unnecessary-use-prefix` -> `react-x/no-unnecessary-use-prefix`
34-
- `react-hooks-extra/prefer-use-state-lazy-initialization` -> `react-x/prefer-use-state-lazy-initialization`
35-
36-
**The following settings have been removed from `settings["react-x"]`:**
37-
38-
- `additionalComponents`
39-
- `additionalHooks`
40-
- `skipImportCheck`
17+
**Removed Rules**
18+
19+
| Rule | Replaced by | Removed in | Reason |
20+
| :------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------- | :--------- | :----------- |
21+
| [`react-x/avoid-shorthand-boolean`](/docs/rules/avoid-shorthand-boolean) | [`react-x/jsx-shorthand-boolean`](/docs/rules/jsx-shorthand-boolean) | 2.0.0 | consolidated |
22+
| [`react-x/avoid-shorthand-fragment`](/docs/rules/avoid-shorthand-fragment) | [`react-x/jsx-shorthand-fragment`](/docs/rules/jsx-shorthand-fragment) | 2.0.0 | consolidated |
23+
| [`react-x/ensure-forward-ref-using-ref`](/docs/rules/ensure-forward-ref-using-ref) | [`react-x/no-useless-forward-ref`](/docs/rules/no-useless-forward-ref) | 2.0.0 | relocated |
24+
| [`react-x/jsx-no-duplicate-props`](/docs/rules/jsx-no-duplicate-props) | [`react-x/jsx-no-duplicate-props`](/docs/rules/jsx-no-duplicate-props) | 2.0.0 | renamed |
25+
| [`react-x/no-comment-textnodes`](/docs/rules/no-comment-textnodes) | [`react-x/jsx-no-comment-textnodes`](/docs/rules/jsx-no-comment-textnodes) | 2.0.0 | renamed |
26+
| [`react-x/no-complicated-conditional-rendering`](/docs/rules/no-complicated-conditional-rendering) | | 2.0.0 | discontinued |
27+
| [`react-x/no-nested-components`](/docs/rules/no-nested-components) | [`react-x/no-nested-component-definitions`](/docs/rules/no-nested-component-definitions) | 2.0.0 | renamed |
28+
| [`react-x/prefer-react-namespace-import`](/docs/rules/prefer-react-namespace-import) | [`react-x/prefer-namespace-import`](/docs/rules/prefer-namespace-import) | 2.0.0 | renamed |
29+
| [`react-x/prefer-shorthand-boolean`](/docs/rules/prefer-shorthand-boolean) | [`react-x/jsx-shorthand-boolean`](/docs/rules/jsx-shorthand-boolean) | 2.0.0 | consolidated |
30+
| [`react-x/prefer-shorthand-fragment`](/docs/rules/prefer-shorthand-fragment) | [`react-x/jsx-shorthand-fragment`](/docs/rules/jsx-shorthand-fragment) | 2.0.0 | consolidated |
31+
| [`react-x/use-jsx-vars`](/docs/rules/use-jsx-vars) | [`react-x/jsx-uses-vars`](/docs/rules/jsx-uses-vars) | 2.0.0 | renamed |
32+
| [`react-dom/no-children-in-void-dom-elements`](/docs/rules/dom-no-children-in-void-dom-elements) | [`react-dom/no-void-elements-with-children`](/docs/rules/dom-no-void-elements-with-children) | 2.0.0 | renamed |
33+
| [`react-hooks-extra/no-direct-set-state-in-use-layout-effect`](/docs/rules/hooks-extra-no-direct-set-state-in-use-layout-effect) | [`react-hooks-extra/no-direct-set-state-in-use-effect`](/docs/rules/hooks-extra-no-direct-set-state-in-use-effect) | 2.0.0 | consolidated |
34+
| [`react-hooks-extra/no-unnecessary-use-callback`](/docs/rules/hooks-extra-no-unnecessary-use-callback) | [`react-x/no-unnecessary-use-callback`](/docs/rules/no-unnecessary-use-callback) | 2.0.0 | relocated |
35+
| [`react-hooks-extra/no-unnecessary-use-memo`](/docs/rules/hooks-extra-no-unnecessary-use-memo) | [`react-x/no-unnecessary-use-memo`](/docs/rules/no-unnecessary-use-memo) | 2.0.0 | relocated |
36+
| [`react-hooks-extra/no-unnecessary-use-prefix`](/docs/rules/hooks-extra-no-unnecessary-use-prefix) | [`react-x/no-unnecessary-use-prefix`](/docs/rules/no-unnecessary-use-prefix) | 2.0.0 | relocated |
37+
| [`react-hooks-extra/prefer-use-state-lazy-initialization`](/docs/rules/hooks-extra-prefer-use-state-lazy-initialization) | [`react-x/prefer-use-state-lazy-initialization`](/docs/rules/prefer-use-state-lazy-initialization) | 2.0.0 | relocated |
38+
39+
**Removed Presets**
40+
41+
| Preset | Replaced by | Removed in | Reason |
42+
| :-------- | :------------ | :--------- | :------ |
43+
| `core` | `x` | 2.0.0 | renamed |
44+
| `off-dom` | `disable-dom` | 2.0.0 | renamed |
45+
46+
**Removed Settings**
47+
48+
| Setting | Replaced by | Removed in | Reason |
49+
| :--------------------- | :---------- | :--------- | :----------- |
50+
| `additionalComponents` | | 2.0.0 | discontinued |
51+
| `additionalHooks` | | 2.0.0 | discontinued |
52+
| `skipImportCheck` | | 2.0.0 | discontinued |
53+
54+
The rule implementations have been refactored to improve performance and maintainability.
4155

4256
### ✨ New
4357

@@ -87,8 +101,8 @@ New configuration preset added:
87101

88102
### 🪄 Improvements
89103

104+
- refactor: simplify React APIs detection logic
90105
- refactor: cleanup utilities and simplify rule implementations
91-
- refactor: rework React API detection logic to better align with `eslint-plugin-react-hooks`
92106
- docs: add comparison table between `eslint-plugin-react` and `eslint-react` rules
93107
- docs: replace `tseslint.config` with `defineConfig` in all examples
94108
- build: migrate build system from `tsup` to `tsdown` for better performance

apps/website/content/docs/deprecated.md

Lines changed: 0 additions & 29 deletions
This file was deleted.

apps/website/content/docs/presets.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ The following presets are available in `@eslint-react/eslint-plugin`:
4242

4343
## References
4444

45-
- [Deprecated Presets](/docs/deprecated#presets)
45+
- [Removed Presets](/docs/removed#presets)

0 commit comments

Comments
 (0)