Skip to content

fullTemplateTypeCheck is only enabled for library projects, but not application projects #14794

Closed
@earshinov

Description

@earshinov

🚀 Feature request

Command (mark with an x)

- [x] new
- [x] generate

Description

Currently @angular/cli only adds

"angularCompilerOptions": {
  // ...
  "fullTemplateTypeCheck": true,
  // ...
}

for library projects (tsconfig.lib.json.template).

I would expect this option to be enabled for applications as well, or even better globally in the workspace tsconfig.json file (tsconfig.json.template).

Angular's official documentation on fullTemplateTypeCheck recommends setting this option to true irrespective of whether the project is an application or a library.

We have just enabled "fullTemplateTypeCheck" in our Angular project and realized how many errors were lurking inside templates without being noticed. Such unpleasant surprise could have been easily avoided if @angular/cli had prudently enabled "fullTemplateTypeCheck" when the project was started.

Unless I am missing something, "fullTemplateTypeCheck" seems beneficial in all cases.

Describe the solution you'd like

  1. Add
"angularCompilerOptions": {
  "fullTemplateTypeCheck": true
}

to tsconfig.json.template.

  1. Remove
"fullTemplateTypeCheck": true,

from tsconfig.lib.json.template

Describe alternatives you've considered

One alternative is to let developers discover the usefulness of "fullTemplateTypeCheck" themselves. However, my opinion is that it would be nice of @angular/cli to enlighten them (us) and promote best practices like having "fullTemplateTypeCheck" enabled.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions