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