-
Notifications
You must be signed in to change notification settings - Fork 775
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(tx): enable strict-boolean-expressions
rule for eslint
#2147
Conversation
strict-boolean-expressions
rule for eslint
Codecov Report
Flags with carried forward coverage won't be shown. Click here to find out more. |
@@ -29,20 +29,20 @@ export async function getTests( | |||
excludeDir, | |||
} | |||
return new Promise((resolve, reject) => { | |||
const finishedCallback = (err: Error | undefined, files: string[]) => { | |||
if (err) { | |||
const finishedCallback = (err: Error | null, files: string[]) => { |
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.
This type was wrong. The err
value actually comes back as null
if it isn't defined. Noticed this because tests started to fail when I checked for undefined
instead of null
.
reject(err) | ||
return | ||
} | ||
resolve(files) | ||
} | ||
const fileCallback = async ( | ||
err: Error | undefined, | ||
err: Error | null, |
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.
This type was wrong. The err
value actually comes back as null
if it isn't defined. Noticed this because tests started to fail when I checked for undefined
instead of null
.
Closing this since it falls in the same category as |
Part of #2137 and depends on #2146 and #2150 being merged