Documentation menu

Commands

flog check importsEXPERIMENTAL

Experimental: This check may change before stabilization. It remains read-only and reports incomplete analysis rather than guessing.

Find static TypeScript package imports that are not declared by one workspace.

Usage#

flog check imports --workspace <selector> [--json]

Examples#

flog check imports --workspace apps/website
flog check imports --workspace @example/library --json

Coverage#

The check scans regular executable .ts files below exactly one selected workspace. It does not scan .d.ts or other extensions, follow symlinks, or descend into .git and node_modules directories. Every scanned file must be accepted by Stick's bounded TypeScript parser; a read or parse failure makes the whole check incomplete rather than silently reducing coverage.

Only static import declarations with unescaped string specifiers are analyzed. Relative, package-import-map (#), and URL or runtime built-in specifiers are not package dependencies. Dynamic imports are outside this first bounded slice. An accepted static re-export is reported as incomplete rather than silently ignored. Findings retain whether each use is type-only and its exact source location.

A package is declared when its package name appears in the selected workspace's dependencies, devDependencies, optionalDependencies, or peerDependencies. This command reports used but undeclared packages only; it does not report unused declarations.

Output and exits#

Human output includes the bounded coverage and source locations. --json emits a versioned report containing the workspace, coverage, grouped findings, uses, and explicit analysis failures.

Exit status 0 means the bounded analysis completed with no findings. Findings exit 1 after the report is written. Usage errors exit 2. Unsupported, unreadable, or otherwise incomplete analysis exits 5 and cannot look clean.

Run flog check imports --help for complete current help.

flog check · flog check types