Optional chaining just landed in the typscript beta version, so this is more of a heads up than an actual unexpected problem.
The code should format without issues.
The code throws an error.
Error:
```
Expression expected.
15 |
16 | useLayoutEffect(() => {
17 | ref.current?.scrollIntoView?.({
| ^
18 | behavior: 'smooth',
19 | block: 'nearest',
20 | })
````
VS Code Version: 1.38.1
Prettier & Prettier Plugin Version: 1.18.2, 2.3.0
OS and version: Windows 10
This is an issue in prettier itself, not the VS Code extension: https://github.com/prettier/prettier/issues/6595
Prettier 1.19 published, please update. Thanks
Same here !
Update is welcome
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
Prettier 1.19 published, please update. Thanks