We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fa5528e commit aa31d63Copy full SHA for aa31d63
lib/rules/no-hide-core-modules.js
@@ -47,7 +47,6 @@ const CORE_MODULES = new Set([
47
"vm",
48
"zlib",
49
])
50
-const BACK_SLASH = /\\/gu
51
52
module.exports = {
53
meta: {
@@ -137,9 +136,10 @@ module.exports = {
137
136
loc: target.node.loc,
138
messageId: "unexpectedImport",
139
data: {
140
- name: path
141
- .relative(dirPath, target.filePath)
142
- .replace(BACK_SLASH, "/"),
+ name: path.posix.relative(
+ dirPath,
+ target.filePath
+ ),
143
},
144
})
145
}
0 commit comments