I have an existing Angular Application that started development at the time of Angular 4, now it's on Angular 12. But at the time of development, the strict mode
was not enabled. Now after the application is stable and also deployed on production, what's the best way to enable strict mode stey by step i.e. in phases instead of turning every strict option on.
I have already read the answer here Angular 10 Stricter Settings --strict , which is for generally enabling strict mode.
My question is related to how to enable it in phases. As the application size/complexity is medium level, therefore it will be a major challenge to test all of the changes at once.
There are a few options I see in angular strict config such as, some of them can be configured manually as well some are turn on by strict:true
:
- noImplicitAny
- strictInjectionParameters
- strictTemplates
- strictNullChecks
- Enabling in
tslint.json
"no-any": true
What's the best way to enable these settings, step by step, in a specific order which is better? So that it can be tested and deployed to production in phases instead of one whole chunk which has changes of bug/issue going unnoticed. Any help would be appreciated especially by someone who has gone through updating an already existing project, in a bits by bits manner instead of one whole push.