From 3dd69ecfc019581b75127f0d1b3a160fc322052d Mon Sep 17 00:00:00 2001 From: silverwind Date: Sun, 15 Feb 2026 11:43:32 +0100 Subject: [PATCH] Add playwright/no-raw-locators eslint rule for e2e tests Forbid page.locator() in favor of semantic locators like getByRole, getByLabel, getByText. Co-Authored-By: Claude Opus 4.6 --- eslint.config.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/eslint.config.ts b/eslint.config.ts index 3020c757ca..d3f5129fa5 100644 --- a/eslint.config.ts +++ b/eslint.config.ts @@ -913,6 +913,7 @@ export default defineConfig([ files: ['tests/e2e/*.test.ts'], rules: { ...playwright.configs['flat/recommended'].rules, + 'playwright/no-raw-locators': [2], }, }, {