lib/rules/report-message-format.js
function processMessageNode (message) {
      if (
        (message.type === 'Literal' && typeof message.value === 'string' && !pattern.test(message.value)) ||
        (message.type === 'TemplateLiteral' && message.quasis.length === 1 && !pattern.test(message.quasis[0].value.cooked))
      ) {
        context.report({
          node: message,
          message: "Report message does not match the pattern '{{pattern}}'.",
          data: { pattern: context.options[0] || '' },
        });
      }
    }
function processMessageNode (message) {
      if (
        (message.type === 'Literal' && typeof message.value === 'string' && !pattern.test(message.value)) ||
        (message.type === 'TemplateLiteral' && message.quasis.length === 1 && !pattern.test(message.quasis[0].value.cooked))
      ) {
        context.report({
          node: message,
          message: "Report message does not match the pattern '{{pattern}}'.",
          data: { pattern: context.options[0] || '' },
        });
      }
    }
function processMessageNode ( message ) { if ( ( message . type === 'Literal' && typeof message . value === 'string' && ! pattern . test ( message . value ) ) || ( message . type === 'TemplateLiteral' && message . quasis . length === 1 && ! pattern . test ( message . quasis [ 0 ] . value . cooked ) ) ) { context . report ( { node : message , message : "Report message does not match the pattern '{{pattern}}'." , data : { pattern : context . options [ 0 ] || '' } , } ) ; } }
Report a message node if it doesn't match the given formatting
@param {ASTNode} message The message AST node
@returns {void}
Report a message node if it doesn t match the given formatting