runem / lit-analyzer

Monorepository for tools that analyze lit-html templates

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

Artur- opened this issue · comments

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

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

  • Exclude node_modules from tsconfig.json (did not work)
  • Exclude node_modules from the VS Code Workspace (did not work).

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