Skip to content

Mark several recommended Playwright rules as error instead of warning - #202

Merged
rajsite merged 3 commits into
mainfrom
playwright-rules
Nov 18, 2026
Merged

rajsite merged 3 commits into
mainfrom
playwright-rules

Conversation

@jattasNI

@jattasNI jattasNI commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

Justification

While investigating a suggestion to enable a new Playwright rule I noticed that several existing recommended rules are marked as warnings rather than errors. We have a policy of avoiding warnings because they are easily ignored.

Implementation

These rules all seem reasonable to me so I propose enabling them as errors. Check out the rule comments for more info.

Some of the rules are only available in a newer edition of the ruleset so I'm bumping the peer dependency version.

The remaining three recommended rules I'm not enabling are stylistic. I'm open to opinions about enforcing them or turning them off.

Testing

I locally built the package and tested it against the Skyline Web acceptance tests. Most of the rules are already being obeyed but it identified 11 new failures.

  • 9 no-wait-for-selector errors in FeedManager, for example these are waiting and then asserting, which is redundant.
  • 2 no-conditional-expect errors in SystemsManagement, for example this if/else which is at a minimum hard to reason about and possibly also failing to hit one of the assert cases

@jattasNI
jattasNI marked this pull request as ready for review November 18, 2026 22:01
@jattasNI
jattasNI requested a review from rajsite as a code owner November 18, 2026 22:01
@rajsite
rajsite merged commit c434ecb into main Nov 18, 2026
5 checks passed
@rajsite
rajsite deleted the playwright-rules branch November 18, 2026 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants