prettier-plugin-astro
prettier-plugin-astro copied to clipboard
🐛 BUG: HTML-style `prettier-ignore` comments do not work for script tags
Describe the Bug
Hello. I maintain three Prettier plugins.
I've recently been implementing Astro support in a plugin, and while adding tests, I found two bugs. I'm going to report them in this issue and the next issue.
Steps to Reproduce
- Prepare Astro code in the following form: (I'll call it
foobar.astrohere.)<!-- prettier-ignore --> <script> const foo = '123' </script> - In terminal, run
pnpm prettier --check foobar.astro --no-config --plugin=prettier-plugin-astro --parser=astro. (Depending on the package manager you use, the first part of the command may be slightly different.)