mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fix lint errors 2/2
Reviewed By: jeanlauliac Differential Revision: D4628330 fbshipit-source-id: 94fad1294e22fa0073e15843f94241ae778112a0
This commit is contained in:
committed by
Facebook Github Bot
parent
04f42ab075
commit
4d00df41b4
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user