function listFilesToProcess(src, extensions) {
  const FileEnumerator = requireFileEnumerator();

  // If we got the FileEnumerator, then let's go with that
  if (FileEnumerator) {
    return listFilesUsingFileEnumerator(FileEnumerator, src, extensions);
  }
  // If not, then we can try even older versions of this capability (listFilesToProcess)
  return listFilesWithLegacyFunctions(src, extensions);
}
/*${extension}`),
      ),
    );

    return originalListFilesToProcess(patterns);
  }
}

/**
Given a src pattern and list of supported extensions, return a list of files to process
with this rule.
@param {string} src - file, directory, or glob pattern of files to act on
@param {string[]} extensions - list of supported file extensions
@returns {string[] | { filename: string, ignored: boolean }[]} the list of files that this rule will evaluate.