Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSX Fragment Syntax Support #9662

Closed
clemmy opened this issue Nov 28, 2017 · 10 comments
Closed

JSX Fragment Syntax Support #9662

clemmy opened this issue Nov 28, 2017 · 10 comments

Comments

@clemmy
Copy link
Contributor

@clemmy clemmy commented Nov 28, 2017

JSX has official fragment syntax (facebook/jsx#93)! Can we add support for that when JSX is enabled? I'd be happy to make a PR for this if someone can point me in the right direction. 馃檪

@eslint eslint bot added the triage label Nov 28, 2017
@not-an-aardvark
Copy link
Member

@not-an-aardvark not-an-aardvark commented Nov 28, 2017

Thanks for creating an issue. I think this would be implemented by adding support to acorn-jsx, which is used by espree, ESLint's default parser.

Separately, we would also need to upgrade espree to the latest version of acorn-jsx in order for the change to take effect. This isn't a big problem, but it is nontrivial (see eslint/espree#345).

@not-an-aardvark
Copy link
Member

@not-an-aardvark not-an-aardvark commented Nov 28, 2017

Actually, it seems like JSX fragments have already been added to acorn-jsx in acornjs/acorn-jsx@1a71881, so we would just need to upgrade acorn-jsx in espree to support them.

@mysticatea
Copy link
Member

@mysticatea mysticatea commented Nov 29, 2017

As far as I know, upgrading acorn-jsx has a breaking change about JSXText node. This might need to wait for the next major version of ESLint.

@not-an-aardvark
Copy link
Member

@not-an-aardvark not-an-aardvark commented Nov 29, 2017

In eslint/espree#345, there was some discussion about adding an option to Espree to avoid the breaking change in acorn-jsx.

@chucksellick
Copy link

@chucksellick chucksellick commented Dec 26, 2017

The fragment syntax is working for me with Babel 7 beta 3, however using fragments is triggering eslint's quotes rule ("Strings must use doublequote").

@Mati365
Copy link

@Mati365 Mati365 commented Dec 27, 2017

@chucksellick +1, same here

@ackvf
Copy link

@ackvf ackvf commented Mar 21, 2018

Any news?

@marbiano
Copy link

@marbiano marbiano commented Jun 11, 2018

Why was this issue closed? I see no solution, and it's not working for me with latest eslint.

@vladshcherbin
Copy link

@vladshcherbin vladshcherbin commented Jun 11, 2018

@mbavio I think it's in the latest version (v5 alpha/rc). Did you try them?

@marbiano
Copy link

@marbiano marbiano commented Jun 11, 2018

@vladshcherbin yup, it works now, thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
9 participants
You can鈥檛 perform that action at this time.