runem / lit-analyzer

Monorepository for tools that analyze lit-html templates
MIT License
314 stars 35 forks source link

Tags in node_modules/@types/react are reported as invalid #322

Open Artur- opened 10 months ago

Artur- commented 10 months ago

WIth the lit plugin installed, when you open a file that imports React you will see a lot of errors

image

There are two issues here:

  1. It reports errors for files in node_modules. Not really helpful because those are not my files
  2. It reports nonsense errors. Those tags are not referring to custom elements
enkelmedia commented 2 months ago

I have the same issue, tried a lot of stuff:

image

In this case, the project is not even a project that contains Lit which is strange. It would be nice if:

  1. The analyzer is only active for Lit-projects
  2. There was a way to exclude files from the checks.

I ended up trying to disable the plugin for the workspace: In .vscode/settings.json

{
    "lit-plugin.disable": true
}

That did not work, so last resort:

image