-
Notifications
You must be signed in to change notification settings - Fork 87
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
refactor: turn on strict mode in Typescript configuration #262
Conversation
The number of lines is a lie again, most of it is due to adding vendor typings to packages without types!! |
YAYYYYYYYYYYYYY TESTS PASS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for getting this across the finish line; in retrospect strict mode probably should have been enabled at the start. I see plenty of non-null assertions being made, but I'll take what I can get.
I added lint rules for non null too, they are now warnings so it should get devs to be more aware too |
f1ebdb6
to
467024c
Compare
I'm working on fixing these merge conflicts, will merge once I'm done |
This adds on to commit 60ba0e3d1a9dd5c293fcd9434aebb7d04a3ffcaf.
This removes the Typescript unsupported warning
Error should only be thrown if state is undefined
467024c
to
afe1732
Compare
Problem
Turn on strict mode that allows the Typescript compiler to alert us on undefined or nullable errors.
Various changes are made in the codebase to accommodate this change.
Also add better JSDocs on the functions I've come across
Closes #163
Features
convict-format-with-validator
intypes/vendors
express-device
package intypes/vendors
bson-ext
package intypes/vendors
Improvements
Dev Dependencies
ts-jest
from 26.1.4 to 26.3.0: This removes the Typescript unsupported warning@shelf/jest-mongodb
from 1.2.2 to 1.2.3: I thought this would allow us to not have to manually setup and teardown ondbHandler.connect
, but that does not seem to be the case. No harm updating though so it stays.