diff --git a/.eslintrc.json b/.eslintrc.json index 946127ceb..e84c8d766 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -44,7 +44,9 @@ "node/no-unsupported-features/es-syntax": "off", "promise/prefer-await-to-callbacks": "off", // enable once supported in all our supported node versions. - "unicorn/prefer-node-protocol": "off" + "unicorn/prefer-node-protocol": "off", + // only available for node >= 16 + "unicorn/prefer-string-replace-all": "off" }, "overrides": [ // Top level files. diff --git a/src/common/ignore-options.ts b/src/common/ignore-options.ts index 864651afd..5f0016faf 100644 --- a/src/common/ignore-options.ts +++ b/src/common/ignore-options.ts @@ -216,7 +216,7 @@ function accessorPatternMatch( ) : // Text matches pattern? new RegExp( - `^${escapeRegExp(pattern).replaceAll("\\*", ".*")}$`, + `^${escapeRegExp(pattern).replace(/\\\*/gu, ".*")}$`, "u" ).test(textParts[0]) && accessorPatternMatch(