diff --git a/src/findFiles.ts b/src/findFiles.ts index 1240166..53a7916 100644 --- a/src/findFiles.ts +++ b/src/findFiles.ts @@ -8,8 +8,6 @@ interface FileRule { extensions: string[]; } -const JS_EXTS = ['.js', '.jsx']; - async function findFile( cwd: string, { fileName, extensions }: FileRule, @@ -24,7 +22,7 @@ async function findFile( if (directoryEntry.name.includes(fileName)) { if (directoryEntry.isDirectory()) return true; - for (let extension of [...extensions, ...JS_EXTS]) { + for (let extension of extensions) { if (directoryFileName === fileName + extension) { return true; }