Skip to content

Latest commit

 

History

History
63 lines (51 loc) · 1.54 KB

File metadata and controls

63 lines (51 loc) · 1.54 KB

unnecessaryPipeChain

Simplifies chained pipe calls into a single pipe call

Property Value
Category Style
Default severity suggestion
Fixable Yes
Effect versions v3, v4
Diagnostic codes TS377015
Language Service name unnecessaryPipeChain
Oxlint name effecttsgo/unnecessary-pipe-chain

Preview

import * as Effect from "effect/Effect"

export const preview = Effect.succeed(1).pipe(Effect.asVoid).pipe(Effect.as("done"))
/**
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ effecttsgo(unnecessary-pipe-chain): This expression contains chained `pipe` calls that can be simplified to a single `pipe` call.
*/

Language Service Configuration

See the Language Service setup guide for installation instructions.

{
  "$schema": "./node_modules/@effect/tsgo/schema.json",
  "compilerOptions": {
    "plugins": [
      {
        "name": "@effect/language-service",
        "diagnosticSeverity": {
          "unnecessaryPipeChain": "warning"
        }
      }
    ]
  }
}

Oxlint Configuration

See the Oxlint setup guide for installation and patching instructions.

{
  "$schema": "./node_modules/@effect/tsgo/oxlint-schema.json",
  "options": {
    "typeAware": true
  },
  "plugins": ["effecttsgo"],
  "rules": {
    "effecttsgo/unnecessary-pipe-chain": "warn"
  }
}