From 42ec23def5e4921aac33bab5d14c19d3d68ad450 Mon Sep 17 00:00:00 2001 From: Andrew Kazakov Date: Mon, 28 Jul 2025 17:57:51 +0300 Subject: [PATCH] fix(valid-test-tags): disallow extra properties in rule options and add to recommended --- src/index.ts | 1 + src/rules/valid-test-tags.ts | 12 ++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index 67d6de47..0101521a 100644 --- a/src/index.ts +++ b/src/index.ts @@ -135,6 +135,7 @@ const sharedConfig = { 'playwright/valid-describe-callback': 'error', 'playwright/valid-expect': 'error', 'playwright/valid-expect-in-promise': 'error', + 'playwright/valid-test-tags': 'error', 'playwright/valid-title': 'error', }, } as const diff --git a/src/rules/valid-test-tags.ts b/src/rules/valid-test-tags.ts index 0a22df73..8e543da4 100644 --- a/src/rules/valid-test-tags.ts +++ b/src/rules/valid-test-tags.ts @@ -142,7 +142,11 @@ export default createRule({ items: { oneOf: [ { type: 'string' }, - { properties: { source: { type: 'string' } }, type: 'object' }, + { + additionalProperties: false, + properties: { source: { type: 'string' } }, + type: 'object', + }, ], }, type: 'array', @@ -151,7 +155,11 @@ export default createRule({ items: { oneOf: [ { type: 'string' }, - { properties: { source: { type: 'string' } }, type: 'object' }, + { + additionalProperties: false, + properties: { source: { type: 'string' } }, + type: 'object', + }, ], }, type: 'array',