newSchemaClass
August 4, 2026 ยท View on GitHub
Suggests using Schema make instead of new for Schema classes
| Property | Value |
|---|---|
| Category | Style |
| Default severity | off |
| Fixable | Yes |
| Effect versions | v4 |
| Diagnostic codes | TS377094 |
| Language Service name | newSchemaClass |
| Oxlint name | effecttsgo/new-schema-class |
Preview
import { Schema } from "effect"
class User extends Schema.Class<User>("User")({ name: Schema.String }) {}
export const preview = new User({ name: "John" })
/**
^^^^ effecttsgo(new-schema-class): This Schema class is constructed with `new`. `User.make(...)` can be used to construct the Schema class instance.
*/
Language Service Configuration
See the Language Service setup guide for installation instructions.
{
"$schema": "./node_modules/@effect/tsgo/schema.json",
"compilerOptions": {
"plugins": [
{
"name": "@effect/language-service",
"diagnosticSeverity": {
"newSchemaClass": "warning"
}
}
]
}
}
Oxlint Configuration
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/new-schema-class": "warn"
}
}