code: function isDestructuredPropsReference(path) {
    const object = path.get('object');
    if (!path.scope.hasOwnBinding(object.node.name)) {
      return;
    }
  
    const bindingValue = path.scope.bindings[object.node.name].path.get('init');
  
    return (
      (bindingValue.isMemberExpression() &&
        bindingValue.get('object').isThisExpression() &&
        bindingValue.get('property').isIdentifier({ name: 'props' })) ||
      bindingValue.isThisExpression()
    );
  }
docs: Checks whether a binding exists for an 'object' property of a MemberExpression, and if that binding is a reference to 'this.props' or 'this'. 'path' must be a MemberExpression NodePath.