Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
earshinov opened this issue Jun 16, 2019 · 1 comment · Fixed by #14800
Closed
Labels
area: @schematics/angular feature Issue that requests a new feature
Milestone

Comments

@earshinov
Copy link

🚀 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.

@alan-agius4 alan-agius4 added area: @schematics/angular feature Issue that requests a new feature labels Jun 17, 2019
@ngbot ngbot bot modified the milestone: Backlog Jun 17, 2019
@alan-agius4 alan-agius4 modified the milestones: Backlog, 8.1.0 Jun 17, 2019
mgechev pushed a commit that referenced this issue Jun 17, 2019
…ectionParameters` to workspace tsconfig.json

Closes #14794
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: @schematics/angular feature Issue that requests a new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants