Consider this example:
<RouterLink :to="action as string" class="mx-2 bg-red-400">My Link</RouterLink>
Syntax highlighting is breaking for the " class=" -- basically from the end quote through the starting quote of the next attribute of that tag/component.
Wrapping the expression in () fixes this, but then Prettier removes the unnecessary parenthesis.
Using :to="<string>action" works, but I tend to avoid that syntax option (for consistency, and because <> inside attributes feels wrong even though it's legal).
- This is not limited to string, it's any cast.
- The problem presents for any bound attribute/prop.
- Still happens if the next attribute is wrapped to the next line