fix(lint): exempt the descendant-sweep test shim from the module-mocking gate (#21362)

#20642 and #20645 added src/main/daemon/mock-descendant-sweep.ts and
src/relay/mock-descendant-sweep.ts: test-only side-effect modules whose whole body is
one vi.mock, imported by 60 suites so mock PTY PIDs never reach the host process table.
Their CI ran before the anti-slop gate landed, so main now fails
`oxlint --config config/oxlint-anti-slop.json` on every PR's merge ref.

File-scoped exemption, like the others in this config, because the root lint scan does
not load the plugin and an inline directive would read back as unused.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
This commit is contained in:
Jinwoo Hong
2026-09-18 00:34:42 -04:00
committed by GitHub
parent a61119ceb0
commit 82ca89124b
+9
View File
@@ -56,6 +56,15 @@
"anti-slop/no-module-mocking": "off"
}
},
// mock-descendant-sweep.ts (daemon and relay) is a test-only side-effect shim: its whole body
// is one vi.mock that keeps mock PTY PIDs away from the host process table, and it exists so
// 60 suites do not each inline the same hoisted factory. It is never imported by product code.
{
"files": ["**/mock-descendant-sweep.ts"],
"rules": {
"anti-slop/no-module-mocking": "off"
}
},
// The exemptions below are file-scoped rather than inline `oxlint-disable` comments
// because the root lint scan does not load this plugin, so an inline directive naming
// an anti-slop rule always reads back as an unused directive there.