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
Currently our prettier functionality only handles JS files as it always uses babylon (which should now be babel, I believe). Formatting for json, typescript and more just fails silently. I'm working on prettier enhancements which will address this issue. See below for an outline of how I'm tackling the issue. Open for discussion now and/or when my PR comes in.
Current plan:
Check current file extension and use that to set a valid non-custom parser option by updating the parser name and loading the necessary script on click (loaded from this list of prettier parsers)
Less sure of this one: Keep prettier and the babel/babylon parser loaded (but via 'async') in the head of index.html as they'll be used a lot.
Hide the prettier button if we're in a file with an extension that we cannot prettify
In addition to formatting and done state, add a formatting failed state to the prettier button (current state changes in a local branch on my machine. Relates to discussion in Prettier enhancements: feedback/state & options #176 )
Relates to issue #176 (prettier enhancements)
Currently our prettier functionality only handles JS files as it always uses
babylon(which should now bebabel, I believe). Formatting forjson,typescriptand more just fails silently. I'm working on prettier enhancements which will address this issue. See below for an outline of how I'm tackling the issue. Open for discussion now and/or when my PR comes in.Current plan:
index.htmlas they'll be used a lot.formattinganddonestate, add aformatting failedstate to the prettier button (current state changes in a local branch on my machine. Relates to discussion in Prettier enhancements: feedback/state & options #176 )