Warns when importing @effect/schema in projects targeting Effect v4, where Schema is included directly in the effect package
| Property | Value |
|---|---|
| Category | Correctness |
| Default severity | warning |
| Fixable | No |
| Effect versions | v4 |
| Diagnostic codes | TS377128 |
| Language Service name | obsoleteSchemaImport |
| Oxlint name | effecttsgo/obsolete-schema-import |
import { Effect } from "effect"
// @ts-expect-error - @effect/schema is obsolete in v4
import * as S from "@effect/schema/Schema"
/**
^^^^^^^^^^^^^^^^^^^^^^^ effecttsgo(obsolete-schema-import): This module reference imports `@effect/schema/Schema`, which is obsolete in Effect v4. In Effect v4, Schema is provided directly by `Schema` from `effect` (or `effect/Schema`).
*/
export const preview = Effect.sync(() => S)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/obsolete-schema-import": "warn"
}
}
{ "$schema": "./node_modules/@effect/tsgo/schema.json", "compilerOptions": { "plugins": [ { "name": "@effect/language-service", "diagnosticSeverity": { "obsoleteSchemaImport": "warning" } } ] } }