code: function validateLoaderAndLoadersProperty({loader, loaders, query}) {
    const messages = []
  
    if (!loader && !loaders) {
      messages.push(`Found neither \`loader\` nor \`loaders\``)
    }
  
    if (loader && loaders) {
      messages.push(`Found \`loader\` and \`loaders\`. These properties are mutually exclusive`)
    }
  
    if (loaders && query) {
      messages.push(`You can only pass the \`query\` property when you have one \`loader\``)
    }
  
    if (loader && friendlyTypeOf(loader) !== 'string') {
      messages.push(`Expected \`loader\` property to be a string, but got ${JSON.stringify(loader)}`)
    }
  
    if (loaders && friendlyTypeOf(loaders) !== 'array') {
      messages.push(`Expected \`loaders\` property to be an array, but got ${JSON.stringify(loaders)}`)
    }
  
    if (loaders && _.some(loaders, loader_ => friendlyTypeOf(loader_) !== 'string')) {
      messages.push(`Expected \`loaders\` property to be an array of strings, but got ${JSON.stringify(loaders)}`)
    }
  
    return messages
  }
docs: Splitting up this function into more granular parts would increase cognitive load even more, so disabling cyclomatic complexity check here. /* eslint-disable complexity