function isPromiseDeclaration(node) {
      if (
        node.callee.type === 'Identifier' &&
        node.callee.name === 'Promise' &&
        node.arguments.length > 0
      ) {
        const firstArg = node.arguments[0]

        return (
          firstArg.type === 'ArrowFunctionExpression' ||
          firstArg.type === 'FunctionExpression'
        )
      }
      return false
    }
/**
     * Check if the expression is a valid Promise instantiation
     * @param   {NewExpression}  node The node to check
     * @returns {boolean}        Whether the node is a valid Promise instantiation
     */
Check if the expression is a valid Promise instantiation
@param   {NewExpression}  node The node to check
@returns {boolean}        Whether the node is a valid Promise instantiation
Check if the expression is a valid Promise instantiation @param { NewExpression } node The node to check @returns { boolean } Whether the node is a valid Promise instantiation
function isPromiseDeclaration(node) {
      if (
        node.callee.type === 'Identifier' &&
        node.callee.name === 'Promise' &&
        node.arguments.length > 0
      ) {
        const firstArg = node.arguments[0]
        return (
          firstArg.type === 'ArrowFunctionExpression' ||
          firstArg.type === 'FunctionExpression'
        )
      }
      return false
    }
function isPromiseDeclaration ( node ) { if ( node . callee . type === 'Identifier' && node . callee . name === 'Promise' && node . arguments . length > 0 ) { const firstArg = node . arguments [ 0 ] return ( firstArg . type === 'ArrowFunctionExpression' || firstArg . type === 'FunctionExpression' ) } return false }
Check if the expression is a valid Promise instantiation
 @param   {NewExpression}  node The node to check
 @returns {boolean}        Whether the node is a valid Promise instantiation
Check if the expression is a valid Promise instantiation @param { NewExpression } node The node to check @returns { boolean } Whether the node is a valid Promise instantiation