-
-
Notifications
You must be signed in to change notification settings - Fork 57
Closed
Description
Before You File a Bug Report Please Confirm You Have Done The Following...
- I have tried restarting my IDE and the issue persists.
- I have updated to the latest version of the packages.
What version of ESLint are you using?
9.36.0
What version of eslint-plugin-svelte
are you using?
3.12.4
What did you do?
Configuration
The default configuration after creating a svelte app with npx sv create project_name
and choosing typescript and eslint.
<!--Test.svelte-->
<script lang="ts">
interface Props {a: string;}
let { a, b }: Props = $props();
</script>
{a}
{b}
<!--Test1.svelte-->
<script lang="ts">
import Test from '$lib/Test.svelte';
interface Props {a: string;}
let props: Props = $props();
</script>
<Test {...props} />
On the Test1.svelte
component props will have the following error:
'a' is an unused Props property svelte/no-unused-props
Changing to [email protected]
makes the error go away.
Thank you!
What did you expect to happen?
It shouldn't give an error because "a"
is in props
and props is being spread to <Test1>
.
What actually happened?
'a' is an unused Props property svelte/no-unused-props
Link to GitHub Repo with Minimal Reproducible Example
https://github.com/machadinhos/no-unused-props-bug-demo
Additional comments
No response
Metadata
Metadata
Assignees
Labels
No labels