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

@@ -98,7 +98,7 @@ describe("session-memory hook", () => {
expect(files.length).toBe(1);
// Read the memory file and verify content
const memoryContent = await fs.readFile(path.join(memoryDir, files[0]!), "utf-8");
const memoryContent = await fs.readFile(path.join(memoryDir, files[0]), "utf-8");
expect(memoryContent).toContain("user: Hello there");
expect(memoryContent).toContain("assistant: Hi! How can I help?");
expect(memoryContent).toContain("user: What is 2+2?");
@@ -140,7 +140,7 @@ describe("session-memory hook", () => {
const memoryDir = path.join(tempDir, "memory");
const files = await fs.readdir(memoryDir);
const memoryContent = await fs.readFile(path.join(memoryDir, files[0]!), "utf-8");
const memoryContent = await fs.readFile(path.join(memoryDir, files[0]), "utf-8");
// Only user/assistant messages should be present
expect(memoryContent).toContain("user: Hello");
@@ -185,7 +185,7 @@ describe("session-memory hook", () => {
const memoryDir = path.join(tempDir, "memory");
const files = await fs.readdir(memoryDir);
const memoryContent = await fs.readFile(path.join(memoryDir, files[0]!), "utf-8");
const memoryContent = await fs.readFile(path.join(memoryDir, files[0]), "utf-8");
// Command messages should be filtered out
expect(memoryContent).not.toContain("/help");
@@ -236,7 +236,7 @@ describe("session-memory hook", () => {
const memoryDir = path.join(tempDir, "memory");
const files = await fs.readdir(memoryDir);
const memoryContent = await fs.readFile(path.join(memoryDir, files[0]!), "utf-8");
const memoryContent = await fs.readFile(path.join(memoryDir, files[0]), "utf-8");
// Only last 3 messages should be present
expect(memoryContent).not.toContain("user: Message 1\n");
@@ -297,7 +297,7 @@ describe("session-memory hook", () => {
const memoryDir = path.join(tempDir, "memory");
const files = await fs.readdir(memoryDir);
const memoryContent = await fs.readFile(path.join(memoryDir, files[0]!), "utf-8");
const memoryContent = await fs.readFile(path.join(memoryDir, files[0]), "utf-8");
// Should have exactly 3 user/assistant messages (the last 3)
expect(memoryContent).not.toContain("First message");
@@ -370,7 +370,7 @@ describe("session-memory hook", () => {
const memoryDir = path.join(tempDir, "memory");
const files = await fs.readdir(memoryDir);
const memoryContent = await fs.readFile(path.join(memoryDir, files[0]!), "utf-8");
const memoryContent = await fs.readFile(path.join(memoryDir, files[0]), "utf-8");
// Both messages should be included
expect(memoryContent).toContain("user: Only message 1");