From 266eaa59b57b2319dd714e712b73a4d5bed4ad25 Mon Sep 17 00:00:00 2001 From: Blake Embrey Date: Thu, 28 Nov 2019 08:53:20 -0800 Subject: [PATCH] Fix relative `node_modules` ignore --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 854a4d041..d8689fcec 100644 --- a/src/index.ts +++ b/src/index.ts @@ -266,7 +266,7 @@ export function create (options: CreateOptions = {}): Register { const isScoped = options.scope ? (relname: string) => relname.charAt(0) !== '.' : () => true const shouldIgnore = createIgnore(options.skipIgnore ? [] : ( - options.ignore || ['/node_modules/'] + options.ignore || ['(?:^|/)node_modules/'] ).map(str => new RegExp(str))) const diagnosticHost: _ts.FormatDiagnosticsHost = {