microsoft / microsoft/TypeScript

Allow --build with Intermediate Errors - shouldn't happen on tsconfig errors

Open
#59,867 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Awaiting More Feedback Domain: tsc -b Suggestion
Dominant language
Go
Stars
111k
Forks
14.4k
Avg merge
1d 19h
Merged PRs (30d)
117

Description

🔎 Search Terms

intermediate error

🕗 Version & Regression Information

This is about new feature in 5.6

⏯ Playground Link
💻 Code

tsconfig.json

{
    "extends": "../wrong/path/to/some/tsconfig.json",
    "compilerOptions": {
        // nothing, expects to inherit things
    }
}
🙁 Actual behavior

When compiling such project, tsc does complain that it cannot find the base config, however it continues building. This is a big problem when the base config contains important things like "outDir": "${configDir}/lib" - TS will happily build using the defaults, writing a ton of .js and .d.ts files next to the source files.

🙂 Expected behavior

For tsconfig.json file errors, do not continue building the project.

Additional information about the issue

No response

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

Reproduce the behavior with the provided tsconfig.json, which extends a nonexistent path, and invoke tsc with --build. Trace how the compiler handles the missing base configuration during project builds; done means tsconfig errors stop the build instead of emitting files with defaults.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
build-system, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.