Skip to content

no-unused-props reports false positive #1159

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

Closed
2 tasks done
baseballyama opened this issue Mar 26, 2025 · 0 comments · Fixed by sveltejs/svelte-eslint-parser#692
Closed
2 tasks done

no-unused-props reports false positive #1159

baseballyama opened this issue Mar 26, 2025 · 0 comments · Fixed by sveltejs/svelte-eslint-parser#692

Comments

@baseballyama
Copy link
Member

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

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