Warns when a class directly extends the native Error class
| Property | Value |
|---|---|
| Category | Effect-native |
| Default severity | off |
| Fixable | No |
| Effect versions | v3, v4 |
| Diagnostic codes | TS377055 |
| Language Service name | extendsNativeError |
| Oxlint name | effecttsgo/extends-native-error |
export class PreviewError extends Error {}
/**
^^^^^^^^^^^^ effecttsgo(extends-native-error): This class extends the native `Error` type directly. Untagged native errors lose distinction in the Effect failure channel.
*/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/extends-native-error": "warn"
}
}
{ "$schema": "./node_modules/@effect/tsgo/schema.json", "compilerOptions": { "plugins": [ { "name": "@effect/language-service", "diagnosticSeverity": { "extendsNativeError": "warning" } } ] } }