diff --git a/lib/rules/syntaxes/utils/can-convert-to-v-slot.js b/lib/rules/syntaxes/utils/can-convert-to-v-slot.js index f4e667783..e0e51053d 100644 --- a/lib/rules/syntaxes/utils/can-convert-to-v-slot.js +++ b/lib/rules/syntaxes/utils/can-convert-to-v-slot.js @@ -28,7 +28,8 @@ module.exports = function canConvertToVSlot(element, sourceCode, tokenStore) { const ownerElement = element.parent if ( ownerElement.type === 'VDocumentFragment' || - !utils.isCustomComponent(ownerElement) + !utils.isCustomComponent(ownerElement) || + ownerElement.name === 'component' ) { return false } diff --git a/tests/lib/rules/no-deprecated-slot-attribute.js b/tests/lib/rules/no-deprecated-slot-attribute.js index 710472bda..2fd5fa401 100644 --- a/tests/lib/rules/no-deprecated-slot-attribute.js +++ b/tests/lib/rules/no-deprecated-slot-attribute.js @@ -668,6 +668,19 @@ tester.run('no-deprecated-slot-attribute', rule, { `, errors: ['`slot` attributes are deprecated.'] + }, + { + code: ` + `, + output: null, + errors: ['`slot` attributes are deprecated.'] } ] }) pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy