Skip to content

Commit 4787bdc

Browse files
chore: fix compatibility with node 12 and 14
1 parent 228a41d commit 4787bdc

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.eslintrc.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@
4444
"node/no-unsupported-features/es-syntax": "off",
4545
"promise/prefer-await-to-callbacks": "off",
4646
// enable once supported in all our supported node versions.
47-
"unicorn/prefer-node-protocol": "off"
47+
"unicorn/prefer-node-protocol": "off",
48+
// only available for node >= 16
49+
"unicorn/prefer-string-replace-all": "off"
4850
},
4951
"overrides": [
5052
// Top level files.

src/common/ignore-options.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ function accessorPatternMatch(
216216
)
217217
: // Text matches pattern?
218218
new RegExp(
219-
`^${escapeRegExp(pattern).replaceAll("\\*", ".*")}$`,
219+
`^${escapeRegExp(pattern).replace(/\\\*/gu, ".*")}$`,
220220
"u"
221221
).test(textParts[0]) &&
222222
accessorPatternMatch(

0 commit comments

Comments
 (0)