facebook / facebook/relay

Relay should use babel.parse instead of babylon perhaps

Open
#2,372 14 comments 0 reactions 0 assignees View on GitHub
wontfix
Dominant language
Rust
Stars
19k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

At the moment using Babylon to parse files leaves relay always playing catch up with adding syntax plugins, and doesn't handle the mutually exclusive cases at all (typescript vs flow, etc).

Babel just added [`babel.parse`](https://github.com/babel/babel/tree/master/packages/babel-core#babelparsecode-string-options-object) to return the ast, but critically, will use the local babelrc if it exists. Which means parsing will always be using the set of plugins the user has defined for that project.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.