IQSS / IQSS/dataverse-frontend

Find All Reference in VS Code excludes tests

Open
#630 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
31
Forks
26
Avg merge
4d 13h
Merged PRs (30d)
4

Description

As originally reported at https://github.com/IQSS/dataverse-frontend/pull/627#issuecomment-2744348921 when you use "Find All References" in VS Code it skips over test directories.

A work around is to make this change (see related Stack Overflow post):

% git diff
diff --git a/tsconfig.json b/tsconfig.json
index 7a25b67d..5d3f4fe0 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -30,5 +30,5 @@
     "packages/design-system/src/",
     "public"
   ],
-  "exclude": ["tests/**/**.spec.ts", "tests/**/**.spec.tsx"]
+  "exclude": []
 }

However, changing exclude like this might cause other problems.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting tsconfig.json's exclude entries and checking how VS Code's Find All References behaves with tests//.spec.ts and .tsx. Done means references from test directories are included without introducing the other problems noted in the issue; validate the relevant project checks after deciding the safe configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
developer-experience, testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.