diff --git a/lib/rules/component-name-in-template-casing.js b/lib/rules/component-name-in-template-casing.js index 017e4cb08..772fa83ac 100644 --- a/lib/rules/component-name-in-template-casing.js +++ b/lib/rules/component-name-in-template-casing.js @@ -68,9 +68,22 @@ module.exports = { context.parserServices.getTemplateBodyTokenStore && context.parserServices.getTemplateBodyTokenStore() - /** @type { string[] } */ - const registeredComponents = [] + /** @type { Set } */ + const registeredComponents = new Set() + if (utils.isScriptSetup(context)) { + // For + `, + options: ['PascalCase'], + output: ` + + + `, + errors: ['Component name "the-component" is not PascalCase.'] + }, + { + code: ` + + + `, + options: ['kebab-case'], + output: ` + + + `, + errors: ['Component name "TheComponent" is not kebab-case.'] } ] })