For the most part this just works, but functions within tagged markup get weird indent assertions, e.g.,
${collection.map((item) => {
const { prop1, prop2 } = workWith(item); // eslint: expected indentation of 4 but found 10 (indent)
return html` // eslint: expected indentation of 4 but found 10 (indent)
<${Widget} prop1=${prop1} prop2=${prop2} />
`;
})} // eslint: expected indentation of 2 but found 8 (indent)
So I'd request an eslint plugin where you could specify the name of the template function, and make the linter comprehend it, or directions to the resources I'd need to implement one.
The text was updated successfully, but these errors were encountered:
I found eslint-plugin-lit, which works, albeit by disabling lit/binding-positions (👍 ) and lit/no-invalid-html (😢 ). It doesn't fix the indent comprehension, though. If anyone has any further tips, I'd love to hear 'em.
For the most part this just works, but functions within tagged markup get weird indent assertions, e.g.,
So I'd request an eslint plugin where you could specify the name of the template function, and make the linter comprehend it, or directions to the resources I'd need to implement one.
The text was updated successfully, but these errors were encountered: