nathanfaucett / svelte-slate

slate svelte view layer
https://nathanfaucett.github.io/svelte-slate/
Apache License 2.0
61 stars 5 forks source link

use const for props in default components #1

Closed tim-quebic closed 2 years ago

tim-quebic commented 2 years ago

The element and leaf props in DefaultElement and DefaultLeaf respectively were causing warnings because they were unused vars.

I changed them to const and set default values.

nathanfaucett commented 2 years ago

I get this warning in the browser <DefaultLeaf> was created with unknown prop 'leaf', I think it would be better to use // svelte-ignore unused-export-let above each instead to just to suppress the warning

tim-quebic commented 2 years ago

I get this warning in the browser <DefaultLeaf> was created with unknown prop 'leaf', I think it would be better to use // svelte-ignore unused-export-let above each instead to just to suppress the warning

Unfortunately I don't think this works, see here: https://github.com/sveltejs/svelte/issues/5892

nathanfaucett commented 2 years ago

It does for me, just tried it locally, maybe they fixed it in another PR

tim-quebic commented 2 years ago

It does for me, just tried it locally, maybe they fixed it in another PR

maybe it's just svelte-kit that doesn't respect // svelte-ignore? i think that's fine. i updated the branch to use // svelte-ignore