feat(extension): Add option to force strict templates #1646
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This feature request is to provide an extension option to override the project's
angularCompilerOptions
. This would allow the language service to enablestrictTemplates
.With the release of v12, the Ivy-based Language Service became the default.
With that, the information provided by the extension follows what the application
has configured the compiler to interpret (see Alex's
blog post
for more information on why this was done). As a result, developers upgrading from
previous versions that have apps which do not have strict templates enabled often
experience a loss of information from the extension. It also may not be feasible
for large projects to enable
strictTemplates
immediately due to an abundance of new errors that would need to be fixed.Importantly, this would likely result in the language service producing diagnostics
that are not produced when running/compiling the application. However, this may
still be a more ideal state than the current experience (which would be simply
not getting any useful information for lots of locations in the template which
require stricter type checking options).
resolves #1418