Skip to content
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: HTML-style prettier-ignore comments do not work for script tags #410

Open
ony3000 opened this issue Feb 26, 2024 · 0 comments
Open

Comments

@ony3000
Copy link

ony3000 commented Feb 26, 2024

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

  1. Prepare Astro code in the following form: (I'll call it foobar.astro here.)
    <!-- prettier-ignore -->
    <script>
    const foo = '123'
    </script>
  2. 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.)

The current behavior

current

The expected behavior

expected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant