Skip to content

Latest commit

 

History

History
63 lines (51 loc) · 1.33 KB

unnecessary-pipe.md

File metadata and controls

63 lines (51 loc) · 1.33 KB

unnecessaryPipe

Removes pipe calls with no arguments

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

Preview

import { pipe } from "effect/Function"

export const preview = pipe(1)
/**
                       ^^^^^^^ effecttsgo(unnecessary-pipe): This pipe call contains no arguments.
*/

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": {
          "unnecessaryPipe": "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": "warn"
  }
}