Skip to content

Commit fb85ff6

Browse files
committed
remove cast from require-meta-type
1 parent 9f0af6f commit fb85ff6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/rules/require-meta-type.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,10 @@ const rule: Rule.RuleModule = {
6262
return;
6363
}
6464

65-
if (!VALID_TYPES.has(staticValue.value as string)) {
65+
if (
66+
typeof staticValue.value !== 'string' ||
67+
!VALID_TYPES.has(staticValue.value)
68+
) {
6669
context.report({ node: typeNode.value, messageId: 'unexpected' });
6770
}
6871
},

0 commit comments

Comments
 (0)