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
too strict "warn for possible use of component without uppercase tag name (#5302)" #5570
Comments
What would you suggest changing the heuristics to? Keep in mind that we cannot tell what's in the imported file. |
Seeing the warning in my app I opened the PR I assuming there was an array of "valid" elements (such as listed here: https://developer.mozilla.org/en-US/docs/Web/HTML/Element) but it only checks elements against imported names. No problem with that. It just causes the issued behaviour. Would it be a good idea to create such a list of valid elements? Or check against such a list as well to filter out false positives? The downside would be that it is basically an evergrowing list and it would add rather unncecessary weight to the compiler (since the checks against that list would only be for positives). |
I have no issue with closing this if it doesn't affect anybody else. |
I import <time ignore:component-name-lowercase>{time}</time> |
@ziggi You can use comments to ignore the warning: https://svelte.dev/docs#Comments In this case you want to use:
|
@hmt oh, thanks. |
Describe the bug
PR #5302 is too strict and will warn on any import that bears an html element name
To Reproduce
https://svelte.dev/repl/e29cafcb75874c8082a849ffbdd65dc1?version=3.29.4
It should only warn on real components.
The text was updated successfully, but these errors were encountered: