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(null): null check fixes #5985

Merged
merged 7 commits into from
Sep 1, 2022

Conversation

madalynrose
Copy link
Contributor

@madalynrose madalynrose commented Sep 1, 2022

Details

This PR fixes strict null checks for a few different files. These files were selected by running yarn null:find, added to tsconfig.strictNullChecks.json one-by-one, judged on whether their resolutions were straightforward enough to not require their own PR (removed if complex), and addressed.

I recommend going through this PR commit-by-commit, as each file from yarn null:find is scoped to a single commit.

  • src/common/rule-based-view-model-provider.ts: allow various methods to return null
  • src/background/stores/tab-store.ts: update TabStoreData to accept undefined values for url, title, and id, as that is what is returned from the chrome.tabs API
  • accept undefined values for description, url, and guidance` for RuleResults, as returned by axe
  • src/DetailsView/components/interactive-header.tsx: update InteractiveHeader to exclude items (an optional param) instead of passing null
  • make originalResult optional and default to undefined, as it is optional in the data returned from axe
Motivation

#2869

Context

More PRs like this to follow, trying to keep PRs relatively small and well-chunked.

Pull request checklist

  • Addresses an existing issue: Codebase should use strict null checks #2869
  • Ran yarn null:autoadd
  • Ran yarn fastpass
  • Added/updated relevant unit test(s) (and ran yarn test)
  • 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

@madalynrose madalynrose requested a review from a team as a code owner September 1, 2022 16:36
Copy link
Contributor

@pownkel pownkel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@madalynrose madalynrose merged commit bf1b162 into microsoft:main Sep 1, 2022
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