From 634e6fd1c81a04ca167ef1d8261994a6439a5b63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sajn=C3=B3g?= Date: Sun, 11 Nov 2018 03:26:24 +0100 Subject: [PATCH] Fix #637 - Don't ignore elements with "is" binding in component-name-in-template-casing --- .../component-name-in-template-casing.js | 2 +- .../component-name-in-template-casing.js | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/lib/rules/component-name-in-template-casing.js b/lib/rules/component-name-in-template-casing.js index 5a1b991ed..524017a67 100644 --- a/lib/rules/component-name-in-template-casing.js +++ b/lib/rules/component-name-in-template-casing.js @@ -61,7 +61,7 @@ module.exports = { return } - if (!utils.isCustomComponent(node)) { + if (!utils.isHtmlElementNode(node) || utils.isHtmlWellKnownElementName(node.rawName)) { return } diff --git a/tests/lib/rules/component-name-in-template-casing.js b/tests/lib/rules/component-name-in-template-casing.js index b2fc98711..a432ac79f 100644 --- a/tests/lib/rules/component-name-in-template-casing.js +++ b/tests/lib/rules/component-name-in-template-casing.js @@ -27,6 +27,8 @@ tester.run('component-name-in-template-casing', rule, { '', '', '', + '', + '', // kebab-case { @@ -80,6 +82,23 @@ tester.run('component-name-in-template-casing', rule, { `, errors: ['Component name "the-component" is not PascalCase.'] }, + { + code: ` + + `, + output: ` + + `, + errors: ['Component name "the-component" is not PascalCase.'] + }, { code: `