refactor: fix lint errors across server and client

- replace any types with explicit types in scenario file listing,
  import/export and mcp upload code
- type test server addresses and list callbacks, drop unused vars
- document why e2e export keeps the archiver import-require form
- remove unused scenario files total state in the client
- require clean lint in both packages in CLAUDE.md
This commit is contained in:
Andrii Arsenin committed 2026-09-30 18:55:17 +03:00
1 parent 35293e372b
commit 965f262c0f
9 files changed
+41 -27

No files matched your search

+6 -3
View File
@@ -13,6 +13,7 @@ import { ScenarioStepEntity } from "../src/scenario/scenario-step.entity";
import { ScenarioRunEntity } from "../src/scenario/scenario-run.entity";
import { ScenarioRunStepEntity } from "../src/scenario/scenario-run-step.entity";
import { ScenarioSchedulerService } from "../src/scenario/scenario-scheduler.service";
import type { AddressInfo } from "net";
describe("Exec Context File Methods Integration Tests", () => {
let app: INestApplication;
@@ -57,7 +58,7 @@ describe("Exec Context File Methods Integration Tests", () => {
// Start a test HTTP server for downloadFile tests
testServer = await createTestServer();
testServerUrl = `http://localhost:${(testServer.address() as any).port}`;
testServerUrl = `http://localhost:${(testServer.address() as AddressInfo).port}`;
});
afterAll(async () => {
@@ -69,7 +70,7 @@ describe("Exec Context File Methods Integration Tests", () => {
// Clean up files directory
try {
await fs.rm(filesDir, { recursive: true, force: true });
} catch (err) {
} catch {
// Ignore errors if directory doesn't exist
}
@@ -223,7 +224,9 @@ describe("Exec Context File Methods Integration Tests", () => {
expect(output.total).toBeGreaterThanOrEqual(1);
// Find the uploaded file in the output
const foundFile = output.items.find((f: any) => f.id === uploadedFile.id);
const foundFile = output.items.find(
(f: { id: string; name: string }) => f.id === uploadedFile.id,
);
expect(foundFile).toBeDefined();
expect(foundFile.name).toBe("test-file.txt");
expect(foundFile.mimeType).toBe("text/plain");