Skip to content

Latest commit

 

History

History
63 lines (51 loc) · 1.37 KB

floating-effect.md

File metadata and controls

63 lines (51 loc) · 1.37 KB

floatingEffect

Detects Effect values that are neither yielded nor assigned

Property Value
Category Correctness
Default severity error
Fixable Yes
Effect versions v3, v4
Diagnostic codes TS377001, TS377058
Language Service name floatingEffect
Oxlint name effecttsgo/floating-effect

Preview

import * as Effect from "effect/Effect"

Effect.log("forgotten")
/**
^^^^^^^^^^^^^^^^^^^^^^^ effecttsgo(floating-effect): This Effect value is neither yielded nor used in an assignment.
*/

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": {
          "floatingEffect": "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/floating-effect": "warn"
  }
}