function isFunctionInClass(node) {
      let blockNode;
      let scope = getScope(context, node);
      while (scope) {
        blockNode = scope.block;
        if (blockNode && blockNode.type === 'ClassDeclaration') {
          return true;
        }
        scope = scope.upper;
      }

      return false;
    }
Checks if we are declaring function in class
@param {ASTNode} node
@returns {boolean} True if we are declaring function in class, false if not.