-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
Generic declarations in components not recognized by ESLint #521
Generic declarations in components not recognized by ESLint #521
Comments
|
As for adding support for |
I'm not sure I understand. Is this a |
eslint-plugin-svelte3 and eslint-plugin-svelte are completely separate packages. eslint-plugin-svelte3 does not use svelte-eslint-parser. If you want immediate support, please submit a pull request. |
I hit this problem as well. Is there a workaround for now? |
The workaround is just not using it and going back to |
I took a brief look and think it looks like I am also not sure how "set in stone" this generics-declaration-by-attributes is, considering it is a PR on svelte repo atm, as well as this warning on svelte.dev |
If you just want to avoid the https://eslint.org/docs/latest/use/configure/language-options#using-configuration-files-1 |
Follow sveltejs/svelte-eslint-parser#306 on this subject. I will lock this thread. |
Before You File a Bug Report Please Confirm You Have Done The Following...
What version of ESLint are you using?
8.43.0
What version of
eslint-plugin-svelte
are you using?2.10.1
What did you do?
Configuration
What did you expect to happen?
That ESLint would be able to interpret the symbol
T
What actually happened?
ESLint is not able to interpret the symbol
T
:Link to GitHub Repo with Minimal Reproducible Example
playground
Additional comments
Note that this is not an issue in eslint-plugin-svelte3.
Also don't know if
generic="T"
attribute ortype T = $$Generic
declaration is the preferred way of dealing with generics in components, but both seem to not work.The text was updated successfully, but these errors were encountered: