Skip to content

Commit

Permalink
Merge pull request #25 from forzgc/master
Browse files Browse the repository at this point in the history
feat: valid-properties支持PropType
pagnkelly authored Jul 5, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
2 parents 410986f + 85b071e commit d915030
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/rules/valid-properties.js
Original file line number Diff line number Diff line change
@@ -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}}'.",

0 comments on commit d915030

Please sign in to comment.