lib/rules/html-indent.js
function findPairOpenPunctuator(closeToken) {
                const closePunctuatorText = closeToken.value

                const isPairOpenPunctuator =
                    closePunctuatorText === ")"
                        ? isLeftParen
                        : closePunctuatorText === "}"
                        ? isLeftBrace
                        : isLeftBracket
                let token = sourceCode.getTokenBefore(closeToken)
                while (token) {
                    if (isPairOpenPunctuator(token)) {
                        return token
                    }
                    if (isIndentationEndPunctuator(token)) {
                        // skip
                        const next = findPairOpenPunctuator(token)
                        token = sourceCode.getTokenBefore(next)
                        continue
                    }

                    token = sourceCode.getTokenBefore(token)
                }
                return null
            }
function findPairOpenPunctuator(closeToken) {
                const closePunctuatorText = closeToken.value

                const isPairOpenPunctuator =
                    closePunctuatorText === ")"
                        ? isLeftParen
                        : closePunctuatorText === "}"
                        ? isLeftBrace
                        : isLeftBracket
                let token = sourceCode.getTokenBefore(closeToken)
                while (token) {
                    if (isPairOpenPunctuator(token)) {
                        return token
                    }
                    if (isIndentationEndPunctuator(token)) {
                        // skip
                        const next = findPairOpenPunctuator(token)
                        token = sourceCode.getTokenBefore(next)
                        continue
                    }

                    token = sourceCode.getTokenBefore(token)
                }
                return null
            }
function findPairOpenPunctuator ( closeToken ) { const closePunctuatorText = closeToken . value const isPairOpenPunctuator = closePunctuatorText === ")" ? isLeftParen : closePunctuatorText === "}" ? isLeftBrace : isLeftBracket let token = sourceCode . getTokenBefore ( closeToken ) while ( token ) { if ( isPairOpenPunctuator ( token ) ) { return token } if ( isIndentationEndPunctuator ( token ) ) { // skip const next = findPairOpenPunctuator ( token ) token = sourceCode . getTokenBefore ( next ) continue } token = sourceCode . getTokenBefore ( token ) } return null }
Find pair open punctuator token.
@param {Node} closeToken The close punctuator token
@returns {Token} The indentation-start punctuator token.
Find pair open punctuator token .