diff --git a/src/index.ts b/src/index.ts index 8ace147d..0c1fdf6e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -16,8 +16,12 @@ function traverseFilePathUntil(filename: string, predicate: (filename: string) = } // Update to path.dirname(url.fileURLToPath(import.meta.url)) whenever we update tsconfig target to ES2020 -// eslint-disable-next-line unicorn/prefer-module -loadConfig.root = traverseFilePathUntil(require.main?.path ?? module.path, (p) => !p.includes('node_modules')) +/* eslint-disable unicorn/prefer-module */ +loadConfig.root = traverseFilePathUntil( + require.main?.path ?? module.path, + (p) => !(p.includes('node_modules') || p.includes('.pnpm') || p.includes('.yarn')), +) +/* eslint-enable unicorn/prefer-module */ export const test = fancy .register('loadConfig', loadConfig)