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

@@ -18,9 +18,7 @@ export function createBundleMcpTempHarness() {
clearPluginDiscoveryCache();
clearPluginManifestRegistryCache();
await Promise.all(
tempDirs
.splice(0, tempDirs.length)
.map((dir) => fs.rm(dir, { recursive: true, force: true })),
tempDirs.splice(0).map((dir) => fs.rm(dir, { recursive: true, force: true })),
);
},
};

View File

@@ -69,8 +69,8 @@ function applyVitestCapabilityAliasOverrides(params: {
}
const {
["openclaw/plugin-sdk"]: _ignoredLegacyRootAlias,
["@openclaw/plugin-sdk"]: _ignoredScopedRootAlias,
"openclaw/plugin-sdk": _ignoredLegacyRootAlias,
"@openclaw/plugin-sdk": _ignoredScopedRootAlias,
...scopedAliasMap
} = params.aliasMap;
return {

View File

@@ -89,7 +89,7 @@ afterEach(() => {
} else {
Reflect.deleteProperty(globalThis as object, "fetch");
}
for (const dir of tempDirs.splice(0, tempDirs.length)) {
for (const dir of tempDirs.splice(0)) {
fs.rmSync(dir, { recursive: true, force: true });
}
});

View File

@@ -20,7 +20,7 @@ export function createGeneratedPluginTempRoot(prefix: string): string {
export function installGeneratedPluginTempRootCleanup() {
afterEach(() => {
for (const dir of tempDirs.splice(0, tempDirs.length)) {
for (const dir of tempDirs.splice(0)) {
fs.rmSync(dir, { recursive: true, force: true });
}
});