eslint-plugin-react-x 1.19.0 → 1.20.0-beta.2
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 +50 -50
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +11 -11
package/README.md
CHANGED
|
@@ -73,53 +73,53 @@ export default [
|
|
|
73
73
|
|
|
74
74
|
## Rules
|
|
75
75
|
|
|
76
|
-
| Rule | Description |
|
|
77
|
-
| :--------------------------------------- | :--------------------------------------------------------------------------------------------------- | :-: | :-: |
|
|
78
|
-
| `ensure-forward-ref-using-ref` | Requires that components wrapped with `forwardRef` must have a `ref` parameter. |
|
|
79
|
-
| `jsx-no-duplicate-props` | Prevents duplicate props in JSX. |
|
|
80
|
-
| `jsx-uses-vars` | Prevents variables used in JSX to be marked as unused. |
|
|
81
|
-
| `no-access-state-in-setstate` | Prevents accessing `this.state` inside `setState` calls. |
|
|
82
|
-
| `no-array-index-key` | Prevents using array `index` as `key`. |
|
|
83
|
-
| `no-children-count` | Prevents using `Children.count`. |
|
|
84
|
-
| `no-children-for-each` | Prevents using `Children.forEach`. |
|
|
85
|
-
| `no-children-map` | Prevents using `Children.map`. |
|
|
86
|
-
| `no-children-only` | Prevents using `Children.only`. |
|
|
87
|
-
| `no-children-prop` | Prevents using `children` as a prop. |
|
|
88
|
-
| `no-children-to-array` | Prevents using `Children.toArray`. |
|
|
89
|
-
| `no-class-component` | Prevents using class component. |
|
|
90
|
-
| `no-clone-element` | Prevents using `cloneElement`. |
|
|
91
|
-
| `no-comment-textnodes` | Prevents comments from being inserted as text nodes. |
|
|
92
|
-
| `no-complex-conditional-rendering` | Prevents complex conditional rendering in JSX. |
|
|
93
|
-
| `no-component-will-mount` | Prevents using `componentWillMount`. |
|
|
94
|
-
| `no-component-will-receive-props` | Prevents using `componentWillReceiveProps`. |
|
|
95
|
-
| `no-component-will-update` | Prevents using `componentWillUpdate`. |
|
|
96
|
-
| `no-context-provider` | Prevents using
|
|
97
|
-
| `no-create-ref` | Prevents using `createRef`. |
|
|
98
|
-
| `no-default-props` | Prevents using `defaultProps` property in favor of ES6 default parameters. |
|
|
99
|
-
| `no-direct-mutation-state` | Prevents direct mutation of `this.state`. |
|
|
100
|
-
| `no-duplicate-key` | Prevents duplicate `key` on elements in the same array or a list of `children`. |
|
|
101
|
-
| `no-forward-ref` | Prevents using `forwardRef`. |
|
|
102
|
-
| `no-implicit-key` | Prevents `key` from not being explicitly specified (e.g. spreading `key` from objects). |
|
|
103
|
-
| `no-leaked-conditional-rendering` | Prevents problematic leaked values from being rendered. |
|
|
104
|
-
| `no-missing-component-display-name` | Enforces that all components have a `displayName` which can be used in devtools. |
|
|
105
|
-
| `no-missing-key` | Prevents missing `key` on items in list rendering. |
|
|
106
|
-
| `no-nested-components` | Prevents nesting component definitions inside other components. |
|
|
107
|
-
| `no-prop-types` | Prevents using `propTypes` in favor of TypeScript or another type-checking solution. |
|
|
108
|
-
| `no-redundant-should-component-update` | Prevents using `shouldComponentUpdate` when extending `React.PureComponent`. |
|
|
109
|
-
| `no-set-state-in-component-did-mount` | Prevents calling `this.setState` in `componentDidMount` outside of functions, such as callbacks. |
|
|
110
|
-
| `no-set-state-in-component-did-update` | Prevents calling `this.setState` in `componentDidUpdate` outside of functions, such as callbacks. |
|
|
111
|
-
| `no-set-state-in-component-will-update` | Prevents calling `this.setState` in `componentWillUpdate` outside of functions, such as callbacks. |
|
|
112
|
-
| `no-string-refs` | Prevents using deprecated string `refs`. |
|
|
113
|
-
| `no-unsafe-component-will-mount` | Warns the usage of `UNSAFE_componentWillMount` in class components. |
|
|
114
|
-
| `no-unsafe-component-will-receive-props` | Warns the usage of `UNSAFE_componentWillReceiveProps` in class components. |
|
|
115
|
-
| `no-unsafe-component-will-update` | Warns the usage of `UNSAFE_componentWillUpdate` in class components. |
|
|
116
|
-
| `no-unstable-context-value` | Prevents non-stable values (i.e. object literals) from being used as a value for `Context.Provider`. |
|
|
117
|
-
| `no-unstable-default-props` | Prevents using referential-type values as default props in object destructuring. |
|
|
118
|
-
| `no-unused-class-component-members` | Warns unused class component methods and properties. |
|
|
119
|
-
| `no-unused-state` | Warns unused class component state. |
|
|
120
|
-
| `no-useless-fragment` | Prevents using useless `fragment` components or `<>` syntax. |
|
|
121
|
-
| `prefer-destructuring-assignment` | Enforces using destructuring assignment over property assignment. |
|
|
122
|
-
| `prefer-react-namespace-import` | Enforces using `React` namespace import over default import. |
|
|
123
|
-
| `prefer-read-only-props` | Enforce read-only props in components. |
|
|
124
|
-
| `prefer-shorthand-boolean` | Enforces using shorthand syntax for boolean attributes. |
|
|
125
|
-
| `prefer-shorthand-fragment` | Enforces using shorthand syntax for fragments. |
|
|
76
|
+
| Rule | Description | 💭 | |
|
|
77
|
+
| :--------------------------------------- | :--------------------------------------------------------------------------------------------------- | :-: | :-: |
|
|
78
|
+
| `ensure-forward-ref-using-ref` | Requires that components wrapped with `forwardRef` must have a `ref` parameter. | | |
|
|
79
|
+
| `jsx-no-duplicate-props` | Prevents duplicate props in JSX. | | |
|
|
80
|
+
| `jsx-uses-vars` | Prevents variables used in JSX to be marked as unused. | | |
|
|
81
|
+
| `no-access-state-in-setstate` | Prevents accessing `this.state` inside `setState` calls. | | |
|
|
82
|
+
| `no-array-index-key` | Prevents using array `index` as `key`. | | |
|
|
83
|
+
| `no-children-count` | Prevents using `Children.count`. | | |
|
|
84
|
+
| `no-children-for-each` | Prevents using `Children.forEach`. | | |
|
|
85
|
+
| `no-children-map` | Prevents using `Children.map`. | | |
|
|
86
|
+
| `no-children-only` | Prevents using `Children.only`. | | |
|
|
87
|
+
| `no-children-prop` | Prevents using `children` as a prop. | | |
|
|
88
|
+
| `no-children-to-array` | Prevents using `Children.toArray`. | | |
|
|
89
|
+
| `no-class-component` | Prevents using class component. | | |
|
|
90
|
+
| `no-clone-element` | Prevents using `cloneElement`. | | |
|
|
91
|
+
| `no-comment-textnodes` | Prevents comments from being inserted as text nodes. | | |
|
|
92
|
+
| `no-complex-conditional-rendering` | Prevents complex conditional rendering in JSX. | | |
|
|
93
|
+
| `no-component-will-mount` | Prevents using `componentWillMount`. | | |
|
|
94
|
+
| `no-component-will-receive-props` | Prevents using `componentWillReceiveProps`. | | |
|
|
95
|
+
| `no-component-will-update` | Prevents using `componentWillUpdate`. | | |
|
|
96
|
+
| `no-context-provider` | Prevents using `<Context.Provider>`. | | 🔧 |
|
|
97
|
+
| `no-create-ref` | Prevents using `createRef`. | | |
|
|
98
|
+
| `no-default-props` | Prevents using `defaultProps` property in favor of ES6 default parameters. | | |
|
|
99
|
+
| `no-direct-mutation-state` | Prevents direct mutation of `this.state`. | | |
|
|
100
|
+
| `no-duplicate-key` | Prevents duplicate `key` on elements in the same array or a list of `children`. | | |
|
|
101
|
+
| `no-forward-ref` | Prevents using `forwardRef`. | | 🔧 |
|
|
102
|
+
| `no-implicit-key` | Prevents `key` from not being explicitly specified (e.g. spreading `key` from objects). | | |
|
|
103
|
+
| `no-leaked-conditional-rendering` | Prevents problematic leaked values from being rendered. | 💭 | |
|
|
104
|
+
| `no-missing-component-display-name` | Enforces that all components have a `displayName` which can be used in devtools. | | |
|
|
105
|
+
| `no-missing-key` | Prevents missing `key` on items in list rendering. | | |
|
|
106
|
+
| `no-nested-components` | Prevents nesting component definitions inside other components. | | |
|
|
107
|
+
| `no-prop-types` | Prevents using `propTypes` in favor of TypeScript or another type-checking solution. | | |
|
|
108
|
+
| `no-redundant-should-component-update` | Prevents using `shouldComponentUpdate` when extending `React.PureComponent`. | | |
|
|
109
|
+
| `no-set-state-in-component-did-mount` | Prevents calling `this.setState` in `componentDidMount` outside of functions, such as callbacks. | | |
|
|
110
|
+
| `no-set-state-in-component-did-update` | Prevents calling `this.setState` in `componentDidUpdate` outside of functions, such as callbacks. | | |
|
|
111
|
+
| `no-set-state-in-component-will-update` | Prevents calling `this.setState` in `componentWillUpdate` outside of functions, such as callbacks. | | |
|
|
112
|
+
| `no-string-refs` | Prevents using deprecated string `refs`. | | |
|
|
113
|
+
| `no-unsafe-component-will-mount` | Warns the usage of `UNSAFE_componentWillMount` in class components. | | |
|
|
114
|
+
| `no-unsafe-component-will-receive-props` | Warns the usage of `UNSAFE_componentWillReceiveProps` in class components. | | |
|
|
115
|
+
| `no-unsafe-component-will-update` | Warns the usage of `UNSAFE_componentWillUpdate` in class components. | | |
|
|
116
|
+
| `no-unstable-context-value` | Prevents non-stable values (i.e. object literals) from being used as a value for `Context.Provider`. | | |
|
|
117
|
+
| `no-unstable-default-props` | Prevents using referential-type values as default props in object destructuring. | | |
|
|
118
|
+
| `no-unused-class-component-members` | Warns unused class component methods and properties. | | |
|
|
119
|
+
| `no-unused-state` | Warns unused class component state. | | |
|
|
120
|
+
| `no-useless-fragment` | Prevents using useless `fragment` components or `<>` syntax. | | |
|
|
121
|
+
| `prefer-destructuring-assignment` | Enforces using destructuring assignment over property assignment. | | |
|
|
122
|
+
| `prefer-react-namespace-import` | Enforces using `React` namespace import over default import. | | 🔧 |
|
|
123
|
+
| `prefer-read-only-props` | Enforce read-only props in components. | 💭 | |
|
|
124
|
+
| `prefer-shorthand-boolean` | Enforces using shorthand syntax for boolean attributes. | | 🔧 |
|
|
125
|
+
| `prefer-shorthand-fragment` | Enforces using shorthand syntax for fragments. | | |
|
package/dist/index.js
CHANGED
|
@@ -41,7 +41,7 @@ var ts__default = /*#__PURE__*/_interopDefault(ts);
|
|
|
41
41
|
|
|
42
42
|
// package.json
|
|
43
43
|
var name = "eslint-plugin-react-x";
|
|
44
|
-
var version = "1.
|
|
44
|
+
var version = "1.20.0-beta.2";
|
|
45
45
|
var createRule = shared.createRuleForPlugin("x");
|
|
46
46
|
|
|
47
47
|
// src/rules/avoid-shorthand-boolean.ts
|
package/dist/index.mjs
CHANGED
|
@@ -14,7 +14,7 @@ import { getTypeImmutability, isUnknown, isImmutable, isReadonlyShallow, isReado
|
|
|
14
14
|
|
|
15
15
|
// package.json
|
|
16
16
|
var name = "eslint-plugin-react-x";
|
|
17
|
-
var version = "1.
|
|
17
|
+
var version = "1.20.0-beta.2";
|
|
18
18
|
var createRule = createRuleForPlugin("x");
|
|
19
19
|
|
|
20
20
|
// src/rules/avoid-shorthand-boolean.ts
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-x",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.20.0-beta.2",
|
|
4
4
|
"description": "A set of composable ESLint rules for libraries and frameworks that use React as a UI runtime.",
|
|
5
5
|
"keywords": [
|
|
6
|
+
"react",
|
|
6
7
|
"eslint",
|
|
8
|
+
"eslint-react",
|
|
7
9
|
"eslint-plugin",
|
|
8
|
-
"react"
|
|
9
|
-
"react-x",
|
|
10
|
-
"x-platform"
|
|
10
|
+
"eslint-plugin-react-x"
|
|
11
11
|
],
|
|
12
12
|
"homepage": "https://github.com/rel1cx/eslint-react",
|
|
13
13
|
"bugs": {
|
|
@@ -49,13 +49,13 @@
|
|
|
49
49
|
"compare-versions": "^6.1.1",
|
|
50
50
|
"is-immutable-type": "^5.0.0",
|
|
51
51
|
"ts-pattern": "^5.5.0",
|
|
52
|
-
"@eslint-react/ast": "1.
|
|
53
|
-
"@eslint-react/jsx": "1.
|
|
54
|
-
"@eslint-react/core": "1.
|
|
55
|
-
"@eslint-react/tools": "1.
|
|
56
|
-
"@eslint-react/types": "1.
|
|
57
|
-
"@eslint-react/
|
|
58
|
-
"@eslint-react/
|
|
52
|
+
"@eslint-react/ast": "1.20.0-beta.2",
|
|
53
|
+
"@eslint-react/jsx": "1.20.0-beta.2",
|
|
54
|
+
"@eslint-react/core": "1.20.0-beta.2",
|
|
55
|
+
"@eslint-react/tools": "1.20.0-beta.2",
|
|
56
|
+
"@eslint-react/types": "1.20.0-beta.2",
|
|
57
|
+
"@eslint-react/var": "1.20.0-beta.2",
|
|
58
|
+
"@eslint-react/shared": "1.20.0-beta.2"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@types/react": "^19.0.1",
|