Summary
missedPipeableOpportunity only targets the method form x.pipe(a, b). Codebases whose house style is the standalone pipe(x, a, b) function form can't make this diagnostic emit their style — enabling it pushes code the opposite way, so they must leave it off and lose chain-enforcement entirely. Requesting an option to select output style.
Current behavior
packages/language-service/src/diagnostics/missedPipeableOpportunity.ts hardcodes the method form in both the message (~L235, `${subjectText}.pipe(...)`) and the fix (~L257):
const pipeNode = ts.factory.createCallExpression(
ts.factory.createPropertyAccessExpression(pipeableSubjectNode, 'pipe'),
undefined,
pipeArgs,
)
Only pipeableMinArgCount is configurable; nothing controls method-vs-function.
Proposal
Add pipeableStyle: "method" | "data-first" (default "method" preserves today). When "data-first", emit pipe(subject, ...pipeArgs) — a sibling node, and pipe is already imported from effect/Function in this file. The repo already models this axis via the togglePipeStyle / pipeableToDatafirst refactors; this asks the diagnostic to honor it too.
Environment
@effect/tsgo@0.19.0, Effect v4 (4.0.0-beta.98).
Summary
missedPipeableOpportunityonly targets the method formx.pipe(a, b). Codebases whose house style is the standalonepipe(x, a, b)function form can't make this diagnostic emit their style — enabling it pushes code the opposite way, so they must leave itoffand lose chain-enforcement entirely. Requesting an option to select output style.Current behavior
packages/language-service/src/diagnostics/missedPipeableOpportunity.tshardcodes the method form in both the message (~L235,`${subjectText}.pipe(...)`) and the fix (~L257):Only
pipeableMinArgCountis configurable; nothing controls method-vs-function.Proposal
Add
pipeableStyle: "method" | "data-first"(default"method"preserves today). When"data-first", emitpipe(subject, ...pipeArgs)— a sibling node, andpipeis already imported fromeffect/Functionin this file. The repo already models this axis via thetogglePipeStyle/pipeableToDatafirstrefactors; this asks the diagnostic to honor it too.Environment
@effect/tsgo@0.19.0, Effect v4 (4.0.0-beta.98).