* fix(range): improve detection of JS source elements * Add changelog entry * Remove unneeded comment * Add more types and update snapshots
562 B
562 B
Improve detection of source elements for range formatting (#8419 by @thorn0)
Not all statement types were detected (read here how range formatting works in Prettier).
// Input
for (const element of list) { /* ... */ }
// ^^^^^^^^^^^^^^^^^^^^^^ ← range
// Prettier stable
for (const element of list) { /* ... */ }
// Prettier master
for (const element of list) {
/* ... */
}