Skip to content

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

Closed
@AlbertMarashi

Description

@AlbertMarashi

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions