43081j / eslint-plugin-lit

lit-html support for ESLint
115 stars 20 forks source link

fix: restrict quoted-expressions rule to attribute bindings #167

Closed 43081j closed 1 year ago

43081j commented 1 year ago

We were incorrectly matching things like:

html`
  <div>${expr}</div>
`;

As needing quotes when always was set (and not needing quotes when it wasn't set).

We now detect whether we're scanning an attribute binding or not, and limit to those expressions.

Fixes #165