function _getFileInfo({
  ignorer,
  filePath,
  plugins,
  resolveConfig = false,
  sync = false
}) {
  const fileInfo = {
    ignored: ignorer.ignores(filePath),
    inferredParser: options$1.inferParser(filePath, plugins) || null
  };

  if (!fileInfo.inferredParser && resolveConfig) {
    if (!sync) {
      return resolveConfig_1.resolveConfig(filePath).then(resolvedConfig => {
        if (resolvedConfig && resolvedConfig.parser) {
          fileInfo.inferredParser = resolvedConfig.parser;
        }

        return fileInfo;
      });
    }

    const resolvedConfig = resolveConfig_1.resolveConfig.sync(filePath);

    if (resolvedConfig && resolvedConfig.parser) {
      fileInfo.inferredParser = resolvedConfig.parser;
    }
  }

  return fileInfo;
}
@param {string} filePath
@param {FileInfoOptions} opts
@returns {FileInfoResult}