Fix no shadow warnings (#22190)

Summary:
Fixes `no-shadow` eslint errors.
Pull Request resolved: https://github.com/facebook/react-native/pull/22190

Differential Revision: D13564238

Pulled By: cpojer

fbshipit-source-id: 96ba36b397088fa406e8f5781b1538a0b6804a8d
This commit is contained in:
Ignacio Olaciregui authored and Facebook Github Bot committed 2019-01-01 17:13:15 -08:00
1 parent bd32234e6e
commit 2c3f807ace
4 files changed
+14 -14

No files matched your search

+4 -4
View File
@@ -83,20 +83,20 @@ stdout: ${stdout}`),
});
}
function parseJsonFile(path, useYarn) {
function parseJsonFile(filePath, useYarn) {
const installHint = useYarn
? 'Make sure you ran "yarn" and that you are inside a React Native project.'
: 'Make sure you ran "npm install" and that you are inside a React Native project.';
let fileContents;
try {
fileContents = fs.readFileSync(path, 'utf8');
fileContents = fs.readFileSync(filePath, 'utf8');
} catch (err) {
throw new Error('Cannot find "' + path + '". ' + installHint);
throw new Error('Cannot find "' + filePath + '". ' + installHint);
}
try {
return JSON.parse(fileContents);
} catch (err) {
throw new Error('Cannot parse "' + path + '": ' + err.message);
throw new Error('Cannot parse "' + filePath + '": ' + err.message);
}
}