[META] support ES6 features! #192

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

Comments

Projects
None yet
9 participants
@millermedeiros
Owner

millermedeiros commented Jul 8, 2014

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

@millermedeiros

This comment has been minimized.

Show comment
Hide comment
@millermedeiros

millermedeiros Jul 8, 2014

Owner

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

Owner

millermedeiros commented Jul 8, 2014

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

@Volox

This comment has been minimized.

Show comment
Hide comment
@Volox

Volox Jul 9, 2014

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

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 millermedeiros referenced this issue in millermedeiros/rocambole Jul 14, 2014

Closed

use esprima-fb since it supports ES6 features #18

@millermedeiros

This comment has been minimized.

Show comment
Hide comment
@millermedeiros

millermedeiros Aug 25, 2014

Owner

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.

Owner

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

This comment has been minimized.

Show comment
Hide comment
@lukescott

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

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

This comment has been minimized.

Show comment
Hide comment
@millermedeiros

millermedeiros Feb 25, 2015

Owner

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

Owner

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

update rocambole to v0.5 and change the BinaryExpression test to matc…
…h esprima@2.0 behavior (no EmptyStatement between ExpressionStatements). see #192
@millermedeiros

This comment has been minimized.

Show comment
Hide comment
@millermedeiros

millermedeiros Feb 26, 2015

Owner

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

Owner

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

This comment has been minimized.

Show comment
Hide comment
@ruyadorno

ruyadorno Feb 26, 2015

Collaborator

🎉 🎉 🎉

Collaborator

ruyadorno commented Feb 26, 2015

🎉 🎉 🎉

@eduardolundgren

This comment has been minimized.

Show comment
Hide comment
@eduardolundgren

eduardolundgren Feb 28, 2015

Contributor

Thank you @millermedeiros :)

Contributor

eduardolundgren commented Feb 28, 2015

Thank you @millermedeiros :)

@RaitoBezarius

This comment has been minimized.

Show comment
Hide comment
@RaitoBezarius

RaitoBezarius Mar 8, 2015

Contributor

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

Contributor

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

This comment has been minimized.

Show comment
Hide comment

👍

@feross feross referenced this issue in maxogden/standard-format Mar 23, 2015

Closed

Throws error when using ES 2015 modules #35

@millermedeiros

This comment has been minimized.

Show comment
Hide comment
@millermedeiros

millermedeiros Mar 24, 2015

Owner

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

Owner

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

This comment has been minimized.

Show comment
Hide comment
@millermedeiros

millermedeiros Jul 10, 2015

Owner

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

Owner

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

This comment has been minimized.

Show comment
Hide comment
@eduardolundgren

eduardolundgren Jul 10, 2015

Contributor

Thank you @millermedeiros :)

Contributor

eduardolundgren commented Jul 10, 2015

Thank you @millermedeiros :)

@kewah

This comment has been minimized.

Show comment
Hide comment
@kewah

kewah Jul 10, 2015

Contributor

good work 👍

Contributor

kewah commented Jul 10, 2015

good work 👍

@tommmyy

This comment has been minimized.

Show comment
Hide comment
@tommmyy

tommmyy Aug 27, 2015

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

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

This comment has been minimized.

Show comment
Hide comment
@millermedeiros

millermedeiros Aug 27, 2015

Owner

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

Owner

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