@use, @forward, SCSS partials (_prefix files), and Tailwind directives are all resolved accurately. No manual configuration needed.
SCSS import resolution
Fallow understands the full SCSS module system. Imports create edges in the module graph, and re-exports propagate through the dependency chain.| Directive | How fallow handles it |
|---|---|
@use 'path' | Resolved as a module import, creating a graph edge |
@forward 'path' | Treated as a re-export in the module graph |
@import 'path' | Legacy import, tracked as a side-effect edge |
@use 'sass:math' | Recognized as a Sass built-in module, not flagged as missing |
@use 'components/button', it resolves through these candidates in order:
components/_button.scss(partial convention)components/button/_index.scss(directory index)components/button/index.scss(plain index)
styles/theme.scss
- Importing the
sass:colorbuilt-in (correctly ignored, not a project dependency) - Importing
./variables, resolved to_variables.scssvia partial convention - Importing
./mixins/responsive, resolved tomixins/_responsive.scss - Re-exporting
$primaryand$secondaryfrom./tokens
SCSS include paths (configured via frameworks like Angular) are also supported. When a bare specifier like
@use 'variables' cannot be resolved locally, fallow searches configured include directories with the same partial and index conventions.CSS Module class tracking
Files with.module.css or .module.scss extensions receive special treatment. Fallow extracts every class name from selectors and exposes them as named exports.
Button.module.css
root, primary, and disabled.
When a component imports a CSS module, fallow tracks which classes are actually accessed:
Button.tsx
styles.root and styles.primary are marked as used. The disabled class is never referenced, so fallow reports it as an unused export.
$ fallow dead-code --unused-exports
Tailwind CSS integration
When fallow encounters@apply or @tailwind directives in any CSS or SCSS file, it creates a synthetic dependency on the tailwindcss package. This prevents false “unused dependency” reports.
globals.css
@tailwind and @apply directives and marks tailwindcss as a used dependency.
The Tailwind plugin provides additional coverage by parsing tailwind.config.{js,ts,cjs,mjs}:
- Content globs from the
contentarray are treated as always-used file patterns - Plugin packages referenced via
require()or string arrays are marked as used dependencies - Presets are tracked as referenced dependencies
- Imports in the config file (e.g.,
import defaultTheme from 'tailwindcss/defaultTheme') are tracked
tailwind.config.js
tailwindcss, @tailwindcss/typography, and @tailwindcss/forms as used dependencies.
CSS @import tracking
Plain CSS @import statements create edges in the module graph. Both relative paths and package imports are tracked.
styles/main.css
./reset.css and ./typography.css as local file imports, and @fontsource/inter as a package dependency. Remote URLs (https://...) and data URIs are correctly ignored.
Common patterns that just work
| Pattern | Example | How fallow handles it |
|---|---|---|
| SCSS partial imports | @use 'mixins' | Resolves to _mixins.scss |
| Sass built-in modules | @use 'sass:math' | Correctly ignored, not flagged as missing |
@use with namespace | @use 'colors' as c | Tracked as module import |
@forward with show/hide | @forward 'tokens' show $primary | Re-export with filtering |
| CSS custom properties | var(--color-primary) | File-level tracking (not per-property) |
| PostCSS plugins | postcss.config.js | Plugin dependencies detected via PostCSS plugin config |
| Scoped CSS packages | @import '@company/tokens/base.scss' | Resolved as npm package, not local file |
| SCSS directory index | @use 'components' | Resolves to components/_index.scss |
See also
Dead code analysis
How fallow builds the module graph and detects unused code.
Non-JS file types
All non-JavaScript file types fallow analyzes automatically.
Configuration
Configure entry points, rules, and analysis scope.