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

does not support async functions #109

Closed
jonathanong opened this issue Sep 3, 2015 · 12 comments
Closed

does not support async functions #109

jonathanong opened this issue Sep 3, 2015 · 12 comments

Comments

@jonathanong
Copy link

can't format my babel code because async functions are not supported :(

@feross
Copy link
Collaborator

feross commented Sep 8, 2015

ES6 support in esformatter is currently a bit lacking. As ES6 support improves in esformatter, standard-format will inherit those fixes.

@nickpoorman
Copy link

+1 for async/await support

@haywirez
Copy link

haywirez commented Mar 4, 2016

Any updates on this one?

@sheerun
Copy link

sheerun commented Jun 3, 2016

same

@sheerun
Copy link

sheerun commented Jun 3, 2016

Maybe you could switch to eslint for auto formatting?

@dotcypress
Copy link
Contributor

dotcypress commented Jun 15, 2016

Standart-format works fine with async functions.
But we have bug in dependency: millermedeiros/esformatter-semicolon-first#3

For quick fix, just comment this line

@cyberwombat
Copy link

That dependency issue just got fixed btw. Current master now works for formatting. The linter however is still borked which prevents the formatter from working

@feross
Copy link
Collaborator

feross commented Aug 10, 2016

@cyberwombat How is the linter borked? You should be using babel-eslint with standard if you want ES6+ support. See http://standardjs.com/#can-i-use-a-custom-js-parser-for-bleeding-edge-es6-or-es7-support

@feross
Copy link
Collaborator

feross commented Aug 10, 2016

Also -- it may interest the folks who are following this issue to know that standard v8 is shipping with a new --fix option that is backed by eslint itself. So far in testing it works MUCH better than standard-format which is backed by a separate project, esformatter.

Give it a shot!

npm install -g standard@beta
standard --fix

@cyberwombat
Copy link

@feross I mean the linter has not caught up. I am using sublimelinter-contrib-standard - I tried using another linter but the formatter and the other linters never seemed to agree on what is correct - . This linter does however it still marks async/await as invalid though the formatter has no issue with it anymore. Because the formatter fails on the async/await its a bit hard to lint and format. I will try your suggestions.

@feross
Copy link
Collaborator

feross commented Nov 23, 2016

You should use standard --fix instead of this package. standard-format isn't being actively maintained anymore.

@feross feross closed this as completed Nov 23, 2016
@sheerun
Copy link

sheerun commented Nov 23, 2016

@feross Pro tip: remove issues section

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

No branches or pull requests

7 participants