Suggests using Effect.ignore or Effect.ignoreCause instead of Effect.catch/catchCause returning Effect.void
| Property | Value |
|---|---|
| Category | Style |
| Default severity | suggestion |
| Fixable | Yes |
| Effect versions | v4 |
| Diagnostic codes | TS377099 |
| Language Service name | catchToIgnore |
| Oxlint name | effecttsgo/catch-to-ignore |
import { Effect } from "effect"
declare const program: Effect.Effect<void, string, never>
export const recovered = program.pipe(
Effect.catch(() => Effect.void)
/**
^^^^^^^^^^^^ effecttsgo(catch-to-ignore): `Effect.ignore` expresses ignored failure more directly than `Effect.catch` returning `Effect.void`.
*/
)See the Language Service setup guide for installation instructions.
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/catch-to-ignore": "warn"
}
}
{ "$schema": "./node_modules/@effect/tsgo/schema.json", "compilerOptions": { "plugins": [ { "name": "@effect/language-service", "diagnosticSeverity": { "catchToIgnore": "warning" } } ] } }