Built-in plugins
Find the built-in plugins of fallow, and the packages or files that turn each one on.
Fallow reports a file that your framework loads, and you want to know if fallow knows that framework. A plugin tells fallow the conventions of one framework or tool: its entry points, its config files, the exports that it uses and its tool dependencies. Fallow has 160 built-in plugins, and the tables below name the packages and files that turn each one on.
Fallow turns a built-in plugin on when a package.json of the project lists one of the packages in the "Activated by" column. A name that ends with /, for example @storybook/, matches each package of that scope. Some plugins also turn on when a file exists, or when a package.json script runs the tool.
To see which plugins are on in your project, run:
npx fallow list --plugins
In the demo project, package.json lists vitest and typescript in devDependencies, so two plugins are on:
Active plugins:
- vitest
- typescript
The Vitest plugin makes src/math.test.ts an entry point. When the plugin of your tool is not in this list, check the "Activated by" column below. When your tool has no plugin, write a custom plugin.
Frameworks
| Plugin | Activated by |
|---|---|
| Next.js | next |
| Nuxt | nuxt, @nuxt/kit, or a nuxt.config.* file |
| Pinia | @pinia/nuxt |
| Remix | @remix-run/node, @remix-run/react, @remix-run/cloudflare, @remix-run/cloudflare-pages, @remix-run/deno |
| SvelteKit | @sveltejs/kit |
| Gatsby | gatsby |
| Astro | astro |
| Angular | @angular/core, ng-packagr |
| Ionic | @ionic/angular. See Ionic lifecycle methods. |
| React Router | @react-router/dev |
| SolidStart | @solidjs/start |
| Waku | waku |
| RedwoodSDK | rwsdk |
| TanStack Router | @tanstack/react-router, @tanstack/solid-router, @tanstack/start, @tanstack/react-start, @tanstack/solid-start, @tanstack/virtual-file-routes |
| React Native | react-native. Also reads platform files such as Button.ios.tsx. |
| Expo | expo, when the project does not depend on expo-router. Also reads platform files. The plugin marks fingerprint.config.js as used. It counts a package as used when a font file path in the app config names it, and when the package is a native module with an expo-module.config.json file and no JavaScript entry. |
| Expo Router | expo-router. It gives the same credits to fingerprint.config.js, font packages and native modules as the Expo plugin. |
| Firebase | firebase. The plugin marks public/firebase-messaging-sw.js as used. |
| NestJS | @nestjs/core |
| nestjs-trpc | nestjs-trpc |
| nest-commander | nest-commander |
| AdonisJS | @adonisjs/core |
| Egg.js / tegg | egg, @eggjs/core, @eggjs/tegg, or the package.json key egg, eggPlugin or eggModule |
| Docusaurus | @docusaurus/core |
| Nitro | nitropack |
| Capacitor | @capacitor/core, @capacitor/cli |
| Sanity | sanity, @sanity/ |
| VitePress | vitepress |
| next-intl | next-intl |
| Relay | relay-runtime, react-relay, relay-compiler |
| Electron | electron, electron-builder, @electron-forge/cli, electron-vite |
| Qwik | @builder.io/qwik, @builder.io/qwik-city, @qwik.dev/core, @qwik.dev/router |
| i18next | i18next, react-i18next, vue-i18n, next-i18next |
| Wuchale | wuchale, @wuchale/vite-plugin, or wuchale.config.js |
| Convex | convex |
| Lit | lit, lit-element, @lit/reactive-element |
| Lexical | lexical, @lexical/ |
| Ember | ember-source, ember-cli, @embroider/core, @embroider/compat, @glimmer/component |
| Flue | @flue/runtime |
| Supabase | supabase, supabase/config.toml or supabase/functions/ |
| Content Collections | @content-collections/core, @content-collections/vite, @content-collections/next, @content-collections/solid-start, @content-collections/remix-vite, @content-collections/qwik, @content-collections/vinxi |
| Contentlayer | contentlayer, contentlayer2, next-contentlayer, next-contentlayer2, or contentlayer.config.* |
| Fumadocs | fumadocs-mdx, fumadocs-core, fumadocs-ui, or source.config.* |
| Mintlify | mint, mintlify, or docs.json or mint.json |
| MkDocs | mkdocs.yml, mkdocs.yaml or zensical.toml, also in a subdirectory |
| Velite | velite, or velite.config.* |
| rspress | rspress, @rspress/ |
| dumi | dumi |
| GNOME Shell extension | An extension.js file with a metadata.json beside it. The files extension.js and prefs.js are entry points when the metadata.json has a uuid and a shell-version list. |
| Obsidian | obsidian, or a manifest.json with id, name, version and minAppVersion |
| Browser extension | webextension-polyfill, @types/chrome, @types/firefox-webext-browser, or a manifest.json with manifest_version 2 or 3 |
| GitHub Action | action.yml or action.yaml with runs.using: node* |
| WXT | wxt, @wxt-dev/, or a wxt.config.* file |
| VS Code extension | vscode, @types/vscode, @vscode/test-electron |
Bundlers
| Plugin | Activated by |
|---|---|
| Vite | vite, rolldown-vite, vite-plus |
| Vite+ | vite-plus, or a root vite.config.* that imports vite-plus |
| vite-plugin-pages | vite-plugin-pages |
| unplugin-icons | unplugin-icons |
| Webpack | webpack |
| Rspack | @rspack/core, @rspack/cli |
| Rsbuild | @rsbuild/core |
| Rollup | rollup |
| Rolldown | rolldown |
| Tsup | tsup |
| Tsdown | tsdown |
| pkg-utils | @sanity/pkg-utils |
| Parcel | parcel, @parcel/ |
| Module Federation | @module-federation/enhanced, @module-federation/modern-js, @module-federation/nextjs-mf, @module-federation/node, @module-federation/rsbuild-plugin, @module-federation/rspack, @module-federation/runtime, @module-federation/vite, @module-federation/webpack-bundler-runtime, @originjs/vite-plugin-federation |
Testing
| Plugin | Activated by |
|---|---|
| Vitest | vitest, vite-plus, or a config file |
| Rstest | @rstest/core |
| Jest | jest |
| Playwright | @playwright/test, or playwright with a playwright.config.ts or .js file |
| Cypress | cypress |
| Mocha | mocha |
| Jasmine | jasmine |
| Ava | ava |
| tap | tap |
| tsd | tsd, expect-type |
| Storybook | storybook, @storybook/ |
| Karma | karma |
| Cucumber | @cucumber/cucumber |
| WebdriverIO | webdriverio, @wdio/ |
| k6 | k6, or *.k6.* files |
| Stryker | @stryker-mutator/core, stryker, or a config file |
Linting and formatting
| Plugin | Activated by |
|---|---|
| ESLint | eslint, @eslint/js, or a config file |
| Biome | @biomejs/biome |
| Stylelint | stylelint |
| Prettier | prettier |
| Oxfmt | oxfmt |
| Oxlint | oxlint |
| markdownlint | markdownlint, markdownlint-cli, markdownlint-cli2 |
| CSpell | cspell |
| Remark | remark, remark-cli |
| textlint | textlint |
Transpilers
| Plugin | Activated by |
|---|---|
| TypeScript | typescript, or a tsconfig.json file |
| Babel | @babel/core |
| SWC | @swc/core, @swc/cli |
CSS
| Plugin | Activated by |
|---|---|
| Tailwind | tailwindcss, @tailwindcss/postcss |
| PostCSS | postcss, or a postcss.config.* file |
| UnoCSS | unocss, @unocss/ |
| PandaCSS | @pandacss/dev |
Databases
| Plugin | Activated by |
|---|---|
| Prisma | prisma, @prisma/client |
| Drizzle | drizzle-orm |
| Knex | knex |
| TypeORM | typeorm |
| Kysely | kysely, kysely-ctl |
Monorepos
| Plugin | Activated by |
|---|---|
| Turborepo | turbo |
| Nx | nx |
| Kibana | a kibana.jsonc manifest |
| Changesets | @changesets/cli |
| release-it | release-it |
| Syncpack | syncpack |
| pnpm | pnpm, pnpm-workspace.yaml, pnpm-lock.yaml, .pnpmfile.cjs or .pnpmfile.mjs, or a packageManager field that names pnpm |
CI, deployment and release
| Plugin | Activated by |
|---|---|
| semantic-release | semantic-release |
| Commitlint | @commitlint/cli |
| Commitizen | commitizen |
| commit-and-tag-version | commit-and-tag-version, standard-version |
| Vercel | vercel, @vercel/config, or a vercel.json file |
| Wrangler | wrangler |
| Railway | railway |
| Serverless Framework | serverless, or a root serverless.* config |
| osls | osls |
| Alchemy | alchemy |
| OpenNext Cloudflare | @opennextjs/cloudflare, or an opennextjs-cloudflare command in a package.json script |
| Sentry | @sentry/nextjs, @sentry/react, @sentry/node, @sentry/browser |
| Danger | danger, or a dangerfile.* file |
| CodeRabbit | @coderabbitai/config |
Git hooks
| Plugin | Activated by |
|---|---|
| husky | husky |
| lint-staged | lint-staged |
| lefthook | lefthook, @evilmartians/lefthook |
| simple-git-hooks | simple-git-hooks |
Other tools
| Plugin | Activated by |
|---|---|
| GraphQL Codegen | @graphql-codegen/cli |
| graphql-config | graphql-config, a graphql.config.* or .graphqlrc* file, or a graphql key in package.json |
| TypeDoc | typedoc |
| openapi-ts | openapi-typescript |
| Plop | plop |
| gulp | gulp, gulp-cli |
| SVGO | svgo |
| @vite-pwa/assets-generator | @vite-pwa/assets-generator |
| SVGR | @svgr/core, @svgr/cli, @svgr/webpack, @svgr/rollup, @svgr/vite |
| size-limit | size-limit |
| c8 | c8 |
| CodeRabbit | @coderabbitai/config. The plugin marks .coderabbit.config.ts as used. |
| nyc | nyc |
| MSW | msw |
| nodemon | nodemon |
| PM2 | pm2 |
| dependency-cruiser | dependency-cruiser |
| dotenv | dotenv-cli, @dotenvx/dotenvx, or a dotenv or dotenvx command in a package.json script |
| Hardhat | hardhat |
| n8n | an n8n field in package.json |
| Bun | bun-types, @types/bun |
| Deno | deno.json or deno.jsonc |
| napi-rs | a napi field with targets in package.json |
| Varlock | varlock, @varlock/, or .env.schema |
| mise | mise.toml, .mise.toml, mise/config.toml, .mise/config.toml, .config/mise.toml, .config/mise/config.toml, or a mise command in a package.json script |
| TypeScript content mapper | a typescript.contentMapper field in package.json |
| OpenCode | opencode.json, .opencode/, or @opencode-ai/ |
| OpenTelemetry | any @opentelemetry/ package |
| AG-UI | any @ag-ui/ package |
| eve | eve, or an eve command in a package.json script |
| GNOME Shell extension | a metadata.json file with the uuid and shell-version keys, next to an extension.js file |
Notes for some plugins
The plugins below read more than a package name, or have a rule that can surprise you.
Next.js
The Next.js plugin makes these files entry points, at the project root and under src/, with the extension .ts, .tsx, .js or .jsx:
app/**/files with these names:page,layout,loading,error,not-found,template,default,route,global-error,forbidden,unauthorized,opengraph-image,twitter-image,icon,apple-icon,manifest,sitemapandrobots.app/global-not-found.*.- Each file under
pages/. middleware.*,proxy.*,instrumentation.*andinstrumentation-client.*(.tsor.jsonly).
To check this in your project, run npx fallow list --entry-points. Each route file has (nextjs) after its path, for example app/orders/page.tsx (nextjs). When no line has it, run npx fallow list --plugins to see if the plugin is active.
When next.config.* sets pageExtensions, fallow also matches these files with those extensions. The metadata files (opengraph-image to robots) keep the four default extensions.
Jest
The Jest plugin reads each Jest config of a package: jest.config.*, jest-*.config.* and jest.*.config.*. Each config adds its own test patterns. A --config file that a script passes to jest is also an entry point.
Fallow changes a simple testRegex to a glob. For example, \.integration-spec\.ts$ becomes **/*.integration-spec.ts. When fallow cannot change a regex, add the test files to entry.
Manual mocks in Vitest and Jest
A manual mock is a file in a __mocks__/ directory, for example src/lib/__mocks__/parse.ts for src/lib/parse.ts.
- Jest: the Jest plugin makes each file under
__mocks__/an entry point, also without ajest.mockcall. - Vitest: a
vi.mock("./lib/parse")call without a factory makessrc/lib/__mocks__/parse.tsreachable. For a package,vi.mock("zod")makes__mocks__/zod.tsat the project root reachable. - Vitest: a call with a factory, for example
vi.mock("./lib/parse", () => ({})), does not use the mock file. When no other call names the module, fallow reports the mock file as an unused file.
Fallow does not read a mock call with the path in a variable. Fix a false positive gives the fix.
Nx
Fallow reads the command and commands of each nx:run-commands target as a script, also in the configurations of the target. For example, tsx scripts/seed.ts makes scripts/seed.ts an entry point. Fallow replaces {projectRoot} and {workspaceRoot}.
A command that calls another target of the same project, such as nx ts-node -- src/run.ts, uses the command of that target.
Fallow reads a target only when it runs in the project directory, for example with cwd set to {projectRoot}. A target without cwd in a nested project runs from the workspace root, so fallow skips it. Fallow also skips a target with a cwd that points to another directory, because its relative paths can point to the wrong files.
TypeORM
Fallow reads the migrations option of a DataSource in data-source.{ts,js}, *.data-source.{ts,js}, *.datasource.{ts,js} and ormconfig.{ts,js,json}. Each glob becomes an entry pattern, because TypeORM loads the migrations at run time. When a template selects between two paths, fallow uses the path that starts with src/, or changes a dist/ path to src/.
The files in the directories entity, entities, migration, migrations, subscriber and subscribers, at the root or under src/, are entry points too. Fallow does not read the entities and subscribers options, because an entry point for each matching file would hide the other unused exports of the file.
Classes and enums that a library reads by reflection
Fallow counts each member of a class or an enum as used in these cases:
- An entity class that you give to
getRepository,getCustomRepository,getTreeRepository,getMongoRepositoryorcreateQueryBuilder, also as a type argument. - An entity class that you give to
find,findBy,findOne,findOneBy,findOneOrFail,findOneByOrFail,findAndCountorfindAndCountBy, in a file that importstypeorm,@nestjs/typeormor a@mikro-orm/package. - An enum that you give to
registerEnumTypeof@nestjs/graphqlortype-graphql.
Angular
The Angular plugin reads styles, scripts, main and polyfills of the build targets in angular.json as entry points. For an ng-packagr library, the lib.entryFile of ng-package.json or ng-package.prod.json is the public API entry point. The default is src/public_api.ts, relative to the config directory. Fallow also reads the configs of secondary entry points in the package subtree. The templateUrl and styleUrl of @Component are imports of the template and the style file.
Health scores an Angular template, in an external .html file or in an inline template string, as a <template> finding. Fallow counts these constructs:
- the blocks
@if,@for,@switch,@case,@defer (when ...)and@let, - the directives
*ngIfand*ngFor, - bound attributes (
[x],(x),bind-x,on-x) and\{\{ \}\}interpolations.
An inline template finding is on the line of the @Component decorator. To suppress it, put // fallow-ignore-next-line complexity directly above the decorator. To suppress a finding of an external template, put <!-- fallow-ignore-file complexity --> at the top of the .html file.
Ionic page lifecycle methods
A plugin can declare the lifecycle methods that its framework calls, and fallow then counts a class member with that name as used. The Ionic plugin turns on with @ionic/angular, and it counts ionViewWillEnter, ionViewDidEnter, ionViewWillLeave and ionViewDidLeave as used. Unused class members lists the other methods that fallow does not report.
OpenTelemetry SDK classes
The OpenTelemetry SDK calls the methods of the classes that you register. Fallow counts these members as used:
| Class | Members that count as used |
|---|---|
implements Sampler | shouldSample, toString |
implements SpanProcessor | onStart, onEnding, onEnd, shutdown, forceFlush |
implements SpanExporter | export, shutdown, forceFlush |
implements PushMetricExporter | export, forceFlush, selectAggregationTemporality, selectAggregation, shutdown |
extends MetricReader | onInitialized, onForceFlush, onShutdown |
implements LogRecordProcessor | onEmit, enabled, shutdown, forceFlush |
implements LogRecordExporter | export, shutdown, forceFlush |
implements ContextManager | active, with, bind, enable, disable |
implements TextMapPropagator | inject, extract, fields |
implements TextMapGetter | keys, get |
implements TextMapSetter | set |
Cloudflare Workers
A method call on a Durable Object stub counts as a use of the method of the Durable Object class. Fallow reads the binding types from the worker-configuration.d.ts file that wrangler types writes. The stub can come from the env import of cloudflare:workers, from this.env in a class that extends a base class of cloudflare:workers, or from the env parameter of a handler of the type ExportedHandler<Env>.
import { env } from "cloudflare:workers";
export async function join(name: string): Promise<void> {
// uses Room.join() through the ROOM binding of Env
await env.ROOM.getByName(name).join();
}
A stub at the top level of a module gives no credit: create it in a function body. A handler that names a separate function, as in { fetch }, gets no env type.
The Workers runtime calls the handler methods of a class by name. A class that extends a base class of cloudflare:workers, also through a chain of local classes, gets credit for these methods:
| Base class | Methods that count as used |
|---|---|
DurableObject | alarm, fetch, connect, webSocketMessage, webSocketClose, webSocketError |
WorkerEntrypoint | email, fetch, connect, queue, scheduled, tail, tailStream, test, trace |
WorkflowEntrypoint | run |
The base class must come from an import of cloudflare:workers: a named import or a namespace import, such as cf.DurableObject. A local class or a package class with the same name gives no credit. A static method with a handler name also gets credit, although the runtime calls only instance methods. Other methods of the class stay reported.
Alchemy stacks
No project code imports an Alchemy stack file, so fallow uses these files as entry points:
- each
alchemy.run.*file, at any depth, - each stack file that a
package.jsonscript gives toalchemy deploy,dev,destroyorplan, - the bundle entry that a resource names in its
mainproperty.
A stack runs at deploy time, so a stack file is a support entry. The Worker code that a stack imports stays reachable in production mode. Fallow does not report @effect/platform-node and @effect/platform-bun as unused, because the Alchemy CLI loads them with a dynamic import().
Webpack
Fallow also reads a webpack config under config/, build/ or webpack/, when the file exports a webpack configuration: an object with webpack config keys, an array of configurations, or a webpack-merge call. Under build/, fallow reads only webpack.<target>.{ts,js,mjs,cjs}, because that directory also holds build output. A helper file such as config/webpack.paths.js that exports no configuration stays reported as unused when nothing imports it.
An entry value that names a package counts as a use of that package, also with a resource query: webpack-hot-middleware/client?reload=true credits webpack-hot-middleware. A glob-shaped entry value stays an entry pattern. An entry without an extension matches the source file or the directory index.
Entries resolve as the bundler resolves them:
- Rspack reads
context, and rsbuild readsroot. A relative entry and a Module Federationexposestarget resolve against that directory. - Rspack and rsbuild configs stay at the package root. The
config/,build/andwebpack/directories apply to webpack only. - An
exposestarget and theremotesscope of a webpack config underconfig/,build/orwebpack/resolve against the package root, as webpack does withoutcontext.
Inline loader requests
An import can name its loaders inline, for example require('!raw-loader!./shim.js'). Fallow reads these requests in each project, also without the webpack plugin:
- The request resolves to its last segment (
./shim.js). The!,!!and-!prefixes and the?optionsof a loader do not change the target. Each loader package counts as a used dependency. A loader indevDependenciesis not a dev dependency that production code uses. - A loader import uses each value export of the resource,
defaultincluded. A type export of the resource counts as used only when an import names it. - A text loader (
raw-loader,file-loader,url-loaderand similar) reads the file as text, bytes or a URL. The resource counts as used, but its own imports do not. A loader that runs the file, such ascss-loaderorbabel-loader, keeps the imports of the resource. - A text loader import does not run the resource. It does not cross an architecture boundary, it does not carry server code into a
"use client"file forclient-server-leak, and a re-export through it is not a client or server origin of a mixed barrel. A package behind a text loader (raw-loader!pkg/notes.txt) is a used dependency, but not a production import. Arequire.resolve("./x")call gives only a path, and it follows the same rules. - A worker loader (
worker-loader,sharedworker-loader,comlink-loader,service-worker-loaderand similar) loads the resource likenew Worker(...).circularDependencies.ignoreLazyImportsskips a cycle through such an import.fallow list --entry-weightcounts the resource as code in another thread, not as startup code. - A
!is also valid in a file name. A request without a prefix, such as./we!rd.jsorpkg/a!b.js, resolves as a plain path first when that file exists. When the file does not exist, for example in a clone without installed packages, fallow splits the request on!, as webpack does. Thenpkg/a!b.jsis the loaderpkg/afor the resourceb.js. - A loader in
module.rulesof a webpack config does not change how fallow reads an import. Its package still counts as used. The rule conditions (test,include,exclude,issuer,resourceQuery, theoneOforder) use regular expressions and computed paths, and many projects build the rules in code. A text loader rule that fallow applies to the wrong files would hide the imports of each file that it matches. - When the resource does not resolve, the unresolved import shows the full request. An
ignoreUnresolvedImportsentry must then use the full request.
Vite+
Vite+ keeps the config of each bundled tool in vite.config.*. Fallow reads each block like that tool:
| Block | What fallow reads |
|---|---|
build, resolve, test | The Vite and Vitest config. vite-plus turns both plugins on. |
pack | Each entry value as a runtime entry point. |
lint | The packages of jsPlugins, overrides[].jsPlugins and extends, as used dependencies. |
fmt | Nothing. |
staged | The commands, like a lint-staged config. |
run.tasks | The commands, like package.json scripts. A task with cwd gives no command. |
pack can be one tsdown config or an array of configs. Fallow reads the staged and run.tasks blocks from the root vite.config.* of the project and of each workspace package. The scripts in .vite-hooks/ are read like Git hook scripts. A vi.mock call through vite-plus/test counts as a Vitest mock.
The vp, vpr and vpx commands count as uses of vite-plus. The tool that vp runs decides how fallow reads the arguments:
| Command | What fallow reads |
|---|---|
vp lint, vp fmt, vp check | File targets that are not entry points, as for Oxlint and Oxfmt. |
vp test -c <file> | The file as a Vitest config. |
vp pack <file> | The file as an entry point. |
vp build, vp dev, vp preview | The arguments, as for vite. |
vp run <task>, vpr <task> | A call of a declared script, also with the -r, -w and --filter options of pnpm. |
vp exec, vp dlx, vpx | The child command, as for npx. A vp exec with -r or --filter makes no entry point. |
| Other subcommands | No file arguments. |
Egg.js and tegg
The Egg loader loads files by directory convention. Fallow makes these files entry points: app.js, agent.js, app/router.js or app/router/index.js, the files in app/controller, app/service, app/middleware, app/schedule and app/extend, and config/config.*.js and config/plugin.*.js. The same rules apply to a nested app, such as a test fixture app.
Fallow finds a nested app through its config/config.default.* or config/plugin.* file.
tegg loads each source file of a directory whose package.json has an eggModule key, or that config/module.json lists. Fallow makes these files entry points too. Like tegg, it skips hidden directories, node_modules, test, coverage, declaration files and vitest.config.*.
A package value in config/plugin.*, such as exports.redis = { enable: true, package: "@eggjs/redis" }, counts as a used dependency of the package.json that owns the app: the nearest manifest with a dependency section outside a test or fixtures directory. A test fixture app therefore credits the workspace package that runs its tests.
Module Federation
Fallow reads exposes, remotes and shared from module-federation.config.*, and from a Federation plugin call in a webpack, rspack, rsbuild, vite or next.config.* file. Fallow knows these calls: ModuleFederationPlugin, NextFederationPlugin, moduleFederationPlugin, pluginModuleFederation and federation.
A call counts only when its first argument is an object that declares exposes, remotes or shared.
exposes: each target becomes a runtime entry point, so the exposed module is not an unused file. Its exports followincludeEntryExports, like the exports of each entry point. A target that names a module request instead of a local path ("./utils": "shared-utils") credits that dependency, in the package that owns the config.remotes: fallow does not report an import of a remote alias or its subpaths, such asimport("checkout/Button"), as an unlisted dependency. The alias applies only below the directory of its config.shared: each package that the option names counts as used, in the package that owns the config (the nearestpackage.jsonat or above the config). Fallow reads the object form, the array form, an object element in the array form, and theimportandpackageNamefields of an entry. A key with a trailing/credits the same package. A relative key shares a project module and credits no package.
Fallow finds the plugin call in these positions:
- a nested plugin array, or a plugin list in a variable,
- a tool key such as
tools.rspack.plugins, - a hook body, such as an rsbuild
appendPluginshook or a Next.jswebpack(config)hook, - a helper module that the config imports with a relative
importorrequire, one import deep. The diagnostics and the trace sources then name the helper file.
Fallow follows one step of indirection to the options object: a same-file const or export const that no code writes to, a non-null assertion (mfConfig!), a computed callee (container['ModuleFederationPlugin']), a relative import or require of a sibling file, a spread or Object.assign({}, base) over a same-file binding, and the array form of exposes. Each config reader of fallow follows export const config = { ... }; export default config in the same way.
Fallow does not read the array form of remotes, a value that is not a static literal, a require of a package, or an array element with glob syntax, a nested array or a value that is not a string.
Runtime remotes
Fallow also reads the remotes of Federation runtime calls, in a file that imports the function from @module-federation/runtime or @module-federation/enhanced/runtime. A local function with the same name registers nothing.
registerRemotes([{ name: "checkout", entry }])registerscheckout, and a literalaliasof the object.loadRemote("checkout/Button")registerscheckout. A scoped name keeps two segments (@scope/remote).init({ remotes })andcreateInstance({ remotes })register the remotes of theremotesoption. Fallow also reads theregisterRemotesandloadRemotemethods of the instance that they return.
A runtime remote applies only inside the workspace that holds the file. In a .vue or .svelte file, the <script> blocks count as one file. Fallow reads only a static literal argument.
Diagnostics
Fallow reads the config as syntax. It does not fetch a remote container, and it does not check the exports, the versions or the shared singletons of the remote. When fallow cannot read a declaration, it adds a plugin-config-unreadable entry to workspace_diagnostics[] and prints a warning on stderr. Each unreadable key gives one entry, and each entry has degrades_analysis.
| Field | Values |
|---|---|
plugin | module-federation for a module-federation.config.* file and for a runtime call, or webpack, rspack, rsbuild, vite or nextjs for a config of that plugin |
key | The Federation key, or registerRemotes, loadRemote, init or createInstance for a runtime call |
reason | not-object-literal, array-form, spread, unreadable-entries or dynamic-argument. The set is open. |
path | The config file, or the source file of a runtime call |
Name the exposed files that fallow cannot see in dynamicallyLoaded, and a file that is an entry point of its own in entry. Put a remote alias in ignoreDependencies. This key also hides the unused-dependency findings for that name.
Trace the Federation source
--trace-file on an exposed file lists each config that exposes it. --trace-dependency on a remote alias lists each config that declares the alias, and says that a remote container supplies the name. The human output adds one Source: line for each config. The JSON output has a sources array, also in the MCP trace_file and trace_dependency tools:
{ "kind": "module-federation", "plugin": "webpack", "config": "packages/cart/webpack.config.js", "key": "exposes" }
For a remote that only a runtime call names, config is the source file and key is the function name. A trace without Federation has no sources array.
Nuxt
Convention directories
Fallow scans plugins/, middleware/ and modules/ one level deep, as Nuxt does. plugins/bar.ts and plugins/foo/index.ts are entry points. plugins/foo/helper.ts is not, so fallow reports it when nothing imports it. A file in the plugins list of nuxt.config is an entry point at any depth. The files in modules/<name>/runtime/ stay entry points, because a module registers them through resolver.resolve() strings that fallow does not follow.
A string value of dir.pages, dir.layouts, dir.middleware or dir.plugins in nuxt.config sets that directory, relative to srcDir. A string value of dir.modules is relative to the project root, as in Nuxt. The same rules apply under app/ and in each local layer.
Local layers
A directory is a local layer when it has a nuxt.config file, and a nuxt.config names it in extends by a relative path, or it is under layers/<name>. Fallow scans a local layer like the project root: its convention files are entry points, and with autoImports on, its components and composables are auto-import sources. A layer chain, in which a local layer extends another local layer, resolves too. The root files of a local layer (app.vue, app.config.*) are always used.
Fallow does not scan the files of a remote layer (a github: or gh: reference) or a package layer (an npm name). It reads the modules of a package layer from the nearest node_modules/<name>, and it does not follow the extends of that layer. For example, with extends: ["docus"], @nuxt/content is active for the app, so the components/content/ files and the content.config.* file of the app stay entry points. docus turns @nuxt/content on also when it is not installed.
An import of #layers/<name>/ resolves to the local layer whose nuxt.config sets $meta.name to <name>. A directory layers/<name> without $meta.name has its directory name as its name. A layer of extends without $meta.name has no name, so an import through #layers/<name>/ stays unresolved. When the root nuxt.config sets $meta.name, that name resolves to the project root.
Auto-import scope
With autoImports on, an auto-import name marks as used only the files of the app that uses it, and of the layers that this app extends. In a monorepo, a <Card /> in one app does not keep the unused Card.vue of another app. Components in components/global/, *.global.vue files, and, with @nuxt/content, the files in components/content/ stay entry points.
A layer that an app extends by a relative path outside the app, or by the package name of a workspace, shares its names with that app in both directions. Two apps that extend the same layer do not see the names of each other.
nuxt-og-image renders the template that a string names. A defineOgImage("Docs.takumi") or defineOgImageComponent("Docs") call marks the matching file as used, in an OgImage/, og-image/, OgImageCommunity/ or OgImageTemplate/ components directory. Dot segments join in PascalCase, and the renderer suffix (.satori, .browser, .takumi) and the directory prefix do not count. A template that no call names with a static string stays reported.
Storybook
Fallow reads each stories pattern of .storybook/main relative to the .storybook/ directory, as Storybook does. A pattern can point into another workspace. Fallow drops a pattern that leaves the project root. Storybook reads a leading / as an absolute file system path, so a pattern such as /src/** marks nothing as used. Fallow reads the object form { directory, files }. Without files, the Storybook default **/*.@(mdx|stories.@(js|jsx|mjs|ts|tsx)) applies.
Extglob groups in tool globs
Fallow reads the extglob groups @(..), ?(..), +(..), *(..) and !(..) in the Storybook stories patterns, Playwright testMatch, Vitest test.include and test.exclude, Rstest include and exclude, Jasmine spec_files and helpers, and import.meta.glob patterns. The matcher of fallow cannot repeat a group, so fallow changes each group into a glob that it can match. An include glob never matches fewer files than the tool, and an exclude glob never removes more files:
| Group | In an include glob | In an exclude glob |
|---|---|---|
@(a|b) | {a,b} | {a,b} |
?(a|b) | {,a,b} | {,a,b} |
+(a|b) | {a,b}*, so *.test.+(ts|js) also matches a.test.tsx | {a,b}, one time |
*(a|b) | * | {,a,b}, zero times or one time |
!(a|b) | *, minus the files that match a or b | The glob removes no file. |
Vue and Svelte files
Fallow reads these blocks of a .vue or .svelte file without a plugin. File types gives the common case.
<script src="./x.ts">is an import in a Vue file. In a Svelte file it is HTML that runs in the browser, so it adds no import.- Vue templates: a tag
<MyComponent>, a custom directivev-focus-trap(the importvFocusTrap), the object formsv-on="handlers"andv-bind="attrs", expressions, andutils.formatDateon a namespace import count as uses. - Svelte markup: a tag
<Button>, the directivesuse:,transition:,animate:,in:andout:, attribute expressions, and$myStore(the importmyStore) count as uses. - Vue joins
<script>and<script setup>into one module.<script setup>and the template can use an import of the plain<script>block, also a type that only thegeneric="..."attribute names. The plain<script>cannot use an import of<script setup>. - Svelte joins the module script (
<script module>or<script context="module">) and the instance script in the same way. The instance script and the markup can use an import of the module script, also as a$namestore. The module script cannot use an import of the instance script.
CSS and Sass files
- Fallow resolves
@use "components/button"in this order:components/_button.scss,components/button/_index.scss,components/button/index.scss. A Sass built-in module, such assass:math, is never an unresolved import. - When a bare
@useor@importdoes not resolve next to the file, fallow searches the include paths of the project, for examplestylePreprocessorOptions.includePathsof Angular, and thennode_modules. - Fallow ignores a remote URL (
https://...) and a data URI in@import. - A Tailwind v4
@plugin "daisyui"stays a package name, also in a.scssfile. A local plugin file, such as@plugin "./plugin.js", is reachable, and itsdefaultexport is used. Fallow also reads@pluginin a Vue or Svelte<style>block. composes: base from "./shared.module.css"in a CSS module is an import of the classesbasefrom that file.composes: name from globalandcomposes: namewithoutfromname no other file.
HTML in tagged templates
Fallow reads <script src> and <link rel="stylesheet|modulepreload" href> only in a template with the tag html, such as html`...` of Hono. It ignores other tags, such as css, sql and gql. It skips a path that an interpolation splits, such as html`<script src="${base}/app.js">`. A path that starts with / resolves as in an HTML file, but without the public/ step.
Pinia stores
The unused-store-member rule runs only when pinia or @pinia/nuxt is a declared dependency. Besides the reads that the rule page lists, fallow counts these uses:
store.memberin the template of a.vueor.sveltefile,this.memberorthis.$state.memberin a getter or an action of the same store,- a read in the setup function of a setup store, for example
count.valuein acomputed. Pinia needs the returned state for hydration, so a returned ref that only the setup body reads is used. - a read through
$state, such asstore.$state.countorconst { count } = store.$state. A write tostore.$stateis not a read.
A use of the whole store, such as { ...store }, Object.keys(store) or store[key], marks each member of the store as used. A use of the whole $state, such as save(store.$state), does the same. The rule does not cover Vuex or Svelte stores.
Component rules by framework
The rule unrendered-component also covers two cases outside single-file components:
- Angular (with
@angular/core): an@Componentwhose element selector is in no template. Fallow skips a component of a route,bootstrapApplication, a lazyloadComponent, and a dynamic render (ViewContainerRef.createComponent,*ngComponentOutlet). - Lit (with
lit,lit-elementor@lit/reactive-element): a custom element (@customElement("x-foo")orcustomElements.define("x-foo", C)) whose tag nohtmltemplate and no.htmlfile renders, and that nocreateElement,customElements.getorwhenDefinedcall uses. Fallow skips a published element, and an element under adocs,dev,demoordemosdirectory, because site tooling that fallow cannot read renders it.
The opt-in rule absent-component-prop reads these declarations and callers. A required typed prop stays required, also when a destructure or withDefaults gives it a default.
| Framework | Declarations | Callers | Cases that prevent a finding |
|---|---|---|---|
| React and Preact, also Next.js | JSX function and arrow components with same-file inline types, interfaces or type aliases, untyped destructure defaults, memo and forwardRef | JSX attributes and children, also through imported aliases, namespace members and proven spreads | Unresolved prop types, other wrappers, a component value that escapes, an unknown spread |
| Solid | JSX components with Solid bindings and local prop types | JSX attributes, children and proven spreads | Other wrappers, unresolved types, opaque use |
| Qwik | component$ wrappers, also with same-file generic prop types | JSX attributes, children and proven spreads | Other wrappers, unresolved types, opaque use |
| Vue and Nuxt | Typed or runtime defineProps, local named types, withDefaults, Options API props | Static tags, camel-case and kebab-case bindings, v-model, literal or local constant v-bind | Dynamic or scoped component use, exposed or forwarded props, defineModel, rest props |
| Svelte and SvelteKit | Typed or destructured Svelte 5 $props, untyped defaults, export let props | Static tags, shorthand attributes, bind, children, proven spreads | Dynamic components, $bindable, rest props, forwarding |
| Astro | Same-file Props interfaces or type aliases, Astro.props reads and destructure defaults | Static tags, explicit attributes, proven spreads | Dynamic tags, unresolved types, opaque props use |
| Angular | Component or Directive classes with @Input or signal input declarations, also with an alias | Static selectors with attribute, property or two-way bindings in inline or external templates | Inheritance, hostDirectives and other metadata, dynamic outlets, imperative use |
| Lit | Direct LitElement or ReactiveElement subclasses with property decorators and attribute aliases | Imported html templates, static tags, HTML attributes, case-sensitive .property bindings | Other inheritance or registration, imperative DOM use, injected HTML |
| Ember and Glimmer | Component subclasses with optional fields in a same-file typed Signature.Args | Static Glimmer tags and named @arguments | Registry lookup, other signatures, whole-args forwarding, computed argument access |
A proven spread has a known set of own keys, from a literal or a local binding that no code changes. A .tsx file name alone does not tell fallow which framework applies. When a project declares more than one of Preact, Solid and Qwik, fallow gives no JSX finding.
pnpm catalogs and overrides
The pnpm plugin reads the pnpmfile (.pnpmfile.mjs or .pnpmfile.cjs next to the lockfile) and each path in the pnpmfile setting of pnpm-workspace.yaml or .npmrc.
The catalog checks also read the catalog: values of pnpm overrides:
- A
catalog:value in an override is a reference to the catalog entry of the target package. So"parent>child": "catalog:x"uses thechildentry of catalogx. - When the catalog does not declare the target package,
pnpm installfails. Theunresolved-catalog-referencefinding then points to the line of the override. - An override key with a version selector, such as
vite@^5, does not replace acatalog:reference ofpackage.json, because pnpm fails the install for it.
Fallow reads the pnpm version from packageManager and checks only the override sources that this version reads. Override sources and the pnpm version has the table. A version without a minor or a patch, such as pnpm@10, does not count as a version before 10.5.1. A prerelease comes before its release, so pnpm@10.0.0-rc.3 is before 10.5.1. When the version names no pnpm, fallow reads the overrides of pnpm-workspace.yaml and pnpm.overrides.
The pnpm-workspace-overrides-ignored diagnostic has a cause field:
cause | Meaning | Fix |
|---|---|---|
pnpm-version | The pnpm version is before 10.5.1. This cause wins when both apply. | Update packageManager to pnpm 10.5.1 or later, or move the entries to pnpm.overrides. |
package-json-overrides | The pnpm version is 10 or earlier, and the root package.json declares pnpm.overrides or resolutions. | Move the entries to one source. |
Tailwind
The Tailwind plugin reads tailwind.config.{ts,js,cjs,mjs}, the config file of Tailwind v3:
- The globs of the
contentarray are files that are always used. - The packages of
plugins, as arequire()call or a string, are used dependencies. So are the packages ofpresets. - Each import of the config file, for example
tailwindcss/defaultTheme, is a used dependency.
// tailwind.config.js
import defaultTheme from "tailwindcss/defaultTheme";
export default {
content: ["./src/**/*.{js,ts,jsx,tsx}"],
plugins: [require("@tailwindcss/typography")],
};
In this example, tailwindcss and @tailwindcss/typography are used dependencies. For Tailwind v4, fallow reads the @plugin, @apply and @tailwind directives of the CSS files. File types has these rules.
How a plugin reads a config file
A built-in plugin parses a config file of its tool as code, and it does not run the file. Fallow reads these forms:
export default { ... },module.exports = { ... }, a top-level JSON object, and an object withsatisfiesoras.- A wrapper call such as
defineConfig({ ... }), also with a function that returns the object. const config = { ... }; export default config, also with a type annotation.- A same-file constant that a config value names, such as
setupFiles: SETUP. - The local bindings of a config function that the function returns, such as
return [web]withconst web = { ...common, entry }. - Each argument of a Vite
mergeConfig(...)call, and each config of an exported array, for webpack and rspack. - Both branches of a condition in an array spread, such as
...(isCi ? ["a"] : ["b"]).
A computed key and a call of a function of another module give no value. Add the files that such a config names to entry.
Related
- Plugins: how a plugin changes the results.
- React and Next.js: a Next.js page with and without its plugin.
- Write a plugin for your framework: add a plugin for your own tool.