@@ -72,46 +72,48 @@ export default [
72
72
73
73
| Rule | Description | 💼 | 💭 | ❌ |
74
74
| :--------------------------------------- | :--------------------------------------------------------------------------------------------------- | :-: | :-: | :-: |
75
- | ` avoid-shorthand-boolean ` | Enforces the use of shorthand syntax for boolean attributes. | 🎨 | | |
76
- | ` avoid-shorthand-fragment ` | Enforces the use of shorthand syntax for fragments. | 🎨 | | |
75
+ | ` avoid-shorthand-boolean ` | Enforces using shorthand syntax for boolean attributes. | 🎨 | | |
76
+ | ` avoid-shorthand-fragment ` | Enforces using shorthand syntax for fragments. | 🎨 | | |
77
77
| ` ensure-forward-ref-using-ref ` | Requires that components wrapped with ` forwardRef ` must have a ` ref ` parameter. | ✔️ | | |
78
78
| ` no-access-state-in-setstate ` | Prevents accessing ` this.state ` inside ` setState ` calls. | ✔️ | | |
79
- | ` no-array-index-key ` | Warns when an array ` index ` is used as a ` key ` prop. | 🧐 | | |
80
- | ` no-children-count ` | Prevents usage of ` Children.count ` . | ⛔ | | |
81
- | ` no-children-for-each ` | Prevents usage of ` Children.forEach ` . | ⛔ | | |
82
- | ` no-children-map ` | Prevents usage of ` Children.map ` . | ⛔ | | |
83
- | ` no-children-only ` | Prevents usage of ` Children.only ` . | ⛔ | | |
84
- | ` no-children-prop ` | Prevents usage of ` children ` as a prop. | ⛔ | | |
85
- | ` no-children-to-array ` | Prevents usage of ` Children.toArray ` . | ⛔ | | |
86
- | ` no-class-component ` | Prevents usage of class component. | ⛔ | | |
87
- | ` no-clone-element ` | Prevents usage of ` cloneElement ` . | ⛔ | | |
79
+ | ` no-array-index-key ` | Prevents using array ` index ` as ` key ` . | 🧐 | | |
80
+ | ` no-children-count ` | Prevents using ` Children.count ` . | ⛔ | | |
81
+ | ` no-children-for-each ` | Prevents using ` Children.forEach ` . | ⛔ | | |
82
+ | ` no-children-map ` | Prevents using ` Children.map ` . | ⛔ | | |
83
+ | ` no-children-only ` | Prevents using ` Children.only ` . | ⛔ | | |
84
+ | ` no-children-prop ` | Prevents using ` children ` as a prop. | ⛔ | | |
85
+ | ` no-children-to-array ` | Prevents using ` Children.toArray ` . | ⛔ | | |
86
+ | ` no-class-component ` | Prevents using class component. | ⛔ | | |
87
+ | ` no-clone-element ` | Prevents using ` cloneElement ` . | ⛔ | | |
88
88
| ` no-comment-textnodes ` | Prevents comments from being inserted as text nodes. | 🧐 | | |
89
- | ` no-component-will-mount ` | Prevents usage of ` componentWillMount ` . | ⛔ | | |
90
- | ` no-component-will-receive-props ` | Prevents usage of ` componentWillReceiveProps ` . | ⛔ | | |
91
- | ` no-component-will-update ` | Prevents usage of ` componentWillUpdate ` . | ⛔ | | |
92
- | ` no-create-ref ` | Prevents usage of ` createRef ` . | ⛔ | | |
93
- | ` no-default-props ` | Prevents usage of ` defaultProps ` . | ⛔ | | |
89
+ | ` no-complicated-conditional-rendering ` | Prevents complicated conditional rendering in JSX. | 🤯 | | ❌ |
90
+ | ` no-component-will-mount ` | Prevents using ` componentWillMount ` . | ⛔ | | |
91
+ | ` no-component-will-receive-props ` | Prevents using ` componentWillReceiveProps ` . | ⛔ | | |
92
+ | ` no-component-will-update ` | Prevents using ` componentWillUpdate ` . | ⛔ | | |
93
+ | ` no-create-ref ` | Prevents using ` createRef ` . | ⛔ | | |
94
+ | ` no-default-props ` | Prevents using ` defaultProps ` property in favor of ES6 default parameters. | ✔️ | | |
94
95
| ` no-direct-mutation-state ` | Prevents direct mutation of ` this.state ` . | ✔️ | | |
95
96
| ` no-duplicate-key ` | Prevents duplicate ` key ` props on elements in the same array or a list of ` children ` . | ✔️ | | |
97
+ | ` no-implicit-key ` | Prevents ` key ` prop from not being explicitly specified (e.g. spreading ` key ` prop from objects). | 🧐 | | ❌ |
96
98
| ` no-leaked-conditional-rendering ` | Prevents problematic leaked values from being rendered. | 🧐 | 💭 | |
97
99
| ` no-missing-component-display-name ` | Enforces that all components have a ` displayName ` which can be used in devtools. | 🐞 | | |
98
100
| ` no-missing-key ` | Prevents missing ` key ` prop on items in list rendering. | ✔️ | | |
99
101
| ` no-nested-components ` | Prevents nesting component definitions inside other components. | ✔️ | | |
100
- | ` no-prop -types ` | Prevents usage of ` propTypes ` . | ⛔ | | |
101
- | ` no-redundant-should-component-update ` | Prevents usage of ` shouldComponentUpdate ` when extending ` React.PureComponent ` . | ✔️ | | |
102
- | ` no-set-state-in-component-did-mount ` | Disallows calling ` this.setState ` in ` componentDidMount ` outside of functions, such as callbacks. | 🧐 | | |
103
- | ` no-set-state-in-component-did-update ` | Disallows calling ` this.setState ` in ` componentDidUpdate ` outside of functions, such as callbacks. | 🧐 | | |
104
- | ` no-set-state-in-component-will-update ` | Disallows calling ` this.setState ` in ` componentWillUpdate ` outside of functions, such as callbacks. | 🧐 | | |
105
- | ` no-string-refs ` | Disallows using deprecated string ` refs ` . | ⛔ | | |
106
- | ` no-unsafe-component-will-mount ` | Warns usage of ` UNSAFE_componentWillMount ` in class components. | 🧐 | | |
107
- | ` no-unsafe-component-will-receive-props ` | Warns usage of ` UNSAFE_componentWillReceiveProps ` in class components. | 🧐 | | |
108
- | ` no-unsafe-component-will-update ` | Warns usage of ` UNSAFE_componentWillUpdate ` in class components. | 🧐 | | |
102
+ | ` no-props -types ` | Prevents using ` propTypes ` in favor of TypeScript or another type-checking solution. | ⛔ | | |
103
+ | ` no-redundant-should-component-update ` | Prevents using ` shouldComponentUpdate ` when extending ` React.PureComponent ` . | ✔️ | | |
104
+ | ` no-set-state-in-component-did-mount ` | Prevents calling ` this.setState ` in ` componentDidMount ` outside of functions, such as callbacks. | 🧐 | | |
105
+ | ` no-set-state-in-component-did-update ` | Prevents calling ` this.setState ` in ` componentDidUpdate ` outside of functions, such as callbacks. | 🧐 | | |
106
+ | ` no-set-state-in-component-will-update ` | Prevents calling ` this.setState ` in ` componentWillUpdate ` outside of functions, such as callbacks. | 🧐 | | |
107
+ | ` no-string-refs ` | Prevents using deprecated string ` refs ` . | ⛔ | | |
108
+ | ` no-unsafe-component-will-mount ` | Warns the usage of ` UNSAFE_componentWillMount ` in class components. | 🧐 | | |
109
+ | ` no-unsafe-component-will-receive-props ` | Warns the usage of ` UNSAFE_componentWillReceiveProps ` in class components. | 🧐 | | |
110
+ | ` no-unsafe-component-will-update ` | Warns the usage of ` UNSAFE_componentWillUpdate ` in class components. | 🧐 | | |
109
111
| ` no-unstable-context-value ` | Prevents non-stable values (i.e. object literals) from being used as a value for ` Context.Provider ` . | 🚀 | | |
110
- | ` no-unstable-default-props ` | Prevents usage of referential-type values as default props in object destructuring. | 🚀 | | |
112
+ | ` no-unstable-default-props ` | Prevents using referential-type values as default props in object destructuring. | 🚀 | | |
111
113
| ` no-unused-class-component-members ` | Warns unused class component methods and properties. | ✔️ | | |
112
114
| ` no-unused-state ` | Warns unused class component state. | ✔️ | | |
113
- | ` no-useless-fragment ` | Prevents the use of useless ` fragment ` components or ` <> ` syntax. | ✔️ | | |
114
- | ` prefer-read-only-props ` | Enforces that function components props are readonly . | ✔️ | 💭 | |
115
- | ` prefer-destructuring-assignment ` | Enforces the use of destructuring assignment over property assignment . | 🎨 | | |
116
- | ` prefer-shorthand-boolean ` | Enforces the use of shorthand syntax for boolean attributes. | 🎨 | | |
117
- | ` prefer-shorthand-fragment ` | Enforces the use of shorthand syntax for fragments. | 🎨 | | |
115
+ | ` no-useless-fragment ` | Prevents using useless ` fragment ` components or ` <> ` syntax. | ✔️ | | |
116
+ | ` prefer-destructuring-assignment ` | Enforces using destructuring assignment over property assignment . | 🎨 | | |
117
+ | ` prefer-read-only-props ` | Enforce read-only props in components . | ✔️ | 💭 | |
118
+ | ` prefer-shorthand-boolean ` | Enforces using shorthand syntax for boolean attributes. | 🎨 | | |
119
+ | ` prefer-shorthand-fragment ` | Enforces using shorthand syntax for fragments. | 🎨 | | |
0 commit comments