@@ -20,11 +20,7 @@ const utils = require('../utils')
2020 * @returns {boolean } `true` if the node is valid.
2121 */
2222function isValidElement ( node ) {
23- if (
24- ( ! utils . isHtmlElementNode ( node ) && ! utils . isSvgElementNode ( node ) ) ||
25- utils . isHtmlWellKnownElementName ( node . rawName ) ||
26- utils . isSvgWellKnownElementName ( node . rawName )
27- ) {
23+ if ( ! utils . isCustomComponent ( node ) ) {
2824 // non Vue-component
2925 return false
3026 }
@@ -82,22 +78,6 @@ function maybeNullObjectMemberExpression(node) {
8278 return false
8379}
8480
85- function isValidIs ( node ) {
86- const { attributes } = node
87- const isAttribute = attributes . some ( ( attr ) => {
88- // check for `VAttribute`
89- if ( attr . type === 'VAttribute' ) {
90- // check for `is` attribute
91- if ( attr . key . type === 'VIdentifier' && attr . key . name === 'is' ) return true
92-
93- // check for `:is` `bind` attribute
94- if ( attr . key . type === 'VDirectiveKey' && attr . key . argument . name === 'is' )
95- return true
96- }
97- } )
98- return isAttribute
99- }
100-
10181// ------------------------------------------------------------------------------
10282// Rule Definition
10383// ------------------------------------------------------------------------------
@@ -136,7 +116,7 @@ module.exports = {
136116 const element = node . parent . parent
137117 const name = element . name
138118
139- if ( ! isValidElement ( element ) && ! isValidIs ( node . parent ) ) {
119+ if ( ! isValidElement ( element ) ) {
140120 context . report ( {
141121 node,
142122 loc : node . loc ,
0 commit comments