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
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion enhancement This change enhances an existing feature of ESLint

Comments

@clemmy
Copy link
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-deprecated eslint-deprecated bot added the triage An ESLint team member will look at this issue soon label Nov 28, 2017
@not-an-aardvark
Copy link
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).

@not-an-aardvark not-an-aardvark added blocked This change can't be completed until another issue is resolved enhancement This change enhances an existing feature of ESLint and removed triage An ESLint team member will look at this issue soon labels Nov 28, 2017
@not-an-aardvark
Copy link
Member

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

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

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

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 commented Dec 27, 2017

@chucksellick +1, same here

@ackvf
Copy link

ackvf commented Mar 21, 2018

Any news?

@marbiano
Copy link

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

@vladshcherbin
Copy link

vladshcherbin commented Jun 11, 2018

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

@marbiano
Copy link

@vladshcherbin yup, it works now, thanks!

@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Nov 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion enhancement This change enhances an existing feature of ESLint
Projects
None yet
Development

No branches or pull requests

9 participants