function isComponentInProp(node) {
      if (isPropertyOfObjectExpressionMatcher(node)) {
        return utils.isReturningJSX(node);
      }

      const jsxAttribute = getClosestMatchingParent(node, context, isJSXAttributeOfExpressionContainerMatcher);

      if (!jsxAttribute) {
        return isComponentInsideCreateElementsProp(node);
      }

      return utils.isReturningJSX(node);
    }
Check whether given node is declared inside a component/object prop.
```jsx
<Component footer={() => <div />} />
{ footer: () => <div /> }
```
@param {ASTNode} node The AST node being checked
@returns {boolean} True if node is a component declared inside prop, false if not