-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
Parsing error with <script>
in a string literal
#402
Comments
<script>
in a string literal
Duplicate of sveltejs/eslint-plugin-svelte#562 |
@baseballyama I don't think so, this is working properly Svelte-wise. I'm not getting any errors from the Svelte compiler. |
@baseballyama Check this out: https://svelte.dev/repl/f14935265f4f4953b1f9d6991f747987?version=4.2.0 |
Duplicate of #346 |
Before You File a Bug Report Please Confirm You Have Done The Following...
What version of ESLint are you using?
8.48.0
What version of
eslint-plugin-svelte
are you using?2.33.0
What did you do?
I'm using Partytown with SvelteKit based on the official guide, here's the code I have in my
+layout.svelte
:eslint-plugin-svelte
seems to get confused at the<script>
part inside the string literal; I get the following error:What did you expect to happen?
The
<script>
inside the string should be recognized as a string.What actually happened?
It seems to be confused by the
<script>
part, it may worth noting that if you changed<script>
to any other tag like<style>
here the error would go away, so the issue must be specific to<script>
.Link to GitHub Repo with Minimal Reproducible Example
Repro: https://github.com/aradalvand/eslint-plugin-svelte-bug
Go to
src/routes/+layout.svelte
— you'll see the error:Additional comments
No response
The text was updated successfully, but these errors were encountered: