We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 995b258 + 3260811 commit 329857dCopy full SHA for 329857d
lib/rules/destructuring-assignment.js
@@ -74,9 +74,9 @@ module.exports = {
74
75
function handleClassUsage(node) {
76
// this.props.Aprop || this.context.aProp || this.state.aState
77
- const isPropUsed = (node.object.type === 'MemberExpression' && node.object.object.type === 'ThisExpression' &&
78
- (node.object.property.name === 'props' || node.object.property.name === 'context' || node.object.property.name === 'state') &&
79
- node.object.type === 'MemberExpression'
+ const isPropUsed = (
+ node.object.type === 'MemberExpression' && node.object.object.type === 'ThisExpression' &&
+ (node.object.property.name === 'props' || node.object.property.name === 'context' || node.object.property.name === 'state')
80
);
81
82
if (isPropUsed && configuration === 'always') {
0 commit comments