◐ Shell
clean mode source ↗

TS linting error regarding `outDir` in `tsconfig.app.json`

Command

new

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

No response

Description

I just generated a new Angular project and I'm surprised to see that the boilerplate comes with a TS linting error. More specifically, it pertains to the outDir property in tsconfig.app.json:

{
  "extends": "./tsconfig.json",
  "compilerOptions": {
    "outDir": "./out-tsc/app",
    "types": []
  },
  "include": ["src/**/*.ts"],
  "exclude": ["src/**/*.spec.ts"]
}

The TS linting error text:

The common source directory of 'tsconfig.app.json' is './src'. The 'rootDir' setting must be explicitly set to this or another path to adjust your output's file layout.

Visit https://aka.ms/ts6 for migration information

If specified, .js (as well as .d.ts, .js.map, etc.) files will be emitted into this directory. The directory structure of the original source files is preserved; see rootDir if the computed root is not what you intended.

Minimal Reproduction

  1. Generate a new project with ng new.
  2. Open tsconfig.app.json.
  3. Observe the linting error.

Exception or Error

Your Environment

Angular CLI       : 22.0.1
Node.js           : 26.1.0
Package Manager   : npm 11.16.0
Operating System  : win32 x64

Anything else relevant?

No response