thekevinscott / UpscalerJS

Prefer the usage of regular expression literals over the RegExp constructor JS-0115
Anti-pattern
Minor
1 occurrence in this check
Use a regular expression literal instead of the 'RegExp' constructor.
17  `No matches could be found for module entry point ${moduleEntryPoint}`
18);
19
20const DIST_REGEXP = new RegExp('(.*)dist');21export const getModuleFolder = (name: string): string => {
22  const moduleEntryPoint = resolver(name);
23  const match = moduleEntryPoint.match(DIST_REGEXP)?.pop();