code: function validateRuleOptions(rule, ruleId, options, source = null) {
      if (!rule) {
          return;
      }
      try {
          const severity = validateRuleSeverity(options);
  
          if (severity !== 0) {
              validateRuleSchema(rule, Array.isArray(options) ? options.slice(1) : []);
          }
      } catch (err) {
          const enhancedMessage = `Configuration for rule "${ruleId}" is invalid:\n${err.message}`;
  
          if (typeof source === "string") {
              throw new Error(`${source}:\n\t${enhancedMessage}`);
          } else {
              throw new Error(enhancedMessage);
          }
      }
  }
docs: Validates a rule's options against its schema.
  @param {{create: Function}|null} rule The rule that the config is being validated for
  @param {string} ruleId The rule's unique name.
  @param {Array|number} options The given options for the rule.
  @param {string|null} source The name of the configuration source to report in any errors. If null or undefined,
  no source is prepended to the message.
  @returns {void}