-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: require custom elements be registered on HTMLElementTagNameMap #73
Comments
Great idea, I love this rule! This would be possible to implement after the performance branch has been finished which includes the new version of |
Edit: Ignore this comment
// my-element.ts
/**
* @fires my-event {MyEventDetail}
*/
export class MyEvent extends LitElement { ... } // main.ts
html`
<!-- type checking happens here -->
<my-element @my-event=${this.onMyEvent}></my-element>
...
`;
onMyEvent(e: MyEventDetail) { ... } |
+1 to checking events (I believe there's an event map as well, though it's not element-specific), but that should be a different issue IMO |
will file |
I'm currently working on this branch: https://github.com/runem/lit-analyzer/tree/1.2.0 which should be able to support building this rule :-) Lately I have been caught up in |
oh wow I'm dumb; I totally read this as Custom Events not Custom Elements haha >.< issue filed on #85 |
I just implemented the rule on 1.2.0 :-) The rule is called |
That quickfix is awesome!! |
Awesome! |
Sorry I take it back, it is working now. Not sure what happened there! |
A pass that would diagnose when a custom element is recognized in source code but it hasn't be declared on the HTMLElementTagNameMap, or if it is declared with the wrong tag name. For example:
Warns:
Warns:
Does not warn:
The text was updated successfully, but these errors were encountered: