function requireFileEnumerator() {
  let FileEnumerator;

  // Try getting it from the eslint private / deprecated api
  try {
    ({ FileEnumerator } = require('eslint/use-at-your-own-risk'));
  } catch (e) {
    // Absorb this if it's MODULE_NOT_FOUND
    if (e.code !== 'MODULE_NOT_FOUND') {
      throw e;
    }

    // If not there, then try getting it from eslint/lib/cli-engine/file-enumerator (moved there in v6)
    try {
      ({ FileEnumerator } = require('eslint/lib/cli-engine/file-enumerator'));
    } catch (e) {
      // Absorb this if it's MODULE_NOT_FOUND
      if (e.code !== 'MODULE_NOT_FOUND') {
        throw e;
      }
    }
  }
  return FileEnumerator;
}
Attempt to load the internal `FileEnumerator` class, which has existed in a couple
of different places, depending on the version of `eslint`.  Try requiring it from both
locations.
@returns Returns the `FileEnumerator` class if its requirable, otherwise `undefined`.