> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/Effect-TS/tsgo/llms.txt
> Use this file to discover all available pages before exploring further.

# Diagnostics overview

> All Effect-specific diagnostics grouped by category, with severity levels, quick fix availability, and V3/V4 compatibility.

The Effect Language Service ships with 52 diagnostics that catch correctness issues, anti-patterns, missing Effect-native APIs, and style inconsistencies in your Effect-TS code. Diagnostics appear inline in your editor just like TypeScript's built-in type errors, and many include a quick fix you can apply in one keystroke.

## Categories

<CardGroup cols={2}>
  <Card title="Correctness" icon="circle-xmark" href="/diagnostics/correctness">
    Wrong, unsafe, or structurally invalid code patterns. 14 rules.
  </Card>

  <Card title="Anti-patterns" icon="triangle-exclamation" href="/diagnostics/anti-patterns">
    Discouraged patterns that often lead to bugs or confusing behavior. 17 rules.
  </Card>

  <Card title="Effect-native" icon="bolt" href="/diagnostics/effect-native">
    Prefer Effect-native APIs and abstractions when available. 5 rules.
  </Card>

  <Card title="Style" icon="paintbrush" href="/diagnostics/style">
    Cleanup, consistency, and idiomatic Effect code. 16 rules.
  </Card>
</CardGroup>

## Severity levels

Every diagnostic has a default severity. You can override any severity in your plugin configuration.

| Symbol | Severity       | Behavior                                                                |
| ------ | -------------- | ----------------------------------------------------------------------- |
| ❌      | **Error**      | Blocks compilation; appears as a red underline in editors               |
| ⚠️     | **Warning**    | Highlighted in editors; does not block compilation by default           |
| 💡     | **Suggestion** | Shown as a hint or lightbulb; off by default in `tsc` CLI output        |
| ➖      | **Off**        | Disabled by default; must be explicitly enabled in `diagnosticSeverity` |

<Note>
  Suggestion-level diagnostics do not affect the `tsc` exit code by default. You can control this with `ignoreEffectSuggestionsInTscExitCode` in your plugin options.
</Note>

## Quick fixes

Diagnostics marked with 🔧 include an automatic quick fix. In VS Code, place your cursor on the highlighted code and press `Ctrl+.` (or `Cmd+.` on macOS) to apply the fix. In Neovim, use your LSP code action binding.

## V3 / V4 compatibility

Most diagnostics work with both Effect V3 and V4. Some rules are version-specific:

* Rules marked **V4 only**: `outdatedApi`, `serviceNotAsClass`
* Rules marked **V3 only**: `nonObjectEffectServiceType`, `runEffectInsideEffect`, `schemaSyncInEffect`, `scopeInLayerEffect`, `schemaUnionOfLiterals`, `missingEffectServiceDependency`

The language service detects your Effect version automatically and skips rules that do not apply.

## Viewing diagnostics

Diagnostics appear as inline underlines in any editor connected to the Effect Language Service. Hover over an underlined symbol to see the diagnostic message and suggested fix.

To see all diagnostics in a project at once via the command line, run `tsc` with your configured `tsconfig.json`:

```bash theme={null}
npx tsc --noEmit
```

Effect diagnostics are reported alongside standard TypeScript errors because the language service plugin runs as part of the TypeScript compiler.

## Configuring severity

Override the default severity of any rule using `diagnosticSeverity` in your `tsconfig.json` plugin configuration:

```jsonc theme={null}
{
  "compilerOptions": {
    "plugins": [
      {
        "name": "@effect/language-service",
        "diagnosticSeverity": {
          // Enable an off-by-default rule
          "anyUnknownInErrorContext": "warning",
          // Downgrade an error to a warning
          "floatingEffect": "warning",
          // Disable a rule entirely
          "effectMapVoid": "off"
        }
      }
    ]
  }
}
```

See the [Diagnostic severity](/configuration/diagnostic-severity) configuration page for the full reference and all accepted severity values.

## Full diagnostics table

### Correctness

\| Diagnostic | Severity | Fix | V3 | V4 |
\|------------|----------|-----|----|----||
\| `anyUnknownInErrorContext` | ➖ | | ✓ | ✓ |
\| `classSelfMismatch` | ❌ | 🔧 | ✓ | ✓ |
\| `duplicatePackage` | ⚠️ | | ✓ | ✓ |
\| `effectFnImplicitAny` | ❌ | | ✓ | ✓ |
\| `floatingEffect` | ❌ | | ✓ | ✓ |
\| `genericEffectServices` | ⚠️ | | ✓ | ✓ |
\| `missingEffectContext` | ❌ | | ✓ | ✓ |
\| `missingEffectError` | ❌ | 🔧 | ✓ | ✓ |
\| `missingLayerContext` | ❌ | | ✓ | ✓ |
\| `missingReturnYieldStar` | ❌ | 🔧 | ✓ | ✓ |
\| `missingStarInYieldEffectGen` | ❌ | 🔧 | ✓ | ✓ |
\| `nonObjectEffectServiceType` | ❌ | | ✓ | |
\| `outdatedApi` | ⚠️ | | | ✓ |
\| `overriddenSchemaConstructor` | ❌ | 🔧 | ✓ | ✓ |

### Anti-patterns

\| Diagnostic | Severity | Fix | V3 | V4 |
\|------------|----------|-----|----|----||
\| `catchUnfailableEffect` | 💡 | | ✓ | ✓ |
\| `effectFnIife` | ⚠️ | 🔧 | ✓ | ✓ |
\| `effectGenUsesAdapter` | ⚠️ | | ✓ | ✓ |
\| `effectInFailure` | ⚠️ | | ✓ | ✓ |
\| `effectInVoidSuccess` | ⚠️ | | ✓ | ✓ |
\| `globalErrorInEffectCatch` | ⚠️ | | ✓ | ✓ |
\| `globalErrorInEffectFailure` | ⚠️ | | ✓ | ✓ |
\| `layerMergeAllWithDependencies` | ⚠️ | 🔧 | ✓ | ✓ |
\| `leakingRequirements` | 💡 | | ✓ | ✓ |
\| `multipleEffectProvide` | ⚠️ | 🔧 | ✓ | ✓ |
\| `returnEffectInGen` | 💡 | 🔧 | ✓ | ✓ |
\| `runEffectInsideEffect` | 💡 | 🔧 | ✓ | |
\| `schemaSyncInEffect` | 💡 | | ✓ | |
\| `scopeInLayerEffect` | ⚠️ | 🔧 | ✓ | |
\| `strictEffectProvide` | ➖ | | ✓ | ✓ |
\| `tryCatchInEffectGen` | 💡 | | ✓ | ✓ |
\| `unknownInEffectCatch` | ⚠️ | | ✓ | ✓ |

### Effect-native

\| Diagnostic | Severity | Fix | V3 | V4 |
\|------------|----------|-----|----|----||
\| `extendsNativeError` | ➖ | | ✓ | ✓ |
\| `globalFetch` | ➖ | | ✓ | ✓ |
\| `instanceOfSchema` | ➖ | 🔧 | ✓ | ✓ |
\| `nodeBuiltinImport` | ➖ | | ✓ | ✓ |
\| `preferSchemaOverJson` | 💡 | | ✓ | ✓ |

### Style

\| Diagnostic | Severity | Fix | V3 | V4 |
\|------------|----------|-----|----|----||
\| `catchAllToMapError` | 💡 | 🔧 | ✓ | ✓ |
\| `deterministicKeys` | ➖ | 🔧 | ✓ | ✓ |
\| `effectFnOpportunity` | 💡 | 🔧 | ✓ | ✓ |
\| `effectMapVoid` | 💡 | 🔧 | ✓ | ✓ |
\| `effectSucceedWithVoid` | 💡 | 🔧 | ✓ | ✓ |
\| `missedPipeableOpportunity` | ➖ | 🔧 | ✓ | ✓ |
\| `missingEffectServiceDependency` | ➖ | | ✓ | |
\| `redundantSchemaTagIdentifier` | 💡 | 🔧 | ✓ | ✓ |
\| `schemaStructWithTag` | 💡 | 🔧 | ✓ | ✓ |
\| `schemaUnionOfLiterals` | ➖ | 🔧 | ✓ | |
\| `serviceNotAsClass` | ➖ | 🔧 | | ✓ |
\| `strictBooleanExpressions` | ➖ | | ✓ | ✓ |
\| `unnecessaryEffectGen` | 💡 | 🔧 | ✓ | ✓ |
\| `unnecessaryFailYieldableError` | 💡 | 🔧 | ✓ | ✓ |
\| `unnecessaryPipe` | 💡 | 🔧 | ✓ | ✓ |
\| `unnecessaryPipeChain` | 💡 | 🔧 | ✓ | ✓ |
