Skip to content

Commit 4e14b19

Browse files
committed
chore(eslint): enforce no-explicit-any with bulk suppressions for existing violations
1 parent 787e6ba commit 4e14b19

7 files changed

Lines changed: 1856 additions & 28 deletions

File tree

packages/config-eslint/base.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ import js from "@eslint/js"
22
import eslintConfigPrettier from "eslint-config-prettier"
33
import turboPlugin from "eslint-plugin-turbo"
44
import tseslint from "typescript-eslint"
5-
import onlyWarn from "eslint-plugin-only-warn"
6-
75
/**
86
* A shared ESLint configuration for the repository.
97
*
@@ -21,11 +19,6 @@ export const config = [
2119
"turbo/no-undeclared-env-vars": "off",
2220
},
2321
},
24-
{
25-
plugins: {
26-
onlyWarn,
27-
},
28-
},
2922
{
3023
ignores: ["dist/**"],
3124
},

packages/config-eslint/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
"@next/eslint-plugin-next": "15.5.20",
1313
"eslint": "9.39.4",
1414
"eslint-config-prettier": "10.1.8",
15-
"eslint-plugin-only-warn": "1.2.1",
1615
"eslint-plugin-react": "7.37.5",
1716
"eslint-plugin-react-hooks": "5.2.0",
1817
"eslint-plugin-turbo": "2.10.0",

pnpm-lock.yaml

Lines changed: 0 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/__tests__/helpers/provider-stub.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { type Task } from "../../core/task/Task"
1212
* Pass `tasks` (array of Task mocks) to pre-seed the registry in stack order.
1313
* The legacy `clineStack` key is accepted and converted automatically.
1414
*/
15-
export function makeProviderStub<T extends object>(stub: T): T {
15+
export function makeProviderStub<T extends object>(stub: T): ClineProvider {
1616
const s = stub as any
1717
const proto = ClineProvider.prototype as any
1818
s.delegationTransitionLocks ??= new Map()
@@ -29,8 +29,8 @@ export function makeProviderStub<T extends object>(stub: T): T {
2929
}
3030
delete s.clineStack
3131

32-
s.runDelegationTransition = proto.runDelegationTransition.bind(s)
32+
s.runDelegationTransition ??= proto.runDelegationTransition.bind(s)
3333
s.removeClineFromStack ??= proto.removeClineFromStack.bind(s)
3434
s.evictCurrentTask ??= proto.evictCurrentTask.bind(s)
35-
return s
35+
return s as unknown as ClineProvider
3636
}

src/__tests__/removeClineFromStack-delegation.spec.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,9 @@ describe("ClineProvider.markDelegatedChildInterrupted() — live eviction path",
301301
return { historyItem: { id: childTaskId, status: "interrupted", parentTaskId } }
302302
})
303303

304+
const realRunDelegation = ClineProvider.prototype["runDelegationTransition"].bind({
305+
delegationTransitionLocks: new Map(),
306+
})
304307
const provider = makeProviderStub({
305308
clineStack: [] as any[],
306309
taskEventListeners: new Map(),
@@ -320,15 +323,13 @@ describe("ClineProvider.markDelegatedChildInterrupted() — live eviction path",
320323
return undefined
321324
}),
322325
},
326+
// Wrap the real runDelegationTransition to set lockAcquired before the lock fires
327+
runDelegationTransition: async (parentId: string, fn: () => Promise<void>) => {
328+
lockAcquired = true
329+
return realRunDelegation(parentId, fn)
330+
},
323331
})
324332

325-
// Patch runDelegationTransition to set lockAcquired before calling fn
326-
const realRunDelegation = provider["runDelegationTransition"].bind(provider)
327-
provider["runDelegationTransition"] = async (_parentId: string, fn: () => Promise<void>) => {
328-
lockAcquired = true
329-
return realRunDelegation(_parentId, fn)
330-
}
331-
332333
await (ClineProvider.prototype as any).markDelegatedChildInterrupted.call(provider, {
333334
childTaskId,
334335
parentTaskId,
@@ -642,7 +643,7 @@ describe("onTaskCompleted callback — writes completed status before re-emittin
642643
`[onTaskCompleted] Failed to write completed status for ${taskId}: ${err instanceof Error ? err.message : String(err)}`,
643644
)
644645
}
645-
provider["emit"]("TaskCompleted", taskId, {}, {})
646+
emit("TaskCompleted", taskId, {}, {})
646647
}
647648

648649
return { onTaskCompleted, updateTaskHistory, emit, log }

0 commit comments

Comments
 (0)