Skip to content

Commit 69b7523

Browse files
committed
Also check for invalid meta.docs.recommended properties
in `no-invalid-meta` internal rule
1 parent 9be8f18 commit 69b7523

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

eslint-internal-rules/no-invalid-meta.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,18 @@ function checkMetaValidity(context, exportsNode) {
5858
})
5959
return
6060
}
61+
62+
const metaDocsRecommended = getPropertyFromObject(
63+
'recommended',
64+
metaDocs.value
65+
)
66+
if (metaDocsRecommended) {
67+
context.report({
68+
node: metaDocsRecommended,
69+
messageId: 'invalidMetaDocsRecommended'
70+
})
71+
return
72+
}
6173
}
6274

6375
module.exports = {
@@ -72,7 +84,9 @@ module.exports = {
7284
missingMeta: 'Rule is missing a meta property.',
7385
missingMetaDocs: 'Rule is missing a meta.docs property.',
7486
missingMetaDocsCategories:
75-
'Rule is missing a meta.docs.categories property.'
87+
'Rule is missing a meta.docs.categories property.',
88+
invalidMetaDocsRecommended:
89+
'Rule should not have a meta.docs.recommended property.'
7690
}
7791
},
7892

0 commit comments

Comments
 (0)