You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As far as I can see, this plugin does not further lint the svg function input from lit.
But the rules that apply to the html syntax should also be appliable for svg from my point of view.
When looking at the code, then it seems to me that getting it to work at all, would require to not only check for html, but also for svg:
Of course there is more to it, as it should be configurable if a rule should apply for both or only one.
Furthermore, I have not tested it, so this might not even work.
Is there any interest in extending eslint-plugin-lit to also lint code like:
I am also open to contribute here, but I would need some guidance as to what configuration options should be part of the first version and if you see any trouble ahead with reusing the already existing linting rules :)
introduce a isTemplateNode(context: Context, node: ESTree.Node): node is ESTree.TaggedTemplateExpression util to replace all the places we manually check the expression's tag name/type
have that function check for context.settings.lit.templateNames (very safely, i.e. null check the whole thing and check that its definitely an array), which falls back to ['svg', 'html']
As far as I can see, this plugin does not further lint the
svg
function input fromlit
.But the rules that apply to the
html
syntax should also be appliable forsvg
from my point of view.When looking at the code, then it seems to me that getting it to work at all, would require to not only check for
html
, but also forsvg
:Of course there is more to it, as it should be configurable if a rule should apply for both or only one.
Furthermore, I have not tested it, so this might not even work.
Is there any interest in extending
eslint-plugin-lit
to also lint code like:The text was updated successfully, but these errors were encountered: