Skip to content

no-unused-props reports false positive #1159

Closed
sveltejs/svelte-eslint-parser
#692
@baseballyama

Description

@baseballyama

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

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

3.3.3

What did you do?

Configuration
<!-- Paste your configuration here -->
<script lang="ts">
	type Props = {
		foo: string;
	};

	const props: Props = $props();
	console.log(props);
</script>

What did you expect to happen?

No lint error

What actually happened?

Image

Link to GitHub Repo with Minimal Reproducible Example

<script lang="ts">
  interface Props {
    foo: string;
  }
  const props: Props = $props();

  console.warn(props);
</script>

Additional comments

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions