Skip to content
This repository was archived by the owner on May 19, 2018. It is now read-only.
/ babylon Public archive
This repository was archived by the owner on May 19, 2018. It is now read-only.

Parsing error of generic function when enabling jsx and flow plugins #471

@tibdex

Description

@tibdex

I found this while using prettier 1.1.0.

Input Code

const identity = <T>(t: T): T => t;
const a = 1;

Babylon/Babel Configuration

{
  plugins: ['jsx', 'flow']
}

Expected Behavior

The code is valid and babylon should be able to parse it.

Current Behavior

babylon throws Unexpected token (2:0). You can see it live on the prettier playground.

Removing the jsx plugin and only enabling the flow one makes babylon able to parse the code correctly.

Your Environment

software version
Babylon 7.0.0-beta.8
node 6.9.1
yarn 0.22.0
Operating System Windows 10

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions