Skip to content
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

option: list subclass names #148

Open
bennypowers opened this issue Nov 28, 2022 · 1 comment
Open

option: list subclass names #148

bennypowers opened this issue Nov 28, 2022 · 1 comment

Comments

@bennypowers
Copy link

We should provide an option that lists (string) subclass names, so that

export class IsReallyALitElement extends FooElement {
  /*...*/
}

lints up with our plugin

@43081j
Copy link
Owner

43081j commented Nov 28, 2022

probably can re-use the same logic eslint-plugin-wc uses:

"settings": {
  "wc": {
    "elementBaseClasses": ["MyElement"]
  }
}

one idea is that we could use the same detection as eslint-plugin-wc: look for a customElement decorator or JSDoc on the class we're in. then if we see it has a render method and makes use of html, maybe we assume its a lit element?

bit of an awkward one though, lot of guesswork 😬

may be better to just do the base class stuff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants