From 85b071e5485a602d48b58670717a444664693156 Mon Sep 17 00:00:00 2001 From: forzgc Date: Fri, 8 Dec 2023 17:11:15 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20valid-properties=E6=94=AF=E6=8C=81PropT?= =?UTF-8?q?ype?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/rules/valid-properties.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/rules/valid-properties.js b/lib/rules/valid-properties.js index ea20bcd..17047de 100644 --- a/lib/rules/valid-properties.js +++ b/lib/rules/valid-properties.js @@ -82,7 +82,10 @@ function validProp(node, context, allowKeys) { } }) } - } else if (node.value.type !== 'Identifier') { + } else if ( + node.value.type !== 'Identifier' && + node.value.type !== 'TSAsExpression' + ) { return context.report({ node, message: "Invalid value for '{{propName}}'.",