Skip to content
Fallow home
All docs pages

Docs home

Unrendered components

What an unrendered-component finding of fallow dead-code means, why it matters and how to fix it.

What it reports

A Vue / Svelte component is reachable through a barrel but rendered nowhere.

Dead code explains how fallow finds it.

Why it matters

A component is reachable in the module graph (a barrel re-exports it) but rendered nowhere in the project. The rule covers Vue, Svelte and Astro single-file components (the default export of a .vue, .svelte or .astro file), Angular components with an element selector, and Lit elements. For a single-file component: no <Tag>, no :is / this= binding, no components / app.component registration, no h() / auto-import use, and no script value-read. It survives unused-file (the barrel keeps it reachable) and unused-export (the re-export counts as a use), yet no file actually renders it. To fix: render the component somewhere, or delete it and drop the dead re-export. Defaults to warn, not error: a component can be rendered reflectively (a dynamic <component :is> resolved from a non-literal value), so analyzer confidence is lower. Components that are themselves entry points (route pages, layouts, App.vue) and components re-exported from a non-private package entry point are abstained.

Example

components/Orphan.vue is re-exported from a barrel (export { default as Orphan } from './Orphan.vue') but no template, registration, h() call, or dynamic import ever renders it.

Fix

Render the component where it belongs, or delete it and remove the dead barrel re-export. If it is rendered reflectively (a dynamic <component :is> from a non-literal value), suppress the line with // fallow-ignore-next-line unrendered-component.

Facts

FactValue
Issue typeunrendered-component
Rule id in SARIF outputfallow/unrendered-component
Commandfallow dead-code
Default severitywarn
Config key in rulesunrendered-components
Filter option--unrendered-components
Suppression comment// fallow-ignore-next-line unrendered-component
Fixable with fallow fixNo
Opt-inNo