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

Enforce tags in test configuration

Open Firefds opened this issue 1 year ago • 1 comments
trafficstars

I would love to have a new optional rule where I could enforce tests having the new tag configuration, maybe even having including a tagMustMatch option (same as in playwright/valid-title).

Firefds avatar Feb 28 '24 18:02 Firefds

@Firefds I would recommend using the mustNotMatch option of the valid-title rule which you could configure to ensure that @tag syntax is not used in titles.

Regarding a rule to enforce specific tag names in the new syntax, I would suggest this be a change that is made at the type level using module augmentation in TypeScript. This isn't something possible with the current version of the Playwright types, but it's something you could ask the Playwright team to see if they would be open to making it possible.

mskelton avatar Feb 29 '24 21:02 mskelton