chore: Enable "curly" rule to avoid single-statement if confusion/errors.

This commit is contained in:
cpojer
2026-01-31 16:19:20 +09:00
parent 009b16fab8
commit 5ceff756e1
1266 changed files with 27871 additions and 9393 deletions

View File

@@ -18,9 +18,13 @@ async function findPackageRoot(startDir: string, maxDepth = 12): Promise<string
let current = path.resolve(startDir);
for (let i = 0; i < maxDepth; i += 1) {
const name = await readPackageName(current);
if (name && CORE_PACKAGE_NAMES.has(name)) return current;
if (name && CORE_PACKAGE_NAMES.has(name)) {
return current;
}
const parent = path.dirname(current);
if (parent === current) break;
if (parent === current) {
break;
}
current = parent;
}
return null;
@@ -58,7 +62,9 @@ export async function resolveOpenClawPackageRoot(opts: {
for (const candidate of candidates) {
const found = await findPackageRoot(candidate);
if (found) return found;
if (found) {
return found;
}
}
return null;