mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 09:50:42 +00:00
chore(lint): enable additional cleanup rules
This commit is contained in:
@@ -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 });
|
||||
}
|
||||
|
||||
@@ -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 });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user