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: fix consistent-return eslint warnings #5334

Merged
merged 13 commits into from
Jul 23, 2019

Conversation

kieckhafer
Copy link
Member

@kieckhafer kieckhafer commented Jul 18, 2019

Resolves #5272
Impact: breaking|minor
Type: chore

Issue

We currently have many consistent-return eslint warnings.

Solution

Fix (or disable) these warnings, and then remove the warn override in our package.json eslint rules to make consistent-return an error so new violations are not introduced.

Most of the changes add null as a return. Some return a boolean where deemed appropriate.

Breaking changes

return null has been added in a lot of places. While this shouldn't affect anything that is updated, please not that there is no longer no return / undefined return in many functions.

Testing

  1. run eslint
  2. see there are no longer any consistent-return warnings
  3. see that the override for this rule was removed, so in the future all issues will be errors

Notes

  • There are a few jsdocs added in the PR as well, as I tried to add them if I saw missing jsdoc in a file I was updating.

Signed-off-by: Erik Kieckhafer <[email protected]>
Signed-off-by: Erik Kieckhafer <[email protected]>
Signed-off-by: Erik Kieckhafer <[email protected]>
@kieckhafer kieckhafer changed the base branch from master to develop July 18, 2019 23:12
Signed-off-by: Erik Kieckhafer <[email protected]>
Signed-off-by: Erik Kieckhafer <[email protected]>
Signed-off-by: Erik Kieckhafer <[email protected]>
Signed-off-by: Erik Kieckhafer <[email protected]>
Signed-off-by: Erik Kieckhafer <[email protected]>
Signed-off-by: Erik Kieckhafer <[email protected]>
@kieckhafer kieckhafer requested a review from aldeed July 19, 2019 22:08
@kieckhafer kieckhafer marked this pull request as ready for review July 19, 2019 22:08
aldeed
aldeed previously requested changes Jul 22, 2019
Copy link
Contributor

@aldeed aldeed left a comment

Choose a reason for hiding this comment

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

One problem and one suggestion. The rest looks good.

@kieckhafer kieckhafer requested a review from aldeed July 23, 2019 04:15
@kieckhafer kieckhafer dismissed aldeed’s stale review July 23, 2019 04:16

@aldeed comments addressed, ready for another look

@aldeed aldeed merged commit 54172e0 into develop Jul 23, 2019
@aldeed aldeed deleted the chore-kieckhafer-eslintConsistentReturn branch July 23, 2019 21:27
@kieckhafer kieckhafer mentioned this pull request Aug 2, 2019
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