function resolveFiles(src, ignoreExports, context) {
  const extensions = Array.from(getFileExtensions(context.settings));

  const srcFileList = listFilesToProcess(src, extensions);

  // prepare list of ignored files
  const ignoredFilesList = listFilesToProcess(ignoreExports, extensions);

  // The modern api will return a list of file paths, rather than an object
  if (ignoredFilesList.length && typeof ignoredFilesList[0] === 'string') {
    ignoredFilesList.forEach((filename) => ignoredFiles.add(filename));
  } else {
    ignoredFilesList.forEach(({ filename }) => ignoredFiles.add(filename));
  }

  // prepare list of source files, don't consider files from node_modules
  const resolvedFiles = srcFileList.length && typeof srcFileList[0] === 'string'
    ? srcFileList.filter((filePath) => !isNodeModule(filePath))
    : flatMap(srcFileList, ({ filename }) => isNodeModule(filename) ? [] : filename);

  return new Set(resolvedFiles);
}
read all files matching the patterns in src and ignoreExports

return all files matching src pattern, which are not matching the ignoreExports pattern
@type {(src: string, ignoreExports: string, context: import('eslint').Rule.RuleContext) => Set<string>}