runem / lit-analyzer

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

no-invalid-directive-binding on asyncReplace is a false positive? #252

Open lucaelin opened 2 years ago

lucaelin commented 2 years ago

First of all: Thank you so much for all your work and effort! I've been playing around with generators lately and noticed that lit-analyzer considers certain directives an error when used in certain contexts. In my case I was using the asyncReplace-directive on some custom-element properties. AFAICT this is supported by lit (at least in version 2 it is), because I was seeing the correct results in my project.

I've created a small project to replicate the error and a working use of the directive in a property-binding: https://github.com/lucaelin/lit-lint-issues/blob/main/issue-async-directives.js (please ignore the template-binding stuff, as it is related to a different issue in a different project)

Kind regards!