Closed jonathanong closed 7 years ago
ES6 support in esformatter is currently a bit lacking. As ES6 support improves in esformatter, standard-format will inherit those fixes.
+1 for async/await support
Any updates on this one?
same
Maybe you could switch to eslint for auto formatting?
Standart-format works fine with async functions. But we have bug in dependency: https://github.com/millermedeiros/esformatter-semicolon-first/issues/3
For quick fix, just comment this line
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
@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
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
@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.
You should use standard --fix
instead of this package. standard-format
isn't being actively maintained anymore.
@feross Pro tip: remove issues section
can't format my babel code because async functions are not supported :(