Skip to content

Commit

Permalink
fix(eslint): improve type checking
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Feb 2, 2023
1 parent 2afa846 commit d11e472
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/eslint-plugin/src/rules/order-attributify.ts
Expand Up @@ -31,7 +31,7 @@ export default ESLintUtils.RuleCreator(name => name)({

const templateBodyVisitor: RuleListener = {
VStartTag(node: any) {
const valueless = node.attributes.filter((i: any) => !INGORE_ATTRIBUTES.includes(i.key?.name?.toLowerCase()) && i.value == null)
const valueless = node.attributes.filter((i: any) => typeof i.key?.name === 'string' && !INGORE_ATTRIBUTES.includes(i.key?.name?.toLowerCase()) && i.value == null)
if (!valueless.length)
return

Expand Down

0 comments on commit d11e472

Please sign in to comment.