code: function createRuleDeprecationWarnings(usedRules, loadedRules) {
      const usedDeprecatedRules = [];
  
      usedRules.forEach(name => {
          const loadedRule = loadedRules.get(name);
  
          if (loadedRule && loadedRule.meta && loadedRule.meta.deprecated) {
              const deprecatedRule = { ruleId: name };
              const replacedBy = lodash.get(loadedRule, "meta.replacedBy", []);
  
              if (replacedBy.every(newRule => lodash.isString(newRule))) {
                  deprecatedRule.replacedBy = replacedBy;
              }
  
              usedDeprecatedRules.push(deprecatedRule);
          }
      });
  
      return usedDeprecatedRules;
  }
docs: Produces rule warnings (i.e. deprecation) from configured rules
  @param {(Array<string>|Set<string>)} usedRules - Rules configured
  @param {Map} loadedRules - Map of loaded rules
  @returns {Array<Object>} Contains rule warnings
  @private