in tools/pkglint/lib/packagejson.ts [14:35]
function recurse(dir: string) {
if (!fs.existsSync(dir)) {
throw new Error('No such directory: ' + dir);
}
if (fs.existsSync(path.join(dir, '.no-packagejson-validator'))) {
// Don't recurse here
return;
}
for (const file of fs.readdirSync(dir)) {
const fullPath = path.join(dir, file);
if (file === 'package.json') {
ret.push(new PackageJson(fullPath));
}
// Recurse into all dirs except ignored dirs
if (!PKGLINT_IGNORES.includes(file) && (fs.lstatSync(fullPath)).isDirectory()) {
recurse(fullPath);
}
}
}