lit-analyzer icon indicating copy to clipboard operation
lit-analyzer copied to clipboard

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

Open Artur- opened this issue 1 year ago • 1 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

Artur- avatar Sep 14 '23 06:09 Artur-

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

enkelmedia avatar Apr 22 '24 15:04 enkelmedia