Skip to content

Backtick string literals not recognized for svg property #1284

@TehShrike

Description

@TehShrike

Example:

<g>
	<slot />
</g>
	
<script>
export default {
	namespace: `svg`
}
</script>

Error message:

The 'namespace' property must be a string literal representing a valid namespace

REPL Reproduction: https://svelte.technology/repl?version=1.58.4&gist=f0ea73178d7664c8de272e0efbc3d9de

This affects me because I started using my autoformatting script in Svelte components, and this article seemed reasonable to me: https://ponyfoo.com/articles/template-literals-strictly-better-strings

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions