src/getConfig.js
function getConfig(sourceConfig, debugMode) {
  debug('Normalizing config')
  const config = defaultsDeep(
    {}, // Do not mutate sourceConfig!!!
    isSimple(sourceConfig) ? { linters: sourceConfig } : sourceConfig,
    defaultConfig
  )

  // Check if renderer is set in sourceConfig and if not, set accordingly to verbose
  if (isObject(sourceConfig) && !sourceConfig.hasOwnProperty('renderer')) {
    config.renderer = debugMode ? 'verbose' : 'update'
  }

  return config
}
function getConfig(sourceConfig, debugMode) {
  debug('Normalizing config')
  const config = defaultsDeep(
    {}, // Do not mutate sourceConfig!!!
    isSimple(sourceConfig) ? { linters: sourceConfig } : sourceConfig,
    defaultConfig
  )

  // Check if renderer is set in sourceConfig and if not, set accordingly to verbose
  if (isObject(sourceConfig) && !sourceConfig.hasOwnProperty('renderer')) {
    config.renderer = debugMode ? 'verbose' : 'update'
  }

  return config
}
function getConfig ( sourceConfig , debugMode ) { debug ( 'Normalizing config' ) const config = defaultsDeep ( { } , // Do not mutate sourceConfig!!! isSimple ( sourceConfig ) ? { linters : sourceConfig } : sourceConfig , defaultConfig ) // Check if renderer is set in sourceConfig and if not, set accordingly to verbose if ( isObject ( sourceConfig ) && ! sourceConfig . hasOwnProperty ( 'renderer' ) ) { config . renderer = debugMode ? 'verbose' : 'update' } return config }
For a given configuration object that we retrive from .lintstagedrc or package.json
construct a full configuration with all options set.

This is a bit tricky since we support 2 different syntxes: simple and full
For simple config, only the `linters` configuration is provided.

@param {Object} sourceConfig
@returns {{
concurrent: boolean, chunkSize: number, globOptions: {matchBase: boolean, dot: boolean}, linters: {}, subTaskConcurrency: number, renderer: string
}}
For a given configuration object that we retrive from . lintstagedrc or package . json construct a full configuration with all options set .