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.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.
Categories
Correctness
Wrong, unsafe, or structurally invalid code patterns. 14 rules.
Anti-patterns
Discouraged patterns that often lead to bugs or confusing behavior. 17 rules.
Effect-native
Prefer Effect-native APIs and abstractions when available. 5 rules.
Style
Cleanup, consistency, and idiomatic Effect code. 16 rules.
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 |
Suggestion-level diagnostics do not affect the
tsc exit code by default. You can control this with ignoreEffectSuggestionsInTscExitCode in your plugin options.Quick fixes
Diagnostics marked with 🔧 include an automatic quick fix. In VS Code, place your cursor on the highlighted code and pressCtrl+. (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
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, runtsc with your configured tsconfig.json:
Configuring severity
Override the default severity of any rule usingdiagnosticSeverity in your tsconfig.json plugin configuration:
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 | 💡 | 🔧 | ✓ | ✓ |