Detects usage of APIs that have been removed or renamed in Effect v4
| Property | Value |
|---|---|
| Category | Correctness |
| Default severity | warning |
| Fixable | No |
| Effect versions | v4 |
| Diagnostic codes | TS377052, TS377053 |
| Language Service name | outdatedApi |
| Oxlint name | effecttsgo/outdated-api |
import { Effect } from "effect"
/**
^ effecttsgo(outdated-api): This project targets Effect v4, but this code uses Effect v3 APIs. The referenced API belongs to the v3 surface rather than the configured v4 surface.
*/
export const preview = Effect.gen(function*() {
// @ts-expect-error
return yield* Effect.runtime()
/**
^^^^^^^ effecttsgo(outdated-api): This project targets Effect v4, but this code uses the Effect v3 API `runtime`. The referenced API belongs to the v3 surface rather than the configured v4 surface. Runtime has been removed in Effect v4. Use Effect.context to grab services and then run using Effect.runPromiseWith.
*/
})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/outdated-api": "warn"
}
}
{ "$schema": "./node_modules/@effect/tsgo/schema.json", "compilerOptions": { "plugins": [ { "name": "@effect/language-service", "diagnosticSeverity": { "outdatedApi": "warning" } } ] } }