eslint-plugin-wc icon indicating copy to clipboard operation
eslint-plugin-wc copied to clipboard

Enhance `wc/guard-super-call` with fix

Open stramel opened this issue 3 years ago • 0 comments

It should be relatively simple to add a fix for wc/guard-super-call

Take a simple error state such as:

connectedCallback() {
  super.connectedCallback();
  this.setAttribute('bar', 'baz');
}

and change it to this:

connectedCallback() {
  if (super.connectedCallback) {
    super.connectedCallback();
  }
  this.setAttribute('bar', 'baz');
}

stramel avatar May 17 '21 23:05 stramel