Disallows Schema.Schema.Type and Schema.Codec.Encoded-style helpers in favor of typeof X.Type and typeof X.Encoded
| Property | Value |
|---|---|
| Category | Style |
| Default severity | off |
| Fixable | Yes |
| Effect versions | v3, v4 |
| Diagnostic codes | TS377104 |
| Language Service name | preferSchemaTypeProperty |
| Oxlint name | effecttsgo/prefer-schema-type-property |
import { Schema } from "effect"
const User = Schema.Struct({ name: Schema.String })
type User = Schema.Schema.Type<typeof User>
/**
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ effecttsgo(prefer-schema-type-property): Do not use `Schema.Schema.Type<typeof X>`. Use `typeof X.Type` instead.
*/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-type-property": "warn"
}
}
{ "$schema": "./node_modules/@effect/tsgo/schema.json", "compilerOptions": { "plugins": [ { "name": "@effect/language-service", "diagnosticSeverity": { "preferSchemaTypeProperty": "warning" } } ] } }