Closed chase-moskal closed 5 years ago
okay i've discovered the solution, in lit-plugin's source, and also the readme
i've found i can use these configuration options to opt-out of the error reporting
"lit-plugin.skipUnknownTags": true,
"lit-plugin.skipUnknownAttributes": true,
"lit-plugin.skipUnknownProperties": true,
"lit-plugin.skipUnknownSlots": true,
"lit-plugin.skipMissingImports": true,
"lit-plugin.skipTypeChecking": true
one downside to this method is the maintainability issue — when lit-plugin
eventually adds any additional error reporting features, the above opt-out list becomes incomplete, making the additional features breaking changes
if instead, these features were opt-in, then lit-plugin
would work out-of-the-box better for more users, and any additional error reporting features could added as non-breaking progressive enhancements
for a future version of lit-plugin
, i would prefer the current opt-out options like the skip
commands to be replaced by new opt-in check
options like checkUnknownTags
and checkUnknownAttributes
— this would fix the maintainability concern, prevent breaking changes, and allow lit-plugin to "just work" seamlessly in more cases
:wave: Chase
Hey Chase,
Thanks for using this plugin! (and thanks for opening an issue) :-)
I've heard your point a couple of times before. And I agree, - lit-plugin
right now comes with a too strict default ruleset. The new version of lit-plugin
(which will go live very soon) will come with a less strict default ruleset. It's also going to be more transparent which rules are activated and which are not.
By the way, you should right now be able disable all rules at once by adding "lit-plugin.disable": true
:+1: However, this will completely disable all suggestions (including autocompletion & goto-definition), so it's perhaps not what you are looking for.
If you ONLY want syntax highlight you could also choose to go with these two extensions instead. These only provide syntax highlighting and no checking (but no support for autocompleting web components).
Thanks for your input!
If you are interested, the new version is now live (1.1.6).
The default ruleset is now much more forgiven, but I haven't yet built a way to disable all rules at the same time. However you can easily pick and choose rules to disable/enable by looking at this list: https://github.com/runem/lit-analyzer/tree/master/packages/vscode-lit-plugin :+1:
hello friend, i'm having some troubles and confusion trying to use this plugin out of the box
i am using lit-plugin to gain the benefit of syntax highlighting in my lit-element projects, lit-plugin appears to work great for that
upon installing lit-plugin, all of my custom elements are immediately reporting errors
Please consider adding it to the 'globalTags' plugin configuration or disabling the check using 'skipUnknownTags'. lit-plugin(2322)
even after i added the global tags configuration, it started to complain about my custom attributes
how can i disable this error reporting?
thanks,
:wave: Chase