lit-analyzer
lit-analyzer copied to clipboard
Tags in node_modules/@types/react are reported as invalid
WIth the lit plugin installed, when you open a file that imports React you will see a lot of errors
There are two issues here:
- It reports errors for files in
node_modules
. Not really helpful because those are not my files - 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).
In this case, the project is not even a project that contains Lit which is strange. It would be nice if:
- The analyzer is only active for Lit-projects
- 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: