function extendFromRecommended(config) {
    const newConfig = Object.assign({}, config);

    ConfigOps.normalizeToStrings(newConfig);

    const recRules = Object.keys(recConfig.rules).filter(ruleId => ConfigOps.isErrorSeverity(recConfig.rules[ruleId]));

    recRules.forEach(ruleId => {
        if (lodash.isEqual(recConfig.rules[ruleId], newConfig.rules[ruleId])) {
            delete newConfig.rules[ruleId];
        }
    });
    newConfig.extends = RECOMMENDED_CONFIG_NAME;
    return newConfig;
}
function extendFromRecommended(config) {
    const newConfig = Object.assign({}, config);

    ConfigOps.normalizeToStrings(newConfig);

    const recRules = Object.keys(recConfig.rules).filter(ruleId => ConfigOps.isErrorSeverity(recConfig.rules[ruleId]));

    recRules.forEach(ruleId => {
        if (lodash.isEqual(recConfig.rules[ruleId], newConfig.rules[ruleId])) {
            delete newConfig.rules[ruleId];
        }
    });
    newConfig.extends = RECOMMENDED_CONFIG_NAME;
    return newConfig;
}
function extendFromRecommended ( config ) { const newConfig = Object . assign ( { } , config ) ; ConfigOps . normalizeToStrings ( newConfig ) ; const recRules = Object . keys ( recConfig . rules ) . filter ( ruleId => ConfigOps . isErrorSeverity ( recConfig . rules [ ruleId ] ) ) ; recRules . forEach ( ruleId => { if ( lodash . isEqual ( recConfig . rules [ ruleId ] , newConfig . rules [ ruleId ] ) ) { delete newConfig . rules [ ruleId ] ; } } ) ; newConfig . extends = RECOMMENDED_CONFIG_NAME ; return newConfig ; }
Extract rule configuration into eslint:recommended where possible.

This will return a new config with `"extends": "eslint:recommended"` and
only the rules which have configurations different from the recommended config.

@param   {Object} config config object
@returns {Object}        config object using `"extends": "eslint:recommended"`
Extract rule configuration into eslint : recommended where possible .
Extend the given config with the recommended config