Suggests using Schema.TaggedError instead of Data.TaggedError
| Property | Value |
|---|---|
| Category | Style |
| Default severity | off |
| Fixable | No |
| Effect versions | v3, v4 |
| Diagnostic codes | TS377139 |
| Language Service name | preferSchemaTaggedError |
| Oxlint name | effecttsgo/prefer-schema-tagged-error |
import { Data } from "effect"
export class NotFound extends Data.TaggedError("NotFound")<{
/**
^^^^^^^^ effecttsgo(prefer-schema-tagged-error): Prefer `Schema.TaggedError` over `Data.TaggedError` for an explicit schema contract.
*/
id: string
}> {}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/prefer-schema-tagged-error": "warn"
}
}
{ "$schema": "./node_modules/@effect/tsgo/schema.json", "compilerOptions": { "plugins": [ { "name": "@effect/language-service", "diagnosticSeverity": { "preferSchemaTaggedError": "warning" } } ] } }