From 326081194df96ebfa5ee623efac3e42f2b851bc0 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Fri, 27 Oct 2017 08:01:07 +0200 Subject: [PATCH] Remove duplicate assertion --- lib/rules/destructuring-assignment.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/rules/destructuring-assignment.js b/lib/rules/destructuring-assignment.js index 5e6a2a7c4c..2f6601a1a0 100644 --- a/lib/rules/destructuring-assignment.js +++ b/lib/rules/destructuring-assignment.js @@ -74,9 +74,9 @@ module.exports = { function handleClassUsage(node) { // this.props.Aprop || this.context.aProp || this.state.aState - 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') && - 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') ); if (isPropUsed && configuration === 'always') {