@@ -14,34 +14,56 @@ 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 `
41-
42- ### ✨ New
43-
44- Added the following new rules:
17+ ** Removed Rules**
18+
19+ | Rule | Replaced by | Reason |
20+ | :------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------- | :----------- |
21+ | [ ` react-x/avoid-shorthand-boolean ` ] ( /docs/rules/avoid-shorthand-boolean ) | [ ` react-x/jsx-shorthand-boolean ` ] ( /docs/rules/jsx-shorthand-boolean ) | consolidated |
22+ | [ ` react-x/avoid-shorthand-fragment ` ] ( /docs/rules/avoid-shorthand-fragment ) | [ ` react-x/jsx-shorthand-fragment ` ] ( /docs/rules/jsx-shorthand-fragment ) | 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 ) | renamed |
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 ) | renamed |
25+ | [ ` react-x/no-comment-textnodes ` ] ( /docs/rules/no-comment-textnodes ) | [ ` react-x/jsx-no-comment-textnodes ` ] ( /docs/rules/jsx-no-comment-textnodes ) | renamed |
26+ | [ ` react-x/no-complicated-conditional-rendering ` ] ( /docs/rules/no-complicated-conditional-rendering ) | | discontinued |
27+ | [ ` react-x/no-nested-components ` ] ( /docs/rules/no-nested-components ) | [ ` react-x/no-nested-component-definitions ` ] ( /docs/rules/no-nested-component-definitions ) | renamed |
28+ | [ ` react-x/prefer-react-namespace-import ` ] ( /docs/rules/prefer-react-namespace-import ) | [ ` react-x/prefer-namespace-import ` ] ( /docs/rules/prefer-namespace-import ) | renamed |
29+ | [ ` react-x/prefer-shorthand-boolean ` ] ( /docs/rules/prefer-shorthand-boolean ) | [ ` react-x/jsx-shorthand-boolean ` ] ( /docs/rules/jsx-shorthand-boolean ) | consolidated |
30+ | [ ` react-x/prefer-shorthand-fragment ` ] ( /docs/rules/prefer-shorthand-fragment ) | [ ` react-x/jsx-shorthand-fragment ` ] ( /docs/rules/jsx-shorthand-fragment ) | consolidated |
31+ | [ ` react-x/use-jsx-vars ` ] ( /docs/rules/use-jsx-vars ) | [ ` react-x/jsx-uses-vars ` ] ( /docs/rules/jsx-uses-vars ) | 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 ) | 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 ) | 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 ) | 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 ) | 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 ) | 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 ) | relocated |
38+
39+ ** Removed Presets**
40+
41+ | Preset | Replaced by | Reason |
42+ | :-------------------------------- | :------------ | :----------- |
43+ | ` core ` | ` x ` | renamed |
44+ | ` core-legacy ` | | discontinued |
45+ | ` off-dom ` | ` disable-dom ` | renamed |
46+ | ` off-dom-legacy ` | | discontinued |
47+ | ` x-legacy ` | | discontinued |
48+ | ` dom-legacy ` | | discontinued |
49+ | ` web-api-legacy ` | | discontinued |
50+ | ` recommended-legacy ` | | discontinued |
51+ | ` recommended-typescript-legacy ` | | discontinued |
52+ | ` recommended-type-checked-legacy ` | | discontinued |
53+
54+ ** Removed Settings**
55+
56+ | Setting | Replaced by | Reason |
57+ | :--------------------- | :---------- | :----------- |
58+ | ` additionalComponents ` | | discontinued |
59+ | ` additionalHooks ` | | discontinued |
60+ | ` skipImportCheck ` | | discontinued |
61+
62+ The rule implementations have been refactored to improve performance and maintainability.
63+
64+ ### ✨ New
65+
66+ ** Added the following new rules:**
4567
4668- ` react-x/jsx-shorthand-boolean ` : Enforces a consistent style for boolean attributes
4769- ` react-x/jsx-shorthand-fragment ` : Enforces a consistent style for React Fragments
@@ -51,11 +73,11 @@ Added the following new rules:
5173- ` react-dom/no-string-style-prop ` : Disallows string values for the ` style ` prop
5274- ` react-dom/prefer-namespace-import ` : Enforces using a namespace import for ` react-dom `
5375
54- Added the following new rule to the ` recommended-type-checked ` preset:
76+ ** Added the following new rule to the ` recommended-type-checked ` preset:**
5577
5678- ` react-x/no-unused-props ` : Reports unused props in components
5779
58- The following rules now support Codemod features:
80+ ** The following rules now support Codemod features:**
5981
6082- ` react-x/no-component-did-update `
6183- ` react-x/no-component-will-receive-props `
@@ -64,18 +86,18 @@ The following rules now support Codemod features:
6486- ` react-x/no-forward-ref `
6587- ` react-x/no-string-refs `
6688
67- The following rules now support auto-fix:
89+ ** The following rules now support auto-fix:**
6890
6991- ` react-x/prefer-namespace-import `
7092- ` react-dom/prefer-namespace-import `
7193
72- The following rules now support suggestion fixes:
94+ ** The following rules now support suggestion fixes:**
7395
7496- ` react-dom/no-missing-button-type `
7597- ` react-dom/no-missing-iframe-sandbox `
7698- ` react-dom/no-unsafe-target-blank `
7799
78- New configuration preset added:
100+ ** New configuration preset added:**
79101
80102- ` disable-conflict-eslint-plugin-react ` : Disable rules in ` eslint-plugin-react ` that conflict with rules in our plugins
81103
@@ -87,8 +109,8 @@ New configuration preset added:
87109
88110### 🪄 Improvements
89111
112+ - refactor: simplify React APIs detection logic
90113- refactor: cleanup utilities and simplify rule implementations
91- - refactor: rework React API detection logic to better align with ` eslint-plugin-react-hooks `
92114- docs: add comparison table between ` eslint-plugin-react ` and ` eslint-react ` rules
93115- docs: replace ` tseslint.config ` with ` defineConfig ` in all examples
94116- build: migrate build system from ` tsup ` to ` tsdown ` for better performance
0 commit comments