Skip to content

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

Closed
@lishaduck

Description

@lishaduck

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions