Type-only dependencies
What a type-only-dependency finding of fallow dead-code means, why it matters and how to fix it.
What it reports
Production dependency only used via type-only imports.
Dependencies explains how fallow finds it.
Why it matters
Production dependencies that are only imported via import type statements. These can be moved to devDependencies since they generate no runtime code and are stripped during compilation.
Example
zod is in dependencies but only appears in import type declarations.
Fix
Move the package to devDependencies unless runtime code imports it as a value.
Facts
| Fact | Value |
|---|---|
| Issue type | type-only-dependency |
| Rule id in SARIF output | fallow/type-only-dependency |
| Command | fallow dead-code |
| Default severity | warn |
Config key in rules | type-only-dependencies |
| Filter option | --unused-deps |
Fixable with fallow fix | No |
| Opt-in | No |
Note. Only reported in --production mode; --unused-deps scopes it together with the other dependency kinds.