43081j / eslint-plugin-wc

ESLint rules for Web Components
MIT License
95 stars 10 forks source link

Possibly update no-constructor-params rule to allow optional params #53

Open 43081j opened 3 years ago

43081j commented 3 years ago

You could in theory have constructor parameters as long as they are optional:

class Foo extends HTMLElement {
  constructor(a?: string, b?: string) {
    // fine
  }
}

We could update the rule to check for this and allow it