#Idea: A #Chrome extension which detects any `<skewer-case />` elements on a web page which are _not_ upgraded web components and logs them to the console (maybe after a 3 second timeout for lazy loading).
Might be a useful debugging tool for simple typos of tag names. I find myself making that mistake all the time and it's frustrating because there is fundamentally no error from it, just nothing happens.
@develwithoutacause have you had any luck with linting in this area. Our set up calls out unregistered tag names in JS files. Not much help for HTML, but gets the majority of our usage. There are sometimes false negatives, for lazy loading and the like, but it feels helpful.
@westbrook My use case is very #HTML-centric, though I'm exploring how to share type definitions in useful ways specifically in this area.
https://techhub.social/@develwithoutacause/110012696670194278
@develwithoutacause Have you looked into Custom Elements Manifest? https://github.com/webcomponents/custom-elements-manifest Powers some similar tools in other contexts.
@westbrook I'm familiar with it, but didn't think about it here. I didn't realize that also included attribute names.
Something might be workable here, though it seems a bit heavyweight for what I'm looking for (a component's runtime and it's prerender logic don't have obvious typos). I was hoping for something more in the #TypeScript layer like `HTMLElementTagNameMap`.
That said, I could potentially generate a manifest for a component, convert it to some typing file, and then consume that to type check the rendering code. Not sure how well editors will respect this if the manifest file is generated at build time per-component in some random directory somewhere.
@develwithoutacause I think @matsuuu is using CEM in Web Component Dev Tools for similar sounding things. Maybe he’s got some insights?
@westbrook @develwithoutacause
Web Component Devtools actually reports undefined (not defined through customElements.define) components. It also informs about hydration of elements (pic 2)
FWIW the Custom Elements Language Server I'm working on (trying to release beta when I have the time), scans through your project and sees if you have imported a custom element definition in the scope of a script file, throwing a warning if not
@matsuuu @westbrook @develwithoutacause What do you mean by hydration exactly? An element being upgraded once defined? or something different?
@tbroyer @westbrook @develwithoutacause
In the case of WCDT, by hydration I mean that an element was not defined in the first rounds of scans, but was defined/upgraded later on