Skip to content
Fallow home
All docs pages

Docs home

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

FactValue
Issue typeunused-namespace-member
Rule id in SARIF outputfallow/unused-namespace-member
Commandfallow dead-code
Default severitywarn
Config key in rulesunused-namespace-members
Filter option--unused-namespace-members
Suppression comment// fallow-ignore-next-line unused-namespace-member
Fixable with fallow fixNo
Opt-inNo