Skip to content

TS linting error regarding outDir in tsconfig.app.json #33360

@hb20007

Description

@hb20007

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: @schematics/angulargemini-triagedLabel noting that an issue has been triaged by geminigood first issueLabel noting a good first issue to be worked on by a community memberhelp wantedLabel noting an issue which the team is looking for contribution from the community to fix

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions