Skip to content

Commit aa31d63

Browse files
committed
chore: Use path.posix over backslash conversion
1 parent fa5528e commit aa31d63

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/rules/no-hide-core-modules.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ const CORE_MODULES = new Set([
4747
"vm",
4848
"zlib",
4949
])
50-
const BACK_SLASH = /\\/gu
5150

5251
module.exports = {
5352
meta: {
@@ -137,9 +136,10 @@ module.exports = {
137136
loc: target.node.loc,
138137
messageId: "unexpectedImport",
139138
data: {
140-
name: path
141-
.relative(dirPath, target.filePath)
142-
.replace(BACK_SLASH, "/"),
139+
name: path.posix.relative(
140+
dirPath,
141+
target.filePath
142+
),
143143
},
144144
})
145145
}

0 commit comments

Comments
 (0)