function includedByGlob(
  type: ?('f' | 'l' | 'd'),
  globs: $ReadOnlyArray<string>,
  dot: boolean,
  relativePath: string,
): boolean {
  // For non-regular files or if there are no glob matchers, just respect the
  // `dot` option to filter dotfiles if dot === false.
  if (globs.length === 0 || type !== 'f') {
    return dot || micromatch.some(relativePath, '**/*');
  }
  return micromatch.some(relativePath, globs, {dot});
}
Checks a file relative path against the globs array.