function disable(context, loc, group, rule, key) {
  if (rule) {
    context.report({
      loc,
      messageId: group === 'block' ? 'disableBlockRule' : 'disableLineRule',
      data: { rule, key }
    })
  } else {
    context.report({
      loc,
      messageId: group === 'block' ? 'disableBlock' : 'disableLine',
      data: { key }
    })
  }
}
Disable rules.
@param {RuleContext} context The rule context.
@param {{line:number,column:number}} loc The location information to disable.
@param { 'block' | 'line' } group The group to disable.
@param {string | null} rule The rule ID to disable.
@param {string} key The disable directive key.
@returns {void}