I started developing an Angular Application back in Angular 4 and now it has been upgraded to Angular 12. However, during the initial development phase, the strict mode
was not enabled. Now that the application is stable and live in production, I am looking for the best way to gradually enable strict mode instead of turning on all strict options at once.
I came across a helpful answer on enabling strict mode in Angular 10 here, which gives a general overview of enabling strict mode.
My specific question is about how to enable strict mode in stages. Considering the medium size and complexity of the application, testing all the changes at once would be a significant challenge.
There are various options in Angular strict config such as some that can be manually configured and some that are turned on by strict:true
:
- noImplicitAny
- strictInjectionParameters
- strictTemplates
- strictNullChecks
- Enable in
tslint.json
by setting "no-any": true
What is the most effective way to enable these settings gradually, in a specific order, to ensure thorough testing before deploying to production? I would appreciate any guidance, especially from someone who has successfully updated an existing project incrementally rather than all at once.