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

bug: no-unused-props fails with nested object type #1142

Closed
2 tasks done
AlbertMarashi opened this issue Mar 18, 2025 · 3 comments · Fixed by #1143
Closed
2 tasks done

bug: no-unused-props fails with nested object type #1142

AlbertMarashi opened this issue Mar 18, 2025 · 3 comments · Fixed by #1143

Comments

@AlbertMarashi
Copy link

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.22.0

What version of eslint-plugin-svelte are you using?

3.3.1

What did you do?

<script lang="ts">
import GenericPopout from "./GenericPopout.svelte"

let {
    position,
}: {
    position: {
        x: number,
        y: number
    },
} = $props()

</script>

<GenericPopout position={position}>
    Test
</GenericPopout>

What did you expect to happen?

No error

What actually happened?

  7:5  error  'x' in 'position' is an unused property  svelte/no-unused-props
  7:5  error  'y' in 'position' is an unused property  svelte/no-unused-props

Link to GitHub Repo with Minimal Reproducible Example

https://github.com/AlbertMarashi/svelte-eslint-repl

Additional comments

Version 3.1.0 worked, version 3.2.0 broke it

@AlbertMarashi
Copy link
Author

3.3.1 is also broken

@baseballyama
Copy link
Member

This issue has been fixed in v3.3.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants