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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: handle type aliases for $$Slots and $$Events related rules #530

Merged
merged 4 commits into from Jun 30, 2023

Conversation

pawelblaszczyk5
Copy link
Contributor

Hello 馃憢

Currently these two rules experimental-require-strict-events, experimental-require-slot-types which assert existence of $$Slots/$$Events handles interface declarations only. However, Svelte Language Server works with type aliases as well. I added an option that will catch them when they're declared as type aliases. I also added failing tests, before implementing fixes.

I'm also wondering whether the wording e.g. The component must define the $$Slots interface should be adjusted?

Closes #528

@changeset-bot
Copy link

changeset-bot bot commented Jun 30, 2023

馃 Changeset detected

Latest commit: 81c5363

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
eslint-plugin-svelte Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Member

@ota-meshi ota-meshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fix looks good to me! Thank you!

@ota-meshi ota-meshi merged commit c584404 into sveltejs:main Jun 30, 2023
12 checks passed
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 this pull request may close these issues.

experimental-require-slot-types not working with type aliases
2 participants