Skip to content

Commit 1c1f323

Browse files
author
Thomas Grainger
committed
always use posix path for normalization
1 parent 2657c65 commit 1c1f323

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/rules/no-useless-path-segments.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ function toRel(rel, sep) {
1717
`.${sep}${stripped}`
1818
}
1919

20-
function normalize(fn, sep) {
21-
return toRel(path.normalize(fn), sep)
20+
function normalize(fn) {
21+
return toRel(path.posix.normalize(fn), '/')
2222
}
2323

2424
const countRelParent = x => sumBy(x, v => v === '..')
@@ -44,7 +44,7 @@ module.exports = {
4444
return
4545
}
4646

47-
const normed = normalize(value, '/')
47+
const normed = normalize(value)
4848
if (normed !== value) {
4949
return report(normed)
5050
}

0 commit comments

Comments
 (0)