code: function validateRules(rulesConfig, ruleMapper, source = null) {
      if (!rulesConfig) {
          return;
      }
  
      Object.keys(rulesConfig).forEach(id => {
          validateRuleOptions(ruleMapper(id), id, rulesConfig[id], source);
      });
  }
docs: Validates a rules config object
  @param {Object} rulesConfig The rules config object to validate.
  @param {function(string): {create: Function}} ruleMapper A mapper function from strings to loaded rules
  @param {string} source The name of the configuration source to report in any errors.
  @returns {void}