withastro/astro
🐛 BUG: version 2.8.1 removes trailing comma on save
Fechada
#14.665 aberto em 29 de mar. de 2024
good first issuepkg: language-tools
Métricas do repositório
- Stars
- (61.918 estrelas)
- Métricas de merge de PR
- (Mesclagem média 4d 23h) (197 fundiu PRs em 30d)
Description
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 withastro/language-tools#823 - I found another issue that sounded like it was similarly affected, withastro/language-tools#829 - though the specific fix for that one did not address this one.
Steps to Reproduce
- Open any .astro file with multi-line function calls. E.g.
foo( var1, var2, ); - save the file
- trailing commas are removed. For the above example it would change to:
foo( var1, var2 );
EDIT: After comments, here is a better example, since the above ends up on a single line which does not have trailing comma:
someReallyLongNAmeThingThatIsReallyLong(
someReallyLongVarThatISLongAnd,
SomeOtherReallyLongThing,
);