Fix lint errors 2/2

Reviewed By: jeanlauliac

Differential Revision: D4628330

fbshipit-source-id: 94fad1294e22fa0073e15843f94241ae778112a0
This commit is contained in:
Christoph Pojer authored and Facebook Github Bot committed 2017-03-01 08:15:51 -08:00
1 parent 04f42ab075
commit 4d00df41b4
23 files changed
+176 -179

No files matched your search

@@ -25,7 +25,9 @@ module.exports = class HasteFS {
}
closest(path: string, fileName: string): ?string {
let {dir, root} = parse(path);
const parsedPath = parse(path);
const root = parsedPath.root;
let dir = parsedPath.dir;
do {
const candidate = join(dir, fileName);
if (this.files.has(candidate)) {
@@ -63,7 +65,9 @@ module.exports = class HasteFS {
function buildDirectorySet(files) {
const directories = new Set();
files.forEach(path => {
let {dir, root} = parse(path);
const parsedPath = parse(path);
const root = parsedPath.root;
let dir = parsedPath.dir;
while (dir !== '.' && dir !== root && !directories.has(dir)) {
directories.add(dir);
dir = dirname(dir);