lib/parser/micro-template-eslint-parser.js
function isHtmlFile(code, options) {
    const filePath =
        typeof options.filePath === "string" ? options.filePath : "unknown.js"
    for (const ext of container.targetExtensions) {
        if (filePath.endsWith(ext)) {
            return true
        }
    }
    if (filePath.endsWith(".vue")) {
        return false
    }
    return /^\s*</u.test(code)
}
function isHtmlFile(code, options) {
    const filePath =
        typeof options.filePath === "string" ? options.filePath : "unknown.js"
    for (const ext of container.targetExtensions) {
        if (filePath.endsWith(ext)) {
            return true
        }
    }
    if (filePath.endsWith(".vue")) {
        return false
    }
    return /^\s*</u.test(code)
}
function isHtmlFile ( code , options ) { const filePath = typeof options . filePath === "string" ? options . filePath : "unknown.js" for ( const ext of container . targetExtensions ) { if ( filePath . endsWith ( ext ) ) { return true } } if ( filePath . endsWith ( ".vue" ) ) { return false } return / ^\s*< / u . test ( code ) }
Check whether the code is a HTML.
@param {string} code The source code to check.
@param {object} options The parser options.
@returns {boolean} `true` if the source code is a HTML.
Check whether the code is a HTML .