lib/rules/no-duplicate-attributes.js
function validateNameGroup(nodes, _name) {
            if (nodes.length <= 1) {
                return
            }
            for (const target of nodes) {
                const node =
                    microTemplateService.getBranchProcessedHtmlNode(
                        target,
                        sourceCode
                    ) || target
                const startTag = node.parent
                const hasDup = startTag.attributes
                    .concat(startTag.ignoredAttributes)
                    .filter(attr => !equalNode(attr, node))
                    .some(attr =>
                        microTemplateService.findToken(
                            nodes,
                            n =>
                                n.type === attr.type &&
                                n.range[0] === attr.range[0] &&
                                n.range[1] === attr.range[1]
                        )
                    )
                if (hasDup) {
                    report(target)
                }
            }
        }
function validateNameGroup(nodes, _name) {
            if (nodes.length <= 1) {
                return
            }
            for (const target of nodes) {
                const node =
                    microTemplateService.getBranchProcessedHtmlNode(
                        target,
                        sourceCode
                    ) || target
                const startTag = node.parent
                const hasDup = startTag.attributes
                    .concat(startTag.ignoredAttributes)
                    .filter(attr => !equalNode(attr, node))
                    .some(attr =>
                        microTemplateService.findToken(
                            nodes,
                            n =>
                                n.type === attr.type &&
                                n.range[0] === attr.range[0] &&
                                n.range[1] === attr.range[1]
                        )
                    )
                if (hasDup) {
                    report(target)
                }
            }
        }
function validateNameGroup ( nodes , _name ) { if ( nodes . length <= 1 ) { return } for ( const target of nodes ) { const node = microTemplateService . getBranchProcessedHtmlNode ( target , sourceCode ) || target const startTag = node . parent const hasDup = startTag . attributes . concat ( startTag . ignoredAttributes ) . filter ( attr => ! equalNode ( attr , node ) ) . some ( attr => microTemplateService . findToken ( nodes , n => n . type === attr . type && n . range [ 0 ] === attr . range [ 0 ] && n . range [ 1 ] === attr . range [ 1 ] ) ) if ( hasDup ) { report ( target ) } } }
Validation by attribute name
@param  {Array} nodes The attribute nodes
@param  {string} _name The attribut name
@returns {void}
Validation by attribute name