prettier-plugin-astro icon indicating copy to clipboard operation
prettier-plugin-astro copied to clipboard

🐛 BUG: Formatting failing with alpinejs short hand for `x-bind` -> `:`

Open 22ispencer opened this issue 1 year ago • 0 comments

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

  1. Edit a file in an astro repo (with the prettier plugin) to have : prefixing any html tag
  2. try formatting the document, either through the editor or cli

22ispencer avatar Aug 21 '24 18:08 22ispencer