Language: TypeScript
Label: vulnerable
CWE: CWE-20 \u2014 Improper Input Validation
The product receives input or data, but it does
        not validate or incorrectly validates that the input has the
        properties that are required to process the data safely and
        correctly.

Code:
const loadParserPlugins = async (language: string): Promise<Plugin[] | null> => {
  switch (language as SupportedLanguages) {
    case "javascript":
    case "typescript":
      return [
        await import("prettier/plugins/babel"),
        (await import("prettier/plugins/estree")) as Plugin
      ];
    case "graphql":
      return [await import("prettier/plugins/graphql")];
    case "html":
    case "vue":
      return [await import("prettier/plugins/html")];
    case "markdown":
      return [await import("prettier/plugins/markdown")];
    case "yaml":
    case "json":
      return [await import("prettier/plugins/yaml")];
    case "css":
    case "less":
    case "scss":
      return [await import("prettier/plugins/postcss")];
    default:
      return null;
  }
};