Adopt Fallow as a PR quality gate - #768
Merged
Merged
Conversation
Model Storybook MDX and the Rsbuild compatibility config as runtime entries. Keep Rsbuild and Size Limit packages as dependency exceptions because their CLI/config loading is not visible to static imports, and keep verified Storybook package subpaths as resolver exceptions. Mark the published reset helper as public API and limit the Storybook-only CRAP override to 60 because interactive demos are intentionally excluded from unit coverage while structural thresholds remain unchanged.
Remove the duplication threshold because zero disables Fallow's percentage limit. Scope Storybook CRAP exceptions to the four exact uncovered functions with the smallest passing ceilings, and inline the one-use options serializer so the health cleanup does not add indirection merely to move complexity between functions.
Treat production imports from dev dependencies as errors and inline the one-use Storybook wrapper. Keep the UseOnInViewRender exception function-scoped at the smallest passing CRAP ceiling because Storybook demos are intentionally outside unit coverage.
|
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
commit: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
useOnInViewrenderer to eliminate real dead code and complexity indirectionfallow auditfor pull requests after the existing coverage test jobWhy
The repository had no unified static policy for unused files and exports, dependency correctness, duplication, or function health. A full-repository Fallow baseline found unused dependencies, entry points that required explicit modeling, a stale Tailwind type-only annotation referencing an unlisted package, and Storybook renderer complexity that could be reduced before enabling a changed-files gate.
Impact
Pull requests now fail when they introduce dead code, unresolved or unlisted imports, production imports from dev dependencies, circular dependencies, duplication, or functions above the chosen health thresholds. Runtime behavior and the published API remain unchanged. Interactive Storybook demos retain exact function-scoped CRAP ceilings because they are intentionally outside unit coverage; all default cyclomatic, cognitive, and unit-size thresholds still apply.
Validation
npx fallow— 0 issues, 0 clone groups, 0 functions above thresholdsnpx fallow dead-code— 0 issuesnpx fallow dupes— 0 clone groups, 0.0% duplicationnpx fallow health— 264 functions analyzed, 0 findingsnpx fallow audit --base origin/main— passpnpm lint— passpnpm exec tsc --noEmit— passpnpm vitest --coverage --run— 96 tests passed; 97.6% statements, 87.86% branches, 98.21% functions, 98.72% linespnpm --filter storybook build— pass