-
-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 BUG: version 2.8.1 removes trailing comma on save #847
Comments
This is controlled by your Prettier settings, we don't really set something there. It's possible that the default Prettier setting changed, not sure. |
The prettier version did not change on the app I'm seeing this on, not for a while. And looking at the prettier docs, it did change, see the docs - in version 3 they went from Like I said, it works fine if I downgrade the vscode Astro extension to version 2.8.0, and I found this isn't the only thing that was affected: I found that other bug #829 also affected by upgrading |
That other issue isn't related to Do you set any Prettier config anywhere? Or is this using completely default config? Using the Prettier playground, the snippet you shared always get its last trailling comma removed when using the default settings |
Ah, yeah my example is too short, it ends up combining it to a single line If you use something that is long enough to go multi-line, like this:
You'll see it does add the last comma in the default prettier playground here. |
Just to see what happened, I specifically set |
Sorry I forgot to answer your question:
We set |
Describe the Bug
When I save an astro file, it removes trailing commas from multi-line function calls.
If I downgrade to version 2.8.0 and save, it adds them back again when I save.
I wonder if it is also related to #823 - I found another issue that sounded like it was similarly affected, #829 - though the specific fix for that one did not address this one.
Steps to Reproduce
EDIT: After comments, here is a better example, since the above ends up on a single line which does not have trailing comma:
The text was updated successfully, but these errors were encountered: