@@ -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
0 commit comments