runem / lit-analyzer

Monorepository for tools that analyze lit-html templates
MIT License
319 stars 36 forks source link

no-incompatible-type-binding false positives on valid html code #318

Open davidkron opened 1 year ago

davidkron commented 1 year ago

lit-analyzer complains about a no-incompatible-type-binding problem on this perfectly fine code:

<button value="myvalue" formmethod="dialog">Confirm</button>

lit-analyzer problem description:

Type '"dialog"' is not assignable to '"GET" | "POST"'
323:  ton value="myvalue" formmethod="dialog">Confirm</b
no-incompatible-type-binding

Another use-case where the case-sensitivity of HTML is not considered:

<form action="" method="post">

lit-analyzer problem description:

Type '"post"' is not assignable to '"GET" | "POST" | "dialog"'
364:  <form action="" method="post">
no-incompatible-type-binding

See this example code sandbox that demonstrates the problem: https://codesandbox.io/p/sandbox/nostalgic-newton-f8fk86