anti-slop-no-service-constructor-imports
Intent: runtime code obtains a service from its Layer, never by calling its make… constructor.
// ❌ no: in src/runtime.tsimport { makeIssueService } from "./issue-service.ts"
// ✅ yesimport { IssueService } from "./issue-service.ts"
Effect.gen(function* () { const issues = yield* IssueService})Trigger: a named import of make followed by an uppercase letter (makeIssueService, also when renamed) from a relative module.
Exemptions and blind spots: test files, which build services from their constructors to inject fakes. Non-relative imports (packages, path aliases), namespace and default imports, and constructors with another prefix slip through. The same import can also fire adapter-import-boundary.
Why: calling the constructor wires its dependencies by hand, and its requirements stop propagating to the composition root.
Options:
testFiles: shared setting, see Shared settings.
Fix: none
Origin: absorbed from dmmulroy/anti-slop, MIT-licensed: see LICENSE.anti-slop.