Skip to content

test(core): cover directory barrel reachability - #1703

Merged
aidenybai merged 4 commits into
mainfrom
cursor/triage-1699-9135
Aug 30, 2026
Merged

test(core): cover directory barrel reachability#1703
aidenybai merged 4 commits into
mainfrom
cursor/triage-1699-9135

Conversation

@skoshx

@skoshx skoshx commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Confirm that the current project-analysis pipeline resolves a Next.js tsconfig alias to a directory barrel.
  • Confirm that the barrel and its re-export stay reachable while an unrelated file is reported as unused.
  • Keep the regression in the existing graph-completeness suite without duplicate test helpers.

The reported false positive does not reproduce on current main. This PR adds a narrow regression to keep that behavior stable. If the current release still reports the barrel, a minimal repository is needed to identify the missing configuration edge.

Validation

  • Full test suite
  • Lint
  • Typecheck
  • Format check
  • Build
  • JSON report smoke test

One unrelated timing assertion failed once during the first full run. The exact test passed three consecutive reruns, and the full suite then passed.

Closes #1699

cursoragent and others added 2 commits August 29, 2026 08:57
- Add tests for tsconfig path alias resolution to index.ts
- Add tests for baseUrl resolution to index.ts
- Add tests for relative directory imports to index.ts
- Add Next.js-specific test with auto-detected entries
- Add direct resolver tests to verify directory resolution

Tests confirm that barrel files imported via directory paths (e.g., @/features/foo -> foo/index.ts) are correctly resolved and not flagged as unused.

Related to issue #1699

Co-authored-by: Skosh <skoshx@users.noreply.github.com>
Test confirms that directory imports work correctly with moduleResolution: bundler setting (used by Next.js).

Co-authored-by: Skosh <skoshx@users.noreply.github.com>
@pkg-pr-new

pkg-pr-new Bot commented Aug 29, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/eslint-plugin-react-doctor@1703
npm i https://pkg.pr.new/oxlint-plugin-react-doctor@1703
npm i https://pkg.pr.new/react-doctor@1703

commit: 7b144ca

@github-actions

github-actions Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Interactive terminal E2E

Terminal Control verified the built CLI at 7b144ca in a real PTY:

  • selected a project interactively and observed Scanning... before the three-second Git delay completed
  • waited for the clean result and exercised the compact report
  • opened copy context and the GitHub Actions confirmation, then cancelled safely

Download the edited MP4 and PNG evidence

@aidenybai aidenybai changed the title test: add comprehensive tests for barrel file directory imports test(core): cover directory barrel reachability Aug 30, 2026
@aidenybai
aidenybai marked this pull request as ready for review August 30, 2026 05:13
@aidenybai
aidenybai merged commit 2133985 into main Aug 30, 2026
24 of 26 checks passed
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.

unused-file: directory barrels (index.ts) reached via directory-path imports flagged as unused

3 participants