Closed mjbvz closed 5 years ago
Below is a full example.
Generates error for template_c:
[ts-styled-plugin] colon expected
import {html} from '@polymer/lit-element';
const style = "color:red";
const template_a = html`<div style="color:red"></div>`;
const template_b = html`<div style="${style}"></div>`;
const template_c = html`<div
style="${style}"></div>`;
This has been annoying me recently. I think we need an option to turn off linting all together until the linters can correctly handle expressions.
From @ncodefun on July 15, 2018 21:32
I'm reporting this here since it's this plugin that reports the error, but the context is that I work with lit-html and the vscode-lit-html extension ... So I have this:
This only happens with the style attribute, and only when the template string is multi-line. Tried with other styles before or after the expression and it doesn't work either (I thought maybe it looks for at least one colon/semi-colon pair).
Copied from original issue: Microsoft/typescript-styled-plugin#64