Skip to content

Commit d3921e3

Browse files
authored
Use new variable instead of mutating the parameter
1 parent 73e1deb commit d3921e3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/utils.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ const resolveImport = (context, node, { value, range }, currentPackage) => {
3535
const pathToImport = path => {
3636
if (path === '') return '.';
3737

38-
path = normalize(path).replace(/\\/g, '/');
38+
const normalized = normalize(path).replace(/\\/g, '/');
3939

40-
if (path[0] !== '.') return `./${path}`;
40+
if (normalized[0] !== '.') return `./${normalized}`;
4141

42-
return path;
42+
return normalized;
4343
};
4444

4545
const findCurrentPackage = context =>

0 commit comments

Comments
 (0)