fix linting errors

This commit is contained in:
Sebastian McKenzie 2015-02-25 21:57:49 +11:00
parent 649d91ef25
commit cfe2c19a02

View File

@ -9,7 +9,7 @@ var cache = {};
function exists(filename) {
var cached = cache[filename];
if (cached != null) return cached;
return cache[filename] = fs.existsSync(filename);;
return cache[filename] = fs.existsSync(filename);
}
module.exports = function (loc, opts) {
@ -20,11 +20,11 @@ module.exports = function (loc, opts) {
var file = path.join(start, rel);
if (exists(file)) {
var file = fs.readFileSync(file, "utf8");
var content = fs.readFileSync(file, "utf8");
var json;
try {
json = JSON.parse(file);
json = JSON.parse(content);
} catch (err) {
err.filename = file + ": " + err.filename;
throw err;