-
Notifications
You must be signed in to change notification settings - Fork 39
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
no-incompatible-type-binding on HTML role Attribute too restrictive #89
Comments
Thanks for reporting this bug! In order to fix this I have to come op with a solution where the "whitespace-separated-string-literal-union"-type can be type checked using both a custom type and custom type checking logic. This will have to include these 2/3 attributes (there might be more):
The type checker will have to split the value by whitespace, check that there are no duplicates and make sure that all values in the list are assignable to the string literal union. |
Would it be possible to apply this to user-defined attributes too? |
If we specify multiple roles on an html element like
<div role="button listitem"></div>
lit-analyzer surfaces an error because it tries to match the role attribute to exactly ONE role. However, the spec allows for a list of roles. I tried to dig into the code a little bit and it seems lit-analyzer gets part of this logic from
vscode-html-languageservice
But perhaps is being too strict or using it incorrectly.The text was updated successfully, but these errors were encountered: