Skip to content

Commit c4fe360

Browse files
committed
no-mistakes(document): Applied lint fixes; all documentation accurate
1 parent 4e65d43 commit c4fe360

9 files changed

Lines changed: 7415 additions & 7367 deletions

File tree

apps/cli/src/agent/__tests__/json-event-emitter-result.test.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,6 @@ describe("JsonEventEmitter result emission", () => {
8787
])
8888
})
8989

90-
91-
9290
it("uses the terminal discriminator for aggregate JSON output", () => {
9391
const { stdout, content } = createMockStdout()
9492
const emitter = new JsonEventEmitter({ mode: "json", stdout, authoritativeCompletion: true })

apps/cli/src/commands/cli/__tests__/run.test.ts

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ vi.mock("@/lib/utils/shell.js", () => ({
2727
}))
2828

2929
vi.mock("@/agent/index.js", () => ({
30+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
3031
ExtensionHost: vi.fn(function (this: any) {
3132
this.activate = vi.fn(() => Promise.resolve())
3233
this.client = { hasActiveTask: vi.fn(() => false) }
@@ -67,18 +68,14 @@ describe("run command validation", () => {
6768
const flags: FlagOptions = { sessionId: "" }
6869

6970
await expect(run(undefined, flags)).rejects.toThrow("process.exit: 1")
70-
expect(consoleErrorSpy).toHaveBeenCalledWith(
71-
"[CLI] Error: --session-id requires a non-empty session id",
72-
)
71+
expect(consoleErrorSpy).toHaveBeenCalledWith("[CLI] Error: --session-id requires a non-empty session id")
7372
})
7473

7574
it("should reject invalid --session-id format", async () => {
7675
const flags: FlagOptions = { sessionId: "not-a-uuid" }
7776

7877
await expect(run(undefined, flags)).rejects.toThrow("process.exit: 1")
79-
expect(consoleErrorSpy).toHaveBeenCalledWith(
80-
"[CLI] Error: --session-id must be a valid UUID session id",
81-
)
78+
expect(consoleErrorSpy).toHaveBeenCalledWith("[CLI] Error: --session-id must be a valid UUID session id")
8279
})
8380

8481
it("should reject empty --create-with-session-id", async () => {
@@ -137,6 +134,7 @@ describe("run command validation", () => {
137134
describe("provider validation", () => {
138135
it("should reject invalid provider", async () => {
139136
const flags: FlagOptions = {
137+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
140138
provider: "invalid-provider" as any,
141139
print: true,
142140
}
@@ -189,6 +187,7 @@ describe("run command validation", () => {
189187
it("should enforce orchestrator mode in autonomous", async () => {
190188
const flags: FlagOptions = {
191189
autonomous: true,
190+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
192191
mode: "code" as any,
193192
workspace: tempDir,
194193
timeout: 60,
@@ -214,14 +213,13 @@ describe("run command validation", () => {
214213
describe("output format validation", () => {
215214
it("should reject invalid output format", async () => {
216215
const flags: FlagOptions = {
216+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
217217
outputFormat: "invalid" as any,
218218
print: true,
219219
}
220220

221221
await expect(run("test", flags)).rejects.toThrow("process.exit: 1")
222-
expect(consoleErrorSpy).toHaveBeenCalledWith(
223-
expect.stringContaining("[CLI] Error: Invalid output format"),
224-
)
222+
expect(consoleErrorSpy).toHaveBeenCalledWith(expect.stringContaining("[CLI] Error: Invalid output format"))
225223
})
226224

227225
it("should require --print with non-text output format in TTY", async () => {
@@ -283,9 +281,7 @@ describe("run command validation", () => {
283281
}
284282

285283
await expect(run(undefined, flags)).rejects.toThrow("process.exit: 1")
286-
expect(consoleErrorSpy).toHaveBeenCalledWith(
287-
"[CLI] Error: --stdin-prompt-stream requires piped stdin",
288-
)
284+
expect(consoleErrorSpy).toHaveBeenCalledWith("[CLI] Error: --stdin-prompt-stream requires piped stdin")
289285
})
290286

291287
it("should reject prompt with --stdin-prompt-stream", async () => {
@@ -350,6 +346,7 @@ describe("run command validation", () => {
350346
describe("reasoning effort validation", () => {
351347
it("should reject invalid reasoning effort", async () => {
352348
const flags: FlagOptions = {
349+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
353350
reasoningEffort: "invalid" as any,
354351
print: true,
355352
}

src/api/providers/__tests__/friendli.spec.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,16 @@ describe("FriendliHandler", () => {
142142
},
143143
])(
144144
"should expose newly added model $modelId",
145-
({ modelId, contextWindow, maxTokens, supportsMaxTokens, inputPrice, outputPrice, cacheWritesPrice, cacheReadsPrice }) => {
145+
({
146+
modelId,
147+
contextWindow,
148+
maxTokens,
149+
supportsMaxTokens,
150+
inputPrice,
151+
outputPrice,
152+
cacheWritesPrice,
153+
cacheReadsPrice,
154+
}) => {
146155
expect(friendliModels[modelId]).toBeDefined()
147156
const info = friendliModels[modelId] as import("@roo-code/types").ModelInfo
148157
expect(info.maxTokens).toBe(maxTokens)

0 commit comments

Comments
 (0)