accessibility-insights-web icon indicating copy to clipboard operation
accessibility-insights-web copied to clipboard

chore(null): Add CI task to check for new files to add to tsconfig.strictNullChecks.json

Open madalynrose opened this issue 3 years ago • 0 comments

Details

Add an additional task to the lints CI job to run yarn null:autoadd and determine if there are new files to be added to tsconfig.strictNullChecks.json for the PR. If it fails, it will display an error message reminding the author to run yarn null:autoadd and commit the results.

Motivation

This will help us work towards #2869 as we add/change files. As things are now, if someone wants to focus on adding some files to tsconfig.strictNullChecks.json in a dedicated PR, they often find a whole host of additional files that could have been added earlier. This PR ensures we expand our strict null checks whenever there are new files to include.

Context

Another approach we identified for keeping tsconfig.strictNullChecks.json up to date involves flipping tsconfig.strictNullChecks.json to explicitly exclude files instead of using include, thus automatically including new files. This would require adjusting all of our strict null scripts (e.g., autoadd, find, etc.) to follow that convention, which is not an insignificant amount of work.

Pull request checklist

  • [x] Addresses an existing issue: #2869
  • [x] Ran yarn fastpass
  • [x] Added/updated relevant unit test(s) (and ran yarn test)
  • [x] Verified code coverage for the changes made. Check coverage report at: <rootDir>/test-results/unit/coverage
  • [x] 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 avatar Aug 15 '22 15:08 madalynrose