lib/augmentConfig.js
function augmentConfigExtended(
  stylelint /*: stylelint$internalApi*/,
  cosmiconfigResultArg /*: ?{
     config: stylelint$config,
     filepath: string,
   }*/
) /*: Promise<?{ config: stylelint$config, filepath: string }>*/ {
  const cosmiconfigResult = cosmiconfigResultArg; // Lock in for Flow

  if (!cosmiconfigResult) return Promise.resolve(null);

  const configDir = path.dirname(cosmiconfigResult.filepath || "");
  const cleanedConfig = _.omit(cosmiconfigResult.config, "ignoreFiles");

  return augmentConfigBasic(stylelint, cleanedConfig, configDir).then(
    augmentedConfig => {
      return {
        config: augmentedConfig,
        filepath: cosmiconfigResult.filepath
      };
    }
  );
}
function augmentConfigExtended(
  stylelint /*: stylelint$internalApi*/,
  cosmiconfigResultArg /*: ?{
     config: stylelint$config,
     filepath: string,
   }*/
) /*: Promise<?{ config: stylelint$config, filepath: string }>*/ {
  const cosmiconfigResult = cosmiconfigResultArg; // Lock in for Flow

  if (!cosmiconfigResult) return Promise.resolve(null);

  const configDir = path.dirname(cosmiconfigResult.filepath || "");
  const cleanedConfig = _.omit(cosmiconfigResult.config, "ignoreFiles");

  return augmentConfigBasic(stylelint, cleanedConfig, configDir).then(
    augmentedConfig => {
      return {
        config: augmentedConfig,
        filepath: cosmiconfigResult.filepath
      };
    }
  );
}
function augmentConfigExtended ( stylelint /*: stylelint$internalApi*/ , cosmiconfigResultArg /*: ?{
     config: stylelint$config,
     filepath: string,
   }*/ ) /*: Promise<?{ config: stylelint$config, filepath: string }>*/ { const cosmiconfigResult = cosmiconfigResultArg ; // Lock in for Flow if ( ! cosmiconfigResult ) return Promise . resolve ( null ) ; const configDir = path . dirname ( cosmiconfigResult . filepath || "" ) ; const cleanedConfig = _ . omit ( cosmiconfigResult . config , "ignoreFiles" ) ; return augmentConfigBasic ( stylelint , cleanedConfig , configDir ) . then ( augmentedConfig => { return { config : augmentedConfig , filepath : cosmiconfigResult . filepath } ; } ) ; }
Extended configs need to be run through augmentConfigBasic but do not need the full treatment. Things like pluginFunctions will be resolved and added by the parent config.
Extended configs need to be run through augmentConfigBasic but do not need the full treatment . Things like pluginFunctions will be resolved and added by the parent config .