Skip to content

experimental-require-slot-types not working with type aliases #528

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
pawelblaszczyk5 opened this issue Jun 29, 2023 · 0 comments · Fixed by #530
Closed
2 tasks done

experimental-require-slot-types not working with type aliases #528

pawelblaszczyk5 opened this issue Jun 29, 2023 · 0 comments · Fixed by #530

Comments

@pawelblaszczyk5
Copy link
Contributor

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?

8.43.0

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

2.32.0

What did you do?

Configuration
{
	"svelte/experimental-require-slot-types": "error"
}
<script lang="ts">
	type $$Slots = {
		default: Record<string, never>;
	};
</script>

<slot />

What did you expect to happen?

Rules should be satisfied because RFC and Svelte language server works with type aliases as well. The declarations are correctly picked up and enforced by language server.

What actually happened?

1:2 error The component must define the $$Slots interface svelte/experimental-require-slot-types

Link to GitHub Repo with Minimal Reproducible Example

https://github.com/pawelblaszczyk5/svelte-eslint-bug-reproduction

https://sveltejs.github.io/eslint-plugin-svelte/playground/#eJwljEEKhDAQBL/SDB4F7xp9hF5zkWQUISSSmV0Q8e87spemu2jqplAiU09OQj1ORVrzPnpS8TT5DOh1MppmSUUFI+6XAZG39ZO0x8yh1OhE65H3Fpm/XKfhPT2WrvtbzWRDzIHOOj0/Ngon2w==

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
Development

Successfully merging a pull request may close this issue.

1 participant