-
-
Notifications
You must be signed in to change notification settings - Fork 48
@typescript-eslint/no-unused-vars
: Do not report reserved interfaces
#348
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
Comments
Thank you for posting issue. I think the parser needs to be fixed to make no-unused-vars work. The RFC hasn't been merged yet, so I think it should be an option as an experimental feature. |
For now I'm using following configuration in '@typescript-eslint/no-unused-vars': [
'warn',
{ varsIgnorePattern: '^\\$\\$(Props|Events|Slots)$' },
], |
What about $$Generic? |
Welcome pull request |
Not directly related, but how to handle imported stores? This throws no-unused-vars:
|
I am closing this as it is irrelevant with Svelte 5 - generics are handled differently and slots and events are deprecated, so it probably isn't worth it supporting these... |
Description
Hi, as per this RFC, the interface names
$$Props
,$$Events
,$$Slots
are reserved and have a special meaning inside a svelte component. Therefore, they probably shouldn't be reported by@typescript-eslint/no-unused-vars
.The text was updated successfully, but these errors were encountered: