chore: start incremental migration to strictNullChecks #2835
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.
Description of changes
This PR, plus the scripts in dbjorge/aiweb-strict-null-check-migration-tools, creates the initial infrastructure for an incremental migration to
strictNullChecks: true
, following the same strategy that VS Code used.tsconfig
file attsconfig.strictNullChecks.json
which is the same as our main/normal tsconfig file except that it enablesstrictNullChecks
and only runs on the already-compliant parts of our codefiles
andincludes
of thestrictNullChecks
config with the subset of/src/
that is already compliant (by usingautoAdd
from aiweb-strict-null-check-migration-toolsyarn null:check
command to compile against the new strictNullChecks config (note, an especially useful option during cleanup work isyarn null:check --watch
)yarn null:check
intoyarn fastpass
yarn null:check
into PR/CI buildThe ongoing effort to incrementally bring the codebase to null safety would amount to iteratively using aiweb-strict-null-check-migration-tools to find the next candidate files, fixing up null safety issues there, and using that repo's
autoAdd
tool to bring in any transitively-fixed cases.Pull request checklist
yarn fastpass
yarn test
)<rootDir>/test-results/unit/coverage
fix:
,chore:
,feat(feature-name):
,refactor:
). SeeCONTRIBUTING.md
.