Skip to content

Commit 75b529e

Browse files
committed
fix: ignore node_modules by default
1 parent b0360ef commit 75b529e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/core/options.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export interface Options {
2020
scanDir?: string
2121
/**
2222
* The pattern used to match enum files.
23-
* @default '**\/*.{cts,mts,ts,tsx}'
23+
* @default ['**\/*.{cts,mts,ts,tsx}', '!**\/node_modules']
2424
*/
2525
scanPattern?: string | string[]
2626
}
@@ -48,6 +48,9 @@ export function resolveOptions(options: Options): OptionsResolved {
4848

4949
scanMode: options.scanMode || 'fs',
5050
scanDir: options.scanDir || process.cwd(),
51-
scanPattern: options.scanPattern || '**/*.{cts,mts,ts,tsx}',
51+
scanPattern: options.scanPattern || [
52+
'**/*.{cts,mts,ts,tsx}',
53+
'!**/node_modules',
54+
],
5255
}
5356
}

0 commit comments

Comments
 (0)