eslint-plugin-react-x 2.8.3 โ 2.8.4-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -79
- package/dist/index.js +1 -1
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -36,85 +36,6 @@ export default defineConfig(
|
|
|
36
36
|
);
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
-
## JSX Rules
|
|
40
|
-
|
|
41
|
-
> [!NOTE]
|
|
42
|
-
> The `jsx-*` rules check for issues exclusive to JSX syntax, which are absent from standard JavaScript (like handwritten `createElement()` calls).
|
|
43
|
-
|
|
44
|
-
**Key Rules:**
|
|
45
|
-
|
|
46
|
-
- `jsx-dollar` - Prevents unnecessary `$` symbols before `JSX` expressions
|
|
47
|
-
- `jsx-key-before-spread` - Enforces `key` prop placement before spread operators
|
|
48
|
-
- `jsx-no-comment-textnodes` - Prevents comment strings (e.g., beginning with `//` or `/*`) from being accidentally inserted into a JSX element's text nodes
|
|
49
|
-
- `jsx-no-duplicate-props` - Disallows duplicate `props` in elements
|
|
50
|
-
- `jsx-no-iife` - Disallows immediately-invoked function expressions in `JSX`
|
|
51
|
-
- `jsx-no-undef` - Disallows undefined variables in `JSX` elements
|
|
52
|
-
- `jsx-shorthand-boolean` - Enforces shorthand for boolean attributes (๐ง Fixable, โ๏ธ Configurable)
|
|
53
|
-
- `jsx-shorthand-fragment` - Enforces `<>` over `<React.Fragment>` (๐ง Fixable, โ๏ธ Configurable)
|
|
54
|
-
- `jsx-uses-react` - Marks `React` as used when `JSX` is present
|
|
55
|
-
- `jsx-uses-vars` - Marks `JSX` element variables as used
|
|
56
|
-
|
|
57
|
-
## Component Rules
|
|
58
|
-
|
|
59
|
-
> [!NOTE]
|
|
60
|
-
> Component rules enforce best practices and prevent common mistakes in `React` component definitions, covering both class and function components.
|
|
61
|
-
|
|
62
|
-
**Key Rule Groups:**
|
|
63
|
-
|
|
64
|
-
**Lifecycle & Deprecated APIs:**
|
|
65
|
-
|
|
66
|
-
- `no-component-will-mount` - Replaces `componentWillMount` with `UNSAFE_componentWillMount` (๐ Codemod, `React` >=16.3.0)
|
|
67
|
-
- `no-component-will-receive-props` - Replaces `componentWillReceiveProps` with `UNSAFE_componentWillReceiveProps` (๐ Codemod)
|
|
68
|
-
- `no-component-will-update` - Replaces `componentWillUpdate` with `UNSAFE_componentWillUpdate` (๐ Codemod)
|
|
69
|
-
- `no-unsafe-component-will-mount` - Warns about `UNSAFE_componentWillMount` usage
|
|
70
|
-
- `no-unsafe-component-will-receive-props` - Warns about `UNSAFE_componentWillReceiveProps` usage
|
|
71
|
-
- `no-unsafe-component-will-update` - Warns about `UNSAFE_componentWillUpdate` usage
|
|
72
|
-
|
|
73
|
-
**React 19 Migrations:**
|
|
74
|
-
|
|
75
|
-
- `no-context-provider` - Replaces `<Context.Provider>` with `<Context>` (๐ Codemod, `React` >=19.0.0)
|
|
76
|
-
- `no-forward-ref` - Replaces `forwardRef` with `ref` as prop (๐ Codemod, `React` >=19.0.0)
|
|
77
|
-
- `no-use-context` - Replaces `useContext` with `use` (๐ Codemod, `React` >=19.0.0)
|
|
78
|
-
|
|
79
|
-
**Component Structure:**
|
|
80
|
-
|
|
81
|
-
- `no-nested-component-definitions` - Prevents defining components inside other components
|
|
82
|
-
- `no-nested-lazy-component-declarations` - Prevents lazy component declarations inside components
|
|
83
|
-
- `no-class-component` - Disallows class components except error boundaries
|
|
84
|
-
|
|
85
|
-
**State Management:**
|
|
86
|
-
|
|
87
|
-
- `no-access-state-in-setstate` - Prevents `this.state` access inside `setState` calls
|
|
88
|
-
- `no-direct-mutation-state` - Prevents direct `this.state` mutation
|
|
89
|
-
- `no-set-state-in-component-did-mount` - Restricts `setState` in `componentDidMount`
|
|
90
|
-
- `no-set-state-in-component-did-update` - Restricts `setState` in `componentDidUpdate`
|
|
91
|
-
- `no-set-state-in-component-will-update` - Restricts `setState` in `componentWillUpdate`
|
|
92
|
-
|
|
93
|
-
**Props & Keys:**
|
|
94
|
-
|
|
95
|
-
- `no-missing-key` - Requires `key` prop in list renderings
|
|
96
|
-
- `no-duplicate-key` - Prevents duplicate `key` values
|
|
97
|
-
- `no-implicit-key` - Prevents implicit `key` spreading (๐งช Experimental)
|
|
98
|
-
- `no-unnecessary-key` - Prevents `key` on non-list elements (๐งช Experimental)
|
|
99
|
-
- `no-array-index-key` - Warns against using array indices as `keys`
|
|
100
|
-
|
|
101
|
-
**Children API:**
|
|
102
|
-
|
|
103
|
-
- `no-children-count` - Disallows `Children.count`
|
|
104
|
-
- `no-children-for-each` - Disallows `Children.forEach`
|
|
105
|
-
- `no-children-map` - Disallows `Children.map`
|
|
106
|
-
- `no-children-only` - Disallows `Children.only`
|
|
107
|
-
- `no-children-to-array` - Disallows `Children.toArray`
|
|
108
|
-
- `no-children-prop` - Disallows passing `children` as prop
|
|
109
|
-
|
|
110
|
-
**Performance & Optimization:**
|
|
111
|
-
|
|
112
|
-
- `no-unstable-context-value` - Prevents unstable values in `Context.Provider`
|
|
113
|
-
- `no-unstable-default-props` - Prevents referential values as default `props`
|
|
114
|
-
- `no-unnecessary-use-callback` - Warns about unnecessary `useCallback` usage (๐งช Experimental)
|
|
115
|
-
- `no-unnecessary-use-memo` - Warns about unnecessary `useMemo` usage (๐งช Experimental)
|
|
116
|
-
- `prefer-use-state-lazy-initialization` - Enforces lazy initialization in `useState`
|
|
117
|
-
|
|
118
39
|
## Rules
|
|
119
40
|
|
|
120
41
|
<https://eslint-react.xyz/docs/rules/overview#core-rules>
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-x",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.4-beta.0",
|
|
4
4
|
"description": "A set of composable ESLint rules for for libraries and frameworks that use React as a UI runtime.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -45,11 +45,11 @@
|
|
|
45
45
|
"is-immutable-type": "^5.0.1",
|
|
46
46
|
"ts-api-utils": "^2.4.0",
|
|
47
47
|
"ts-pattern": "^5.9.0",
|
|
48
|
-
"@eslint-react/ast": "2.8.
|
|
49
|
-
"@eslint-react/core": "2.8.
|
|
50
|
-
"@eslint-react/
|
|
51
|
-
"@eslint-react/
|
|
52
|
-
"@eslint-react/var": "2.8.
|
|
48
|
+
"@eslint-react/ast": "2.8.4-beta.0",
|
|
49
|
+
"@eslint-react/core": "2.8.4-beta.0",
|
|
50
|
+
"@eslint-react/shared": "2.8.4-beta.0",
|
|
51
|
+
"@eslint-react/eff": "2.8.4-beta.0",
|
|
52
|
+
"@eslint-react/var": "2.8.4-beta.0"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@types/react": "^19.2.10",
|