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(tx): enable strict-boolean-expressions rule for eslint #2147

Closed
wants to merge 7 commits into from

Conversation

faustbrian
Copy link
Contributor

@faustbrian faustbrian commented Aug 16, 2022

Part of #2137 and depends on #2146 and #2150 being merged

@faustbrian faustbrian changed the title chore(tx): enable strict-boolean-expressions rule for eslint chore(tx): enable strict-boolean-expressions rule for eslint Aug 16, 2022
@codecov
Copy link

codecov bot commented Aug 16, 2022

Codecov Report

Merging #2147 (b2a7c73) into master (a87f179) will decrease coverage by 0.03%.
The diff coverage is 91.48%.

Impacted file tree graph

Flag Coverage Δ
block 92.77% <100.00%> (ø)
blockchain ?
client 87.07% <ø> (ø)
common 98.09% <83.33%> (ø)
devp2p 92.22% <ø> (-0.09%) ⬇️
ethash ∅ <ø> (∅)
evm 79.08% <ø> (ø)
rlp ∅ <ø> (∅)
statemanager 88.21% <87.50%> (+0.05%) ⬆️
trie 90.11% <100.00%> (+0.68%) ⬆️
tx 97.99% <92.00%> (+0.01%) ⬆️
util 92.33% <ø> (ø)
vm 85.27% <ø> (ø)

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[]) => {
Copy link
Contributor Author

@faustbrian faustbrian Aug 16, 2022

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,
Copy link
Contributor Author

@faustbrian faustbrian Aug 16, 2022

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.

@faustbrian
Copy link
Contributor Author

Closing this since it falls in the same category as Uint8Array in terms of breaking changes/impact.

@faustbrian faustbrian closed this Oct 15, 2022
@faustbrian faustbrian deleted the strict-tx branch October 15, 2022 03:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants