You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be quite helpful if custom formatters registered with registerCustomFormat could handle a returned Promise, in particular for the toFile method.
The practical use-case here is running prettier.format (async-only) on contents being written to ensure they conform to a project's code style.
I realize Decap does not support async toFile methods.
The footprint of this change appears to be quite small though, since there are only twocalls to formatEntryFile and both are in the context of async functions.
The text was updated successfully, but these errors were encountered:
I’ve just found this Decap issue. It’s closed but Decap doesn’t support async methods as you said. It’s perhaps closed by accident or as wontfix (because ES6 promise support is relatively new), and I’ve “effectively solved” the very old issue. 🙃
Impressive that you're able to knock these out so quickly — a real testament to how much the frontend frameworks have evolved, and your solid code of course.
It would be quite helpful if custom formatters registered with
registerCustomFormat
could handle a returned Promise, in particular for thetoFile
method.The practical use-case here is running
prettier.format
(async-only) on contents being written to ensure they conform to a project's code style.I realize Decap does not support async
toFile
methods.The footprint of this change appears to be quite small though, since there are only two calls to
formatEntryFile
and both are in the context ofasync
functions.The text was updated successfully, but these errors were encountered: