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
(Because I'm not sure the text will line up properly here, I want to point out that in the output the caret is pointing to the period after the question mark in "(c.value?.toString()")
Expected behavior
Prettier properly parses the code and makes it pretty.
The text was updated successfully, but these errors were encountered:
Just for fun, I tried code with the optional chaining operator on the Prettier playground and it worked.
That tells me this is likely an issue b/c the default version of prettier in the extension is pretty old (2.2.1, I think). That is, this is a stale prettier issue rather than strictly an extension issue.
In the latest (?) version of this plugin, there's an option to download and use a more recent version of Prettier. Now the version of the plugin on the Marketplace is JavaScript_Prettier_v2.1.47 (what you had) and the latest here in the CI build is JavaScript Prettier v2.2.52. I don't know if that means the Marketplace version just hasn't been updated or if the newer one is broken and is hidden from the masses on purpose.
But with that warning and a quick mention that the newer version Works on My Box (c)1842...
Installed product versions
Description
Running Prettier on a file that includes the Optional chaining operator (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining) causes a syntax error
Steps to recreate
Current behavior
The file is not prettified and there is an error in the Output:
(Because I'm not sure the text will line up properly here, I want to point out that in the output the caret is pointing to the period after the question mark in "(c.value?.toString()")
Expected behavior
Prettier properly parses the code and makes it pretty.
The text was updated successfully, but these errors were encountered: