Skip to content

svelte/no-useless-mustaches breaks on string literals containing quotes #1139

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

Closed
2 tasks done
seanlail opened this issue Mar 17, 2025 · 1 comment · Fixed by #1140
Closed
2 tasks done

svelte/no-useless-mustaches breaks on string literals containing quotes #1139

seanlail opened this issue Mar 17, 2025 · 1 comment · Fixed by #1140

Comments

@seanlail
Copy link

Before You File a Bug Report Please Confirm You Have Done The Following...

  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest version of the packages.

What version of ESLint are you using?

9.22.0

What version of eslint-plugin-svelte are you using?

3.2.1

What did you do?

I've tried a few combinations and the linter always try to fix and then break it.

<Example props="{'Text with "quoted text" breaks'}" />

What did you expect to happen?

I expect it the linter to be happy with that

What actually happened?

Linting failed and then running with fix resulted in this (which is broken):

<Example props="Text with "quoted text" breaks" />

Link to GitHub Repo with Minimal Reproducible Example

https://eslint-online-playground.netlify.app/#eNq1VEuP0zAQ/iuWLwtVm9y7C0KC5YbgwA1zCMk0uOvYxnaWrqr8d8avPNqqIFZ7SeKZ75vH55kcqTV1+enpveq0kiBdYR9BOKBbemdrw7UjopLtG0adZfQtk4RwRBpH7g9VpwWQnVEdYbQokyEFYPSWybsyxkAeHjJDG6Ux4PHmKxwc+c3dT+T/6pWDhjg0MUp+GKge7M2AnyWS6TqUucxwpUQ4hBIFuJBsS6wzXLanFR29c8DgYAXH1msld7wt9hZDpy73Njf4LoLKPSbBQMkfS/ki+pbLjIzAjQ7GzUyOJacyFkzmRNsmU4NvznE2ujLePWmInSROAKe+G9hVvZhIqbFXXpq9TSdbGKhV14FsoFl7V1EUJ4yLmHnLGfeN0Z2oXDmDM/o9MI7+QciOC7BbgsDVqlyNQ7LGXqZTZJBwn33VwmftuJJIS0EIicrghc40TKTsPCdNtJmJoDxbf69nUpZZ/jEwIcPsG0fUVB+xn/uDA2ljMmzsrI2JNvhXPFzTA/VfShIML67KeOvR8N/V+9VYVO8Nz6p+zPz6FtdUV/UDRsCwSuKKhgBxFRj1V9mpphd+qKKjgccPoP0wypoDljLmXG6zp+LwgsUlSnnzEl91nm74Reg/OE+3/iJ0mtK/AsY/whwXhGRyoMMf5kH8bQ==

Additional comments

No response

@baseballyama
Copy link
Member

This issue is fixed in v3.3.1.

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

Successfully merging a pull request may close this issue.

2 participants