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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[META] support ES6 features! #192

Closed
millermedeiros opened this issue Jul 8, 2014 · 16 comments
Closed

[META] support ES6 features! #192

millermedeiros opened this issue Jul 8, 2014 · 16 comments
Labels

Comments

@millermedeiros
Copy link
Owner

@millermedeiros millermedeiros commented Jul 8, 2014

as long as it is supported by esprima it should be fairly easy to add it. (eg. ArrowFunctionExpression)

@millermedeiros
Copy link
Owner Author

@millermedeiros millermedeiros commented Jul 8, 2014

esprima doc about es6 features: http://esprima.org/doc/es6.html - only partial support for now.

@Volox
Copy link

@Volox Volox commented Jul 9, 2014

+1 it will be great to have support for generators so it can be used right now with koajs.

@millermedeiros
Copy link
Owner Author

@millermedeiros millermedeiros commented Aug 25, 2014

I started a test branch of rocambole using acorn instead of esprima, but it looks like both projects uses different range info, so it should take a little bit longer to make it work properly with esformatter.

@lukescott
Copy link

@lukescott lukescott commented Feb 25, 2015

Esprima 2.0 was released 20 days ago, which has (partial) ES6 support. 6 days ago class support was added to the master branch.

@millermedeiros
Copy link
Owner Author

@millermedeiros millermedeiros commented Feb 25, 2015

@lukescott just tested esprima@2.0 and it only introduced a single regression to the esformatter tests.. and it is definitely an edge case (probably related to EmptyStatement not existing anymore on the AST)

millermedeiros added a commit that referenced this issue Feb 26, 2015
…h esprima@2.0 behavior (no EmptyStatement between ExpressionStatements). see #192
@millermedeiros
Copy link
Owner Author

@millermedeiros millermedeiros commented Feb 26, 2015

I just published rocambole@0.5 which uses esprima@2.0, so now we can start adding tests and support for ES6 features \o/

@ruyadorno
Copy link
Collaborator

@ruyadorno ruyadorno commented Feb 26, 2015

🎉 🎉 🎉

@eduardolundgren
Copy link
Contributor

@eduardolundgren eduardolundgren commented Feb 28, 2015

Thank you @millermedeiros :)

@RaitoBezarius
Copy link
Contributor

@RaitoBezarius RaitoBezarius commented Mar 8, 2015

What about replacing esprima by babel (which supports more ES6 features afaik) ?
Is that possible? I can help, if it is not too complicated.

@bobbyrenwick
Copy link

@bobbyrenwick bobbyrenwick commented Mar 16, 2015

👍

@millermedeiros
Copy link
Owner Author

@millermedeiros millermedeiros commented Mar 24, 2015

@RaitoBezarius babel uses acorn internally and we would have the same issues with the token ranges (would require changes to the way we detect the start/end of nodes). right now we are trapped with esprima v2.

it would be helpful if we had new bugs for each ES6 feature that we don't format properly yet, with input and expected outuput. I don't even know which features are supported by esprima at the moment...

@millermedeiros
Copy link
Owner Author

@millermedeiros millermedeiros commented Jul 10, 2015

I believe we covered all the ES6 features on v0.7; if anything else is missing/wrong please open as a separate bugs. Thanks.

@eduardolundgren
Copy link
Contributor

@eduardolundgren eduardolundgren commented Jul 10, 2015

Thank you @millermedeiros :)

@kewah
Copy link
Contributor

@kewah kewah commented Jul 10, 2015

good work 👍

@tommmyy
Copy link

@tommmyy tommmyy commented Aug 27, 2015

Is there possibility that esformatter does not support static class properties (it is included by Babel in stage 0)?

@millermedeiros
Copy link
Owner Author

@millermedeiros millermedeiros commented Aug 27, 2015

@tommmyy for now we can only support features that are implemented by espree. which doesn't support experimental features so far.

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

Successfully merging a pull request may close this issue.

None yet
9 participants
You can’t perform that action at this time.