Skip to content
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

chore: start incremental migration to strictNullChecks #2835

Merged
merged 11 commits into from
Jun 16, 2020

Conversation

dbjorge
Copy link
Contributor

@dbjorge dbjorge commented Jun 10, 2020

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.

  • Adds a secondary tsconfig file at tsconfig.strictNullChecks.json which is the same as our main/normal tsconfig file except that it enables strictNullChecks and only runs on the already-compliant parts of our code
  • Populates the initial files and includes of the strictNullChecks config with the subset of /src/ that is already compliant (by using autoAdd from aiweb-strict-null-check-migration-tools
  • Adds a new yarn null:check command to compile against the new strictNullChecks config (note, an especially useful option during cleanup work is yarn null:check --watch)
  • Adds yarn null:check into yarn fastpass
  • Adds yarn null:check into PR/CI build

The 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

  • Addresses an existing issue: Codebase should use strict null checks #2869
  • Ran yarn fastpass
  • [n/a] Added/updated relevant unit test(s) (and ran yarn test)
  • [n/a] Verified code coverage for the changes made. Check coverage report at: <rootDir>/test-results/unit/coverage
  • PR title AND final merge commit title both start with a semantic tag (fix:, chore:, feat(feature-name):, refactor:). See CONTRIBUTING.md.
  • [n/a] (UI changes only) Added screenshots/GIFs to description above
  • [n/a] (UI changes only) Verified usability with NVDA/JAWS

@dbjorge dbjorge marked this pull request as ready for review June 12, 2020 17:51
@dbjorge dbjorge requested a review from a team as a code owner June 12, 2020 17:51
@dbjorge dbjorge closed this Jun 12, 2020
@dbjorge dbjorge reopened this Jun 12, 2020
@dbjorge dbjorge changed the title [draft proposal] chore: start incremental migration to strictNullChecks chore: start incremental migration to strictNullChecks Jun 12, 2020
@dbjorge dbjorge merged commit d29009d into microsoft:master Jun 16, 2020
@dbjorge dbjorge deleted the strict-null-checks branch June 16, 2020 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants