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

Comments

Projects
None yet
9 participants
@clemmy
Contributor

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

This comment has been minimized.

Show comment
Hide comment
@not-an-aardvark

not-an-aardvark Nov 28, 2017

Member

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).

Member

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

This comment has been minimized.

Show comment
Hide comment
@not-an-aardvark

not-an-aardvark Nov 28, 2017

Member

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

Member

not-an-aardvark commented Nov 28, 2017

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

@mysticatea

This comment has been minimized.

Show comment
Hide comment
@mysticatea

mysticatea Nov 29, 2017

Member

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.

Member

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

This comment has been minimized.

Show comment
Hide comment
@not-an-aardvark

not-an-aardvark Nov 29, 2017

Member

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

Member

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

This comment has been minimized.

Show comment
Hide comment
@chucksellick

chucksellick 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").

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

This comment has been minimized.

Show comment
Hide comment
@Mati365

Mati365 commented Dec 27, 2017

@chucksellick +1, same here

@ackvf

This comment has been minimized.

Show comment
Hide comment
@ackvf

ackvf Mar 21, 2018

Any news?

ackvf commented Mar 21, 2018

Any news?

@mbavio

This comment has been minimized.

Show comment
Hide comment
@mbavio

mbavio Jun 11, 2018

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

mbavio commented Jun 11, 2018

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

@vladshcherbin

This comment has been minimized.

Show comment
Hide comment
@vladshcherbin

vladshcherbin Jun 11, 2018

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

vladshcherbin commented Jun 11, 2018

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

@mbavio

This comment has been minimized.

Show comment
Hide comment
@mbavio

mbavio Jun 11, 2018

@vladshcherbin yup, it works now, thanks!

mbavio commented Jun 11, 2018

@vladshcherbin yup, it works now, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment