From d11e472b12b064d56064bd25838a318d43fe84ae Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Thu, 2 Feb 2023 13:46:40 +0100 Subject: [PATCH] fix(eslint): improve type checking --- packages/eslint-plugin/src/rules/order-attributify.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/eslint-plugin/src/rules/order-attributify.ts b/packages/eslint-plugin/src/rules/order-attributify.ts index 409e4da5c9..b70dd91dd6 100644 --- a/packages/eslint-plugin/src/rules/order-attributify.ts +++ b/packages/eslint-plugin/src/rules/order-attributify.ts @@ -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