Skip to content

Don't emit "svelte/no-useless-mustaches" on multiline template literals #1036

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
lishaduck opened this issue Jan 20, 2025 · 0 comments · Fixed by #1040
Closed

Don't emit "svelte/no-useless-mustaches" on multiline template literals #1036

lishaduck opened this issue Jan 20, 2025 · 0 comments · Fixed by #1040
Labels
enhancement New feature or request

Comments

@lishaduck
Copy link

Description

I have a component that wraps textarea with Markdown support. Because I can't pass strings to children (is that true? I'm new to Svelte), I had to make a value prop.
When I pass a markdown string in, I get a svelte/no-useless-mustaches warning, but the mustache isn't useless as the template literal allows me to make it multiline.

<HyperMD value={`# Doc

Text goes here`} />

I know I could just move it, but I feel like the rule is wrong here, the mustache isn't useless.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
1 participant