chore(lint): enable additional cleanup rules

This commit is contained in:
Peter Steinberger
2026-04-18 20:00:26 +01:00
parent 4fa961d4f1
commit 155162a8cd
22 changed files with 39 additions and 42 deletions

View File

@@ -13,7 +13,7 @@ export function makeTempDir(tempDirs: string[] | Set<string>, prefix: string): s
}
export function cleanupTempDirs(tempDirs: string[] | Set<string>): void {
const dirs = Array.isArray(tempDirs) ? tempDirs.splice(0, tempDirs.length) : [...tempDirs];
const dirs = Array.isArray(tempDirs) ? tempDirs.splice(0) : [...tempDirs];
for (const dir of dirs) {
fs.rmSync(dir, { recursive: true, force: true });
}

View File

@@ -14,7 +14,7 @@ export function writeJsonFile(filePath: string, value: unknown): void {
}
export function cleanupTempDirs(tempDirs: string[]): void {
for (const dir of tempDirs.splice(0, tempDirs.length)) {
for (const dir of tempDirs.splice(0)) {
fs.rmSync(dir, { recursive: true, force: true });
}
}