Skip to content

Adopt Fallow as a PR quality gate - #768

Merged
thebuilder merged 3 commits into
mainfrom
feat/adopt-fallow
Jul 28, 2026
Merged

Adopt Fallow as a PR quality gate#768
thebuilder merged 3 commits into
mainfrom
feat/adopt-fallow

Conversation

@thebuilder

Copy link
Copy Markdown
Owner

Summary

  • adopt Fallow 3.10.0 with full-repository dead-code, duplication, dependency, and health policy
  • remove unused dependencies and simplify the Storybook useOnInView renderer to eliminate real dead code and complexity indirection
  • model runtime entry points, framework-owned Storybook imports, public API, and uncovered interactive Storybook functions with narrow documented exceptions
  • run fallow audit for pull requests after the existing coverage test job

Why

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 thresholds
  • npx fallow dead-code — 0 issues
  • npx fallow dupes — 0 clone groups, 0.0% duplication
  • npx fallow health — 264 functions analyzed, 0 findings
  • npx fallow audit --base origin/main — pass
  • pnpm lint — pass
  • pnpm exec tsc --noEmit — pass
  • pnpm vitest --coverage --run — 96 tests passed; 97.6% statements, 87.86% branches, 98.21% functions, 98.72% lines
  • pnpm --filter storybook build — pass

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.
@bolt-new-by-stackblitz

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@vercel

vercel Bot commented Jul 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
react-intersection-observer Ready Ready Preview, Comment Jul 28, 2026 10:56am

@pkg-pr-new

pkg-pr-new Bot commented Jul 28, 2026

Copy link
Copy Markdown
npm i https://pkg.pr.new/react-intersection-observer@768

commit: 013d402

@thebuilder
thebuilder marked this pull request as ready for review July 28, 2026 10:58
@thebuilder
thebuilder merged commit e52dfaa into main Jul 28, 2026
9 checks passed
@thebuilder
thebuilder deleted the feat/adopt-fallow branch July 28, 2026 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant