Flow call expression generic with union type is parsed incorrectly with babylon parser
See original GitHub issuePrettier 1.15.2 Playground link
Input:
const Theme = React.createContext<"light" | "dark">("light");
Output:
const Theme = (React.createContext < "light") | ("dark" > "light");
Expected behavior:
const Theme = React.createContext<"light" | "dark">("light");
This seems pretty bad.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Parsing error when calling generic function with type arguments
The first time I saw this error, my first impression was that I forgot to import XType , so I scrolled to the...
Read more >eslint-plugin-flowtype - npm
This plugin exports a recommended configuration that enforces Flow type good practices. To enable this configuration use the extends property in ...
Read more >CustomAction/RNCustomAction/node_modules/eslint-plugin ...
Install babel-eslint parser (ESLint parser does not support type annotations). ... This plugin exports a recommended configuration that enforces Flow type ...
Read more >@babel/plugin-transform-flow-comments | Yarn - Package Manager
@babel/plugin-transform-flow-comments. owner babel21.1kMIT7.19.0 vulns 0 vulnerabilities. Turn flow type annotations into comments. babel-plugin ...
Read more >pDi - River Thames Conditions - Environment Agency - GOV.UK
Zeekant 40 den haag, Selection of cables pdf, Zakelijke brief geachte dhr, Studio type apartment decorating ideas? Turin horse quotes? Image family room!...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
How about adding a
babylon-flow
parser (andbabylon-typescript
for TS)?Should Prettier add an option to enable
all: true
for the Babylon parser?