prettier-plugin-astro
prettier-plugin-astro copied to clipboard
🐛 BUG: Formatting failing with alpinejs short hand for `x-bind` -> `:`
Describe the Bug
I use Neovim as my editor, formatting was working fine until I used :value as a shorthand for x-bind:value for alpinejs. When i run prettier from the cli (prettier MY_FILE --write) it gives me the error "SyntaxError: Unexpected token" with a caret pointing to the colon. Writing out the long form x-bind:value works fine.
Steps to Reproduce
- Edit a file in an astro repo (with the prettier plugin) to have
:prefixing any html tag - try formatting the document, either through the editor or cli