We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
stripTailingPropInAssignment
1 parent 2a76ac9 commit 2381833Copy full SHA for 2381833
packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js
@@ -1437,20 +1437,7 @@ function getDependency(node) {
1437
)
1438
) {
1439
return getDependency(node.parent);
1440
- } else {
1441
- return stripTailingPropInAssignment(node);
1442
- }
1443
-}
1444
-
1445
-/**
1446
- * Assuming () means the passed/returned node:
1447
- * (props) => (props)
1448
- * (props.foo) => (props.foo)
1449
- * (props.foo.bar) = X => (props.foo).bar = X
1450
- * (props.foo.bar.baz) = X => (props.foo.bar).baz
1451
- */
1452
-function stripTailingPropInAssignment(node) {
1453
- if (
+ } else if (
1454
node.type === 'MemberExpression' &&
1455
node.parent &&
1456
node.parent.type === 'AssignmentExpression'
0 commit comments