stackblitz / core

Online IDE powered by Visual Studio Code ⚡️
https://stackblitz.com
MIT License
10.18k stars 885 forks source link

Unable to format #3023

Closed crazyair closed 2 months ago

crazyair commented 2 months ago

Description of Bug

Provide a concise description of your bug and your project link (if applicable).

https://stackblitz.com/edit/react-jnagw4?file=demo.tsx

Steps to Reproduce

  1. Right click
  2. Click format document

Expected Behavior

A clear and concise description of what you expected to happen.

can format

Screenshots/Screencast

If applicable, add screenshots to help explain your problem.

image

Additional Context/Questions Add any other context or questions regarding this bug.

fvsch commented 2 months ago

Hi @crazyair.

Thanks for the report! This is indeed an issue with the version of Prettier we're using for this feature. An update is planned.

fvsch commented 2 months ago

We shipped a fix for this issue yesterday.

The classic editor is now using Prettier 2.8.8 (instead of 2.4.0), which supports most of the recent syntax additions in TypeScript 5.