Skip to content

Commit 4762bbd

Browse files
authored
fix(valid-test-tags): disallow extra properties in rule options and add to recommended (#381)
1 parent 45af975 commit 4762bbd

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ const sharedConfig = {
135135
'playwright/valid-describe-callback': 'error',
136136
'playwright/valid-expect': 'error',
137137
'playwright/valid-expect-in-promise': 'error',
138+
'playwright/valid-test-tags': 'error',
138139
'playwright/valid-title': 'error',
139140
},
140141
} as const

src/rules/valid-test-tags.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,11 @@ export default createRule({
142142
items: {
143143
oneOf: [
144144
{ type: 'string' },
145-
{ properties: { source: { type: 'string' } }, type: 'object' },
145+
{
146+
additionalProperties: false,
147+
properties: { source: { type: 'string' } },
148+
type: 'object',
149+
},
146150
],
147151
},
148152
type: 'array',
@@ -151,7 +155,11 @@ export default createRule({
151155
items: {
152156
oneOf: [
153157
{ type: 'string' },
154-
{ properties: { source: { type: 'string' } }, type: 'object' },
158+
{
159+
additionalProperties: false,
160+
properties: { source: { type: 'string' } },
161+
type: 'object',
162+
},
155163
],
156164
},
157165
type: 'array',

0 commit comments

Comments
 (0)