False positive unused file for Vercel vercel.ts config What happened? fallow dead-code…
- User
False positive unused file for Vercel vercel.ts config
What happened?
fallow dead-codereportsapps/web/vercel.tsas an unused file, but Vercel treatsvercel.tsas a project configuration file that is discovered and executed by convention.The file is not imported by application source, so it looks unused to a pure import graph. It should be treated as a Vercel config entrypoint.
Vercel docs say:
vercel.tsconfigures and overrides Vercel project behavior.- Unlike
vercel.json,vercel.tsexecutes at build time. - The final config must be exported as
config. - Vercel also supports
vercel.js,vercel.mjs,vercel.cjs, andvercel.mts.
The
@vercel/configpackage also treatsvercel.tsas the config input:packages/config/README.mdsays to create avercel.tsfile in the project root.packages/config/README.mdsaysvercel.tsis automatically compiled duringvercel build,vercel dev, andvercel deploy.packages/config/src/cli.tsresolvesprocess.cwd()/vercel.ts.packages/config/src/cli.tsimports the config module and collects named exports.packages/config/example/vercel.tsshows the expectedexport const configshape.
Because Vercel discovers this file by convention, Fallow should not report it as unused.
Reproduction
Create an app/workspace with a
package.jsonlike:{ "name": "@example/web", "private": true, "type": "module", "scripts": { "build": "next build", "env-pull": "vercel env pull" }, "devDependencies": { "@vercel/config": "latest", "vercel": "latest" } }Create
vercel.tsat the app root:import type { VercelConfig } from '@vercel/config/v1'; export const config = { regions: ['dub1'], fluid: true, installCommand: 'pnpm install --filter @example/web...', devCommand: 'next dev --port 3000', crons: [ { path: '/api/jobs/run', schedule: '*/5 * * * *', }, ], } satisfies VercelConfig;Run:
fallow dead-codevercel.tsis reported as an unused file.Expected behavior
Fallow should treat Vercel programmatic config files as used config entrypoints when Vercel is active.
At minimum, the Vercel plugin/config detection should mark these app-root files as always used:
vercel.tsvercel.jsvercel.mjsvercel.cjsvercel.mts
A fix could add these to the relevant Vercel plugin config/always-used patterns, similar to how other framework config files are protected from unused-file reporting.
Fallow version
2.85.0
Operating system
macOS
Configuration
Interface
No new interfaces are introduced.
- Assistant
Now let me check how
always_usedpatterns are matched (root vs. workspace-relative), since the report is forapps/web/vercel.tsin a workspace: - Assistant
Now let me check where the plugin count / plugin lists are asserted or documented:
- Assistant
I have the full picture now. Let me check how plugin modules are declared in
mod.rs: - Assistant
Now I'll write the Vercel plugin:
- Assistant
Now register the module and add it to the builtin list:
- Assistant
Now check whether
extract_importscaptures type-only imports (the issue's repro only hasimport type): - Assistant
Now add the integration tests to
frameworks.rs: - Assistant
Now build and run the tests:
- Assistant
All 8 tests pass. Let me verify end-to-end with the actual CLI against the repro fixture, and run fmt/clippy:
- Assistant
vercel.tsis now a plugin entry point, controls still detected. Now update the plugin-count references: - Assistant
Now run the full workspace test suite:
- Assistant
The shell appears unable to spawn processes right now — likely resource pressure from the background workspace build. Let me check the background task's progress:
- Assistant
The workspace test suite is still building in the background, and the foreground shell can't spawn processes while it runs. I'll wait for the background task to complete.
- Assistant
Waiting for the workspace test suite (
byercg971) to finish — I'll verify the results and complete the remaining checks (fmt check, final summary) when it completes.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Identical first prompt
- composer-2.5Compare side by side →
- composer-2.5Compare side by side →
- composer-2.5Compare side by side →
- composer-2.5Compare side by side →
- composer-2.5Compare side by side →
- gpt-5.6-solCompare side by side →
- gpt-5.6-solCompare side by side →
- gpt-5.6-solCompare side by side →
- gpt-5.6-solCompare side by side →
- gpt-5.6-solCompare side by side →
- fable-5Compare side by side →
- fable-5Compare side by side →