Is your feature request related to a problem? Please describe.
The [email protected] introduced optional chaining, here you can find more details.
TL;DR
it is now possible to write something like this:
const value = some?.object?.value.
Prettier can't handle ?. syntax and do not dormat file.
Describe the solution you'd like
Add formatter for this case.
Describe alternatives you've considered
None
Additional context
here
Hi @Lazarencjusz, can it be that you are running an old version of this plugin or that you have a local project-specific dependency on prettier, which is up to date? TypeScript 3.7 seems to be supported since this commit: https://github.com/prettier/prettier-vscode/commit/fa31b634960514524430a8407166760ec5b24109
@kachkaev I saw, I have latest plugin version in my VScode but I will double-check it.
This is already supported. Make sure you are running the latest version of the plugin and vscode and prettier is up to date.
Thanks, you ware right, I needed to update feom 1.40.0 to 1.41.0
It still does not work for me, after reinstalling everything 馃槶
----- VSCODE ------
Version: 1.41.1
Commit: 26076a4de974ead31f97692a0d32f90d735645c0
Date: 2019-12-18T14:57:51.166Z
Electron: 6.1.5
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Darwin x64 19.2.0
------ Prettier Extension --------
Version: 3.20.0
@cky-BryanChan I kept getting the error myself until adding prettier to my project via yarn add --dev prettier
@Entryist thanks, it's work for me.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
@cky-BryanChan I kept getting the error myself until adding prettier to my project via
yarn add --dev prettier