sveltejs / eslint-plugin-svelte

ESLint plugin for Svelte using AST
https://sveltejs.github.io/eslint-plugin-svelte/
MIT License
290 stars 33 forks source link

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

Closed pawelblaszczyk5 closed 1 year ago

pawelblaszczyk5 commented 1 year ago

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[bot] commented 1 year ago

🦋 Changeset detected

Latest commit: 81c5363a89c5d9b48a6105f17be58d681d98ee26

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