reportForbiddenClass = (
  className,
  node,
  context,
  forbiddenClasses,
  forbiddenClassesRegexps
) => {
  if (
    forbiddenClasses.has(className) ||
    forbiddenClassesRegexps.some((re) => re.test(className))
  ) {
    const loc = node.value ? node.value.loc : node.loc
    context.report({
      node,
      loc,
      messageId: 'forbiddenClass',
      data: {
        class: className
      }
    })
  }
}
Report a forbidden class
@param {string} className
@param {*} node
@param {RuleContext} context
@param {Set<string>} forbiddenClasses
@param {Array<RegExp>} forbiddenClassesRegexps