Unused namespace members
What an unused-namespace-member finding of fallow dead-code means, why it matters and how to fix it.
What it reports
Namespace member is never referenced.
Dead code explains how fallow finds it.
Why it matters
No code reads the member, but its export makes it look like an API that other code depends on. People keep it in step during refactors and do not dare to remove it.
Example
src/lib/legacy.ts exports namespace Legacy with a member unusedInner that no file reads as Legacy.unusedInner.
Fix
Remove the unused member, or remove its export keyword when only the namespace body uses it. For generated code, turn the rule off for those files in overrides. Suppress an intentional member with // fallow-ignore-next-line unused-namespace-member.
Facts
| Fact | Value |
|---|---|
| Issue type | unused-namespace-member |
| Rule id in SARIF output | fallow/unused-namespace-member |
| Command | fallow dead-code |
| Default severity | warn |
Config key in rules | unused-namespace-members |
| Filter option | --unused-namespace-members |
| Suppression comment | // fallow-ignore-next-line unused-namespace-member |
Fixable with fallow fix | No |
| Opt-in | No |