Files
leaysgur 2465e87905 fix(formatter): keep comments in place when dropping EmptyStatement (#25730)
Fixes #25705

---

JS formatter drops `;` (`EmptyStatement`) in a statement list.

However, this raises a question: how are the surrounding comments handled when it is dropped?

This happens because when the comment cursor retrieves that information from the `span`s of the preceding and following nodes, the `EmptyStatement`, which no longer exists, was the one reporting that position.
2026-08-16 02:26:11 +00:00
..
…
…

Oxc Formatter

Based on Biome formatter. All credits to the Biome team.