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
When using the prefer-web-first-assertions rule, I encountered a confusing lint error:
error Replace toString() with undefined() playwright/prefer-web-first-assertions
This happens when calling expect(await locator.toString()).toBe(...) or similar, where the method (toString) is not in the rule’s supported methods list.
Expected Behavior
The rule should ignore or skip unsupported methods (like toString) and not report an error or suggest an invalid fix.
Actual Behavior
The rule tries to access properties on an undefined methodConfig, resulting in a message like "Replace toString() with undefined()". This is confusing and not actionable.