lib/util/Components.js
function(node) {
      var comment = sourceCode.getJSDocComment(node);

      if (comment === null) {
        return false;
      }

      var commentAst = doctrine.parse(comment.value, {
        unwrap: true,
        tags: ['extends', 'augments']
      });

      var relevantTags = commentAst.tags.filter(function(tag) {
        return tag.name === 'React.Component' || tag.name === 'React.PureComponent';
      });

      return relevantTags.length > 0;
    }
function(node) {
      var comment = sourceCode.getJSDocComment(node);

      if (comment === null) {
        return false;
      }

      var commentAst = doctrine.parse(comment.value, {
        unwrap: true,
        tags: ['extends', 'augments']
      });

      var relevantTags = commentAst.tags.filter(function(tag) {
        return tag.name === 'React.Component' || tag.name === 'React.PureComponent';
      });

      return relevantTags.length > 0;
    }
function ( node ) { var comment = sourceCode . getJSDocComment ( node ) ; if ( comment === null ) { return false ; } var commentAst = doctrine . parse ( comment . value , { unwrap : true , tags : [ 'extends' , 'augments' ] } ) ; var relevantTags = commentAst . tags . filter ( function ( tag ) { return tag . name === 'React.Component' || tag . name === 'React.PureComponent' ; } ) ; return relevantTags . length > 0 ; }
Check if the node is explicitly declared as a descendant of a React Component

@param {ASTNode} node The AST node being checked (can be a ReturnStatement or an ArrowFunctionExpression).
@returns {Boolean} True if the node is explicitly declared as a descendant of a React Component, false if not
Check if the node is explicitly declared as a descendant of a React Component