Skip to main content
Every Effect diagnostic has a default severity that determines how it appears in your editor and whether it affects tsc’s exit code. You can override any diagnostic’s severity globally in tsconfig.json or locally using directive comments.

Severity levels

Diagnostics marked in the diagnostics table are off by default. You must explicitly set them in diagnosticSeverity to enable them.

Global severity overrides

Use the diagnosticSeverity plugin option in tsconfig.json to override the default severity for any rule.
tsconfig.json

Common patterns

Enable an off-by-default rule Rules default to off when they are opinionated or project-specific. Enable them by assigning any active severity:
Downgrade an error to a warning Useful when adopting a new diagnostic incrementally:
Disable a built-in rule

Exit code control

By default, only error-severity diagnostics affect tsc’s exit code. Use these options to adjust that behaviour:
When true, Effect diagnostics at suggestion or message severity do not cause a non-zero tsc exit code. Diagnostics are still reported; they just won’t fail CI.Set to false if you want suggestions to be treated as build failures:
When true, Effect diagnostics at warning severity do not cause a non-zero tsc exit code. Useful when you want warning-level feedback in your editor without blocking CI.
When true, Effect error-severity diagnostics do not cause a non-zero tsc exit code. This lets you run tsc in check mode without blocking on Effect-specific errors.

Directive comments

You can override diagnostic severity for a specific block or line using directive comments, without touching tsconfig.json.

Block-level: @effect-diagnostics

A @effect-diagnostics comment applies until it is overridden by another directive or the end of the file.
You can combine multiple rules in a single directive:

Line-level: @effect-diagnostics-next-line

A @effect-diagnostics-next-line comment applies only to the immediately following line.
Your editor will offer completion suggestions for both directive forms, including available rule names and severity values.

Directive-based enabling with skipDisabledOptimization

By default, globally disabled diagnostics are skipped entirely during analysis for performance. This means @effect-diagnostics directives cannot re-enable a rule that has "off" in diagnosticSeverity. Set skipDisabledOptimization: true to process all diagnostics regardless of their global setting, allowing directive comments to re-enable individual rules on a per-section basis:
tsconfig.json
Enabling skipDisabledOptimization increases analysis time proportional to the number of disabled rules. Only enable it when you actively use directive-based overrides for globally disabled diagnostics.