lib/rules/no-template-tag-in-start-tag.js
function validate(templateTags, attrs) {
            const valueTokens = attrs
                .map(attr => attr.valueToken)
                .filter(t => Boolean(t))
            for (const templateTag of templateTags) {
                if (
                    valueTokens.some(
                        valueToken =>
                            valueToken.range[0] <= templateTag.range[0] &&
                            templateTag.range[1] <= valueToken.range[1]
                    )
                ) {
                    continue
                }
                const isInterpolate =
                    templateTag.type === "MicroTemplateInterpolate" ||
                    templateTag.type === "MicroTemplateEscape"
                if (isInterpolate ? arrowInterpolateTag : arrowEvaluateTag) {
                    continue
                }
                context.report({
                    node: templateTag,
                    messageId: isInterpolate
                        ? "unexpectedInterpolate"
                        : "unexpectedEvaluate",
                })
            }
        }
function validate(templateTags, attrs) {
            const valueTokens = attrs
                .map(attr => attr.valueToken)
                .filter(t => Boolean(t))
            for (const templateTag of templateTags) {
                if (
                    valueTokens.some(
                        valueToken =>
                            valueToken.range[0] <= templateTag.range[0] &&
                            templateTag.range[1] <= valueToken.range[1]
                    )
                ) {
                    continue
                }
                const isInterpolate =
                    templateTag.type === "MicroTemplateInterpolate" ||
                    templateTag.type === "MicroTemplateEscape"
                if (isInterpolate ? arrowInterpolateTag : arrowEvaluateTag) {
                    continue
                }
                context.report({
                    node: templateTag,
                    messageId: isInterpolate
                        ? "unexpectedInterpolate"
                        : "unexpectedEvaluate",
                })
            }
        }
function validate ( templateTags , attrs ) { const valueTokens = attrs . map ( attr => attr . valueToken ) . filter ( t => Boolean ( t ) ) for ( const templateTag of templateTags ) { if ( valueTokens . some ( valueToken => valueToken . range [ 0 ] <= templateTag . range [ 0 ] && templateTag . range [ 1 ] <= valueToken . range [ 1 ] ) ) { continue } const isInterpolate = templateTag . type === "MicroTemplateInterpolate" || templateTag . type === "MicroTemplateEscape" if ( isInterpolate ? arrowInterpolateTag : arrowEvaluateTag ) { continue } context . report ( { node : templateTag , messageId : isInterpolate ? "unexpectedInterpolate" : "unexpectedEvaluate" , } ) } }
Validate template tags.
@param {Array} templateTags The template tags.
@param {Array} attrs The attibutes nodes.
@returns {void}
Validate template tags .