Closed justinfagnani closed 3 years ago
@aomarks I had to modify two more rules to ignore element expressions. I've tested this in VS Code and lit-html 1.x directives now have no errors in element expressions. Fixing directive detection is the next priority. PTAL at the last commit?
@aomarks I had to modify two more rules to ignore element expressions. I've tested this in VS Code and lit-html 1.x directives now have no errors in element expressions. Fixing directive detection is the next priority. PTAL at the last commit?
LGTM
This adds support for expressions in "element position":
These expressions are written in attribute name position, so a number of assumptions in the code base change. We need to generate unique substitutions so that multiple element expressions per element are supported. We also need to use the attribute name location object in several places because the attribute assignment location object doesn't exist. And we need a new assignment type to differentiate between element expressions and unbound boolean attributes.
This PR doesn't not update
isLitDirective()
to detect Lit 2 directive results. That's a follow-on task and when that's done this should be updated to only only Lit 2 directives and not lit-html 1.x directives.cc @43081j and @aomarks I can't add you as reviewers, but your feedback would be very appreciated!