svelte
svelte copied to clipboard
Named slots breaks svelte-ignore comments
Describe the bug
When adding a named slot to an element, the svelte-ignore comment does not work.
Reproduction
Run svelte-check
Error:
<!-- svelte-ignore a11y-click-events-have-key-events -->
<div slot="content" on:click />
Works:
<!-- svelte-ignore a11y-click-events-have-key-events -->
<div on:click />
Expected behaviour
I would expect svelte-ignore comments to also apply to named slot elements.
System Info
- OS: Windows
- IDE: VSCode
- "svelte-check": "2.9.2"
Which package is the issue about?
None
Additional Information, eg. Screenshots
Seems like a bug so I retain the bug tag before the transfer. It seems to be related to the svelte:fragment
implementation
Ignore comment works on the element with slot attribute in 3.34 https://svelte.dev/repl/24a2b8854bbb46c58358c5ade09c8d50?version=3.34.0
But not in the 3.35 or the latest. https://svelte.dev/repl/24a2b8854bbb46c58358c5ade09c8d50?version=3.35.0 https://svelte.dev/repl/24a2b8854bbb46c58358c5ade09c8d50?version=3.53.1
This should be fixed in 3.55.1 - https://svelte.dev/repl/24a2b8854bbb46c58358c5ade09c8d50?version=3.55.1