@@ -20,11 +20,7 @@ const utils = require('../utils')
20
20
* @returns {boolean } `true` if the node is valid.
21
21
*/
22
22
function 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 ) ) {
28
24
// non Vue-component
29
25
return false
30
26
}
@@ -82,22 +78,6 @@ function maybeNullObjectMemberExpression(node) {
82
78
return false
83
79
}
84
80
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
-
101
81
// ------------------------------------------------------------------------------
102
82
// Rule Definition
103
83
// ------------------------------------------------------------------------------
@@ -136,7 +116,7 @@ module.exports = {
136
116
const element = node . parent . parent
137
117
const name = element . name
138
118
139
- if ( ! isValidElement ( element ) && ! isValidIs ( node . parent ) ) {
119
+ if ( ! isValidElement ( element ) ) {
140
120
context . report ( {
141
121
node,
142
122
loc : node . loc ,
0 commit comments