Skip to content
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

use const for props in default components #1

Merged

Conversation

tim-quebic
Copy link
Contributor

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
Copy link
Owner

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
Copy link
Contributor Author

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: sveltejs/svelte#5892

@nathanfaucett
Copy link
Owner

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

@tim-quebic
Copy link
Contributor Author

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

@nathanfaucett nathanfaucett merged commit 96d7247 into nathanfaucett:main Apr 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants