lib/processor/micro-template-processor.js
function postprocessForDisableRules(messages, microTemplateService) {
    const option = microTemplateService.systemOption || {}
    const ignoreRules = DISABLED_RULES.concat(option.ignoreRules || [])
    const globals = GLOBALS.concat(option.globals || [])

    return messages.filter(message => {
        if (ignoreRules.indexOf(message.ruleId) >= 0) {
            return false
        }
        if (
            microTemplateService.inTemplate(message) &&
            TEMPLATE_DISABLED_RULES.indexOf(message.ruleId) >= 0
        ) {
            return false
        }
        if (
            microTemplateService.inInterpolateOrEscape(message) &&
            TMPL_INTERPOLATE_DISABLED_RULES.indexOf(message.ruleId) >= 0
        ) {
            return false
        }
        if (
            microTemplateService.inDelimiterMarks(message) &&
            TMPL_DELIMITERS_DISABLED_RULES.indexOf(message.ruleId) >= 0
        ) {
            return false
        }

        if (message.ruleId === "no-undef") {
            if (
                globals
                    .map(g => `'${g}' is not defined.`)
                    .indexOf(message.message) >= 0
            ) {
                return false
            }
        }
        if (message.ruleId === "quotes") {
            if (message.message === "Strings must use doublequote.") {
                return false
            }
        }

        return true
    })
}
function postprocessForDisableRules(messages, microTemplateService) {
    const option = microTemplateService.systemOption || {}
    const ignoreRules = DISABLED_RULES.concat(option.ignoreRules || [])
    const globals = GLOBALS.concat(option.globals || [])

    return messages.filter(message => {
        if (ignoreRules.indexOf(message.ruleId) >= 0) {
            return false
        }
        if (
            microTemplateService.inTemplate(message) &&
            TEMPLATE_DISABLED_RULES.indexOf(message.ruleId) >= 0
        ) {
            return false
        }
        if (
            microTemplateService.inInterpolateOrEscape(message) &&
            TMPL_INTERPOLATE_DISABLED_RULES.indexOf(message.ruleId) >= 0
        ) {
            return false
        }
        if (
            microTemplateService.inDelimiterMarks(message) &&
            TMPL_DELIMITERS_DISABLED_RULES.indexOf(message.ruleId) >= 0
        ) {
            return false
        }

        if (message.ruleId === "no-undef") {
            if (
                globals
                    .map(g => `'${g}' is not defined.`)
                    .indexOf(message.message) >= 0
            ) {
                return false
            }
        }
        if (message.ruleId === "quotes") {
            if (message.message === "Strings must use doublequote.") {
                return false
            }
        }

        return true
    })
}
function postprocessForDisableRules ( messages , microTemplateService ) { const option = microTemplateService . systemOption || { } const ignoreRules = DISABLED_RULES . concat ( option . ignoreRules || [ ] ) const globals = GLOBALS . concat ( option . globals || [ ] ) return messages . filter ( message => { if ( ignoreRules . indexOf ( message . ruleId ) >= 0 ) { return false } if ( microTemplateService . inTemplate ( message ) && TEMPLATE_DISABLED_RULES . indexOf ( message . ruleId ) >= 0 ) { return false } if ( microTemplateService . inInterpolateOrEscape ( message ) && TMPL_INTERPOLATE_DISABLED_RULES . indexOf ( message . ruleId ) >= 0 ) { return false } if ( microTemplateService . inDelimiterMarks ( message ) && TMPL_DELIMITERS_DISABLED_RULES . indexOf ( message . ruleId ) >= 0 ) { return false } if ( message . ruleId === "no-undef" ) { if ( globals . map ( g => ` ${ g } ` ) . indexOf ( message . message ) >= 0 ) { return false } } if ( message . ruleId === "quotes" ) { if ( message . message === "Strings must use doublequote." ) { return false } } return true } ) }
postprocess for Filter disable rules messages.
@param {Array} messages The base messages.
@param {object} microTemplateService The MicroTemplateService.
@returns {Array} messages The processed messages.
postprocess for Filter disable rules messages .