microsoft / microsoft/TypeScript

Provide an editor-level warning when including output files

Open
#40,195 3 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Needs Proposal Suggestion
Dominant language
Go
Stars
111k
Forks
14.3k
Avg merge
2d 4h
Merged PRs (30d)
132

Description

Something that we noticed with internal codebases, as well as even with RxJS is that tsconfig.jsons are incorrectly configured for editor scenarios and include folders like dist and lib. This means you end up with slower performance, and noisy auto-imports.

We already provide some sort of error here when compiling, but we don't provide the same error in editor scenarios.

Open questions:

  • How is this information presented to the user? How is the editor given notice that it should alert a user about this?
  • What exactly does it mean to include an output file? In the case of RxJS, there are no "output files" getting included in the compilation based on how we determine a file is an an output of input files. Specifically, the root-level tsconfig.json doesn't specify an outDir, so it doesn't know that it should avoid including dist. Maybe we can use some directory-naming heuristics when we find one folder named src and another named dist or lib?

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 with the existing compiler error for projects that include output files and compare how the same tsconfig.json is handled in editor scenarios. Clarify how the editor should be notified and what counts as an output file, then define the warning behavior and detection rules as done criteria.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
developer-experience, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.