You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems at the very least the plugin has trouble detecting callExpressions on HTMLElements.
/* This errors as expected with:HTMLElement.attachInternals() is not supported in iOS Safari 15.6-15.8eslint[compat/compat](https://github.com/amilajack/eslint-plugin-compat/blob/master/docs/rules/compat.md)*/globalThis.HTMLElement.attachInternals();/* None of these cases error despite clearly either:* a) extending the `HTMLElement` object interface or * b) straight up being an instance of HTMLElement */constx=globalThis.HTMLElement;newx().attachInternals();constfoo=document.createElement('custom-element');foo.attachInternals();classyextendsHTMLElement{constructor(){this.attachInternals();}}newy().attachInternals();
Looking through the source code, it seems like the algorithm we're using to match for failing rules in lintMemberExpression isn't able to match failingRules on these cases.
The expected rule.object here is HTMLElement, rule.property attachInternals()
The evaluated node object name is foo, node property attachInternals()
This fails the failingRule check on line 170
The expected protochainId here is HTMLElement.attachInternals() the evaluated protochainId is attachInternals()
It seems we're unable to evaluate / not evaluating the superclass of the ClassDeclaration represented by the ThisExpression. This fails the failingRule check on line 156
Notably I get the same issue with other callexpressions on HTMLElement such as hidePopover and showPopover
Though given the above examples I've given, this may be a larger problem with matching failing rules on memberExpressions.
I've created a minimal reproduction case here.
This leverages the latest version of this package with eslint@8.57.1, notably the same issue occurs with eslint@9.23.0
The text was updated successfully, but these errors were encountered:
It seems at the very least the plugin has trouble detecting callExpressions on HTMLElements.
Looking through the source code, it seems like the algorithm we're using to match for failing rules in lintMemberExpression isn't able to match failingRules on these cases.
The expected rule.object here is HTMLElement, rule.property
attachInternals()
The evaluated node object name is
foo
, node propertyattachInternals()
This fails the failingRule check on line 170
The expected
protochainId
here isHTMLElement.attachInternals()
the evaluated protochainId isattachInternals()
It seems we're unable to evaluate / not evaluating the superclass of the
ClassDeclaration
represented by theThisExpression
. This fails the failingRule check on line 156Notably I get the same issue with other callexpressions on HTMLElement such as hidePopover and showPopover
Though given the above examples I've given, this may be a larger problem with matching failing rules on memberExpressions.
I've created a minimal reproduction case here.
This leverages the latest version of this package with
eslint@8.57.1
, notably the same issue occurs witheslint@9.23.0
The text was updated successfully, but these errors were encountered: