Ensure no lifecycle methods or known custom element properties are misspelt.
This rule detects common misspellings, particularly of lifecycle methods:
- connectedCallback
- adoptedCallback
- disconnectedCallback
- attributeChangedCallback
It also detects misspellings of the following known properties:
- observedAttributes
The following patterns are considered warnings:
class Foo extends HTMLElement {
connectCallback() {}
disconnectCallbackk() {}
adoptCallback() {}
}
The following patterns are not warnings:
class Foo extends HTMLElement {
connectedCallback() {}
disconnectedCallback() {}
adoptedCallback() {}
}
If you wish to name your methods/properties very similarly to those with special meaning in the web component spec, you should not use this rule.