eslint-plugin-react-x 1.19.0 → 1.20.0-beta.13

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 CHANGED
@@ -52,7 +52,7 @@ export default [
52
52
  "react-x/no-forward-ref": "warn",
53
53
  "react-x/no-implicit-key": "warn",
54
54
  "react-x/no-missing-key": "error",
55
- "react-x/no-nested-components": "warn",
55
+ "react-x/no-nested-components": "error",
56
56
  "react-x/no-prop-types": "error",
57
57
  "react-x/no-redundant-should-component-update": "error",
58
58
  "react-x/no-set-state-in-component-did-mount": "warn",
@@ -62,8 +62,8 @@ export default [
62
62
  "react-x/no-unsafe-component-will-mount": "warn",
63
63
  "react-x/no-unsafe-component-will-receive-props": "warn",
64
64
  "react-x/no-unsafe-component-will-update": "warn",
65
- "react-x/no-unstable-context-value": "error",
66
- "react-x/no-unstable-default-props": "error",
65
+ "react-x/no-unstable-context-value": "warn",
66
+ "react-x/no-unstable-default-props": "warn",
67
67
  "react-x/no-unused-class-component-members": "warn",
68
68
  "react-x/no-unused-state": "warn",
69
69
  },
@@ -73,53 +73,4 @@ 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 `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. | 🎨 | | |
76
+ <https://eslint-react.xyz/docs/rules/overview#core-rules>
package/dist/index.d.mts CHANGED
@@ -69,14 +69,6 @@ declare const _default: {
69
69
  /** @deprecated Use `no-complex-conditional-rendering` instead. */
70
70
  "no-complicated-conditional-rendering": _typescript_eslint_utils_ts_eslint.RuleModule<"noComplexConditionalRendering", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
71
71
  };
72
- DEFAULT_ESLINT_REACT_SETTINGS: {
73
- readonly additionalHooks: {
74
- readonly useLayoutEffect: ["useIsomorphicLayoutEffect"];
75
- };
76
- readonly polymorphicPropName: "as";
77
- readonly strictImportCheck: true;
78
- readonly version: "detect";
79
- };
80
72
  };
81
73
 
82
74
  export { _default as default };
package/dist/index.d.ts CHANGED
@@ -69,14 +69,6 @@ declare const _default: {
69
69
  /** @deprecated Use `no-complex-conditional-rendering` instead. */
70
70
  "no-complicated-conditional-rendering": _typescript_eslint_utils_ts_eslint.RuleModule<"noComplexConditionalRendering", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
71
71
  };
72
- DEFAULT_ESLINT_REACT_SETTINGS: {
73
- readonly additionalHooks: {
74
- readonly useLayoutEffect: ["useIsomorphicLayoutEffect"];
75
- };
76
- readonly polymorphicPropName: "as";
77
- readonly strictImportCheck: true;
78
- readonly version: "detect";
79
- };
80
72
  };
81
73
 
82
74
  export { _default as default };