chore: Enable more lint rules, disable some that trigger a lot. Will clean up later.

This commit is contained in:
cpojer
2026-01-31 16:03:28 +09:00
parent 481f696a87
commit 15792b153f
292 changed files with 643 additions and 699 deletions

View File

@@ -411,7 +411,7 @@ export async function autoMigrateLegacyStateDir(params: {
} catch (err) {
try {
if (process.platform === "win32") {
if (!legacyDir) throw new Error("Legacy state dir not found");
if (!legacyDir) throw new Error("Legacy state dir not found", { cause: err });
fs.symlinkSync(targetDir, legacyDir, "junction");
changes.push(formatStateDirMigration(legacyDir, targetDir));
} else {
@@ -419,7 +419,8 @@ export async function autoMigrateLegacyStateDir(params: {
}
} catch (fallbackErr) {
try {
if (!legacyDir) throw new Error("Legacy state dir not found");
if (!legacyDir)
throw new Error("Legacy state dir not found", { cause: err }, { cause: fallbackErr });
fs.renameSync(targetDir, legacyDir);
warnings.push(
`State dir migration rolled back (failed to link legacy path): ${String(fallbackErr)}`,