Files
opencode/script/ast-grep/effect-simplifications/rules/no-identity-pipe.yml
2026-08-27 19:11:03 -04:00

13 lines
470 B
YAML

id: no-identity-pipe
language: TypeScript
message: Remove identity callbacks from pipe calls.
severity: error
rule:
any:
- pattern: $RECEIVER.pipe(($VALUE) => $VALUE)
- pattern: $RECEIVER.pipe($VALUE => $VALUE)
- pattern: "$RECEIVER.pipe(($VALUE: $TYPE) => $VALUE)"
- pattern: $RECEIVER.pipe(($VALUE) => { return $VALUE })
- pattern: $RECEIVER.pipe($VALUE => { return $VALUE })
- pattern: "$RECEIVER.pipe(($VALUE: $TYPE) => { return $VALUE })"