Skip to main content
Effect V4 (codename “smol”) introduces a redesigned service system and removes several APIs that existed in V3. The Effect Language Service detects which version of Effect you have installed and adjusts its diagnostics accordingly — some rules apply only to V3 projects, others only to V4 projects, and many apply to both.

How version detection works

The language service reads your installed effect package version from node_modules at startup. You do not need to set any option manually — if effect@4.x is detected, V4-only rules activate and V3-only rules are silently disabled. The reverse applies for V3 projects.
If you are working in a monorepo where different packages use different Effect versions, the version is resolved per tsconfig.json root.

Rules that are V3-only

The following diagnostics and completions are disabled automatically when a V4 project is detected. If you see them mentioned in the changelog or documentation, they do not apply to your V4 codebase.

Diagnostics

Completions

Rules that are V4-only

outdatedApi — detect renamed or removed APIs

Severity: warning (enabled by default for V4 projects) The outdatedApi diagnostic scans your code for APIs that existed in Effect V3 but have been removed or renamed in V4. When triggered, it identifies the outdated call site and, where possible, suggests the replacement.
The exact set of APIs flagged by outdatedApi grows as V4 stabilises. Check the CHANGELOG for additions in each release.

serviceNotAsClass — enforce class-based service declarations

Severity: off by default (➖), quick fix available In Effect V4, services are declared using ServiceMap.Service as a class, not as a variable assignment. The serviceNotAsClass diagnostic warns when the variable style is used and offers a quick fix to convert it.
You can enable this rule at warning or error level in your plugin options:

Configuring for a V4 project

1

Install effect-tsgo

Run the guided setup to install and configure @effect/tsgo:
This adds the plugin entry to your tsconfig.json and installs the binary.
2

Verify Effect V4 is installed

Make sure your project depends on effect@4.x:
The language service reads this version automatically — no additional configuration is needed to switch between V3 and V4 rule sets.
3

Enable serviceNotAsClass (optional)

The serviceNotAsClass rule is off by default. To surface it as a warning across your project, add it to diagnosticSeverity in your tsconfig.json:
4

Address outdatedApi warnings

After enabling the plugin, open your editor and look for outdatedApi warnings (yellow underlines). Each warning indicates a V3 API that must be updated. Use the hover tooltip to see the recommended replacement, then apply the change.

Common migration patterns

Service declarations

The most common change when moving from V3 to V4 is converting service variable assignments to class declarations.

Checking for missing V3-only rules

If you relied on rules like scopeInLayerEffect or runEffectInsideEffect in a V3 project and now want similar protection in V4, check the diagnostics overview for the equivalent V4 rules or patterns.
Most correctness rules (missingEffectContext, missingEffectError, floatingEffect, etc.) work identically in both V3 and V4 — your existing rule configuration carries over automatically.