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

refactor(eslint-plugin): remove unnecessary if-statements in explicitReturnTypeUtils #3839

Merged
merged 1 commit into from
Sep 22, 2021

Conversation

MichaelDeBoey
Copy link
Contributor

No description provided.

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @MichaelDeBoey!

typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community.

The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately.

Thanks again!


🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint. As a thank you, your profile/company logo will be added to our main README which receives thousands of unique visitors per day.

@codecov
Copy link

codecov bot commented Sep 4, 2021

Codecov Report

Merging #3839 (3bd7a65) into master (dda9cee) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #3839      +/-   ##
==========================================
- Coverage   93.51%   93.51%   -0.01%     
==========================================
  Files         151      151              
  Lines        8144     8143       -1     
  Branches     2584     2582       -2     
==========================================
- Hits         7616     7615       -1     
  Misses        167      167              
  Partials      361      361              
Flag Coverage Δ
unittest 93.51% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ges/eslint-plugin/src/rules/no-inferrable-types.ts 93.33% <ø> (ø)
...nt-plugin/src/rules/no-unused-vars-experimental.ts 91.39% <ø> (ø)
...plugin/src/rules/explicit-module-boundary-types.ts 89.47% <100.00%> (ø)
packages/eslint-plugin/src/rules/no-shadow.ts 77.34% <100.00%> (+0.17%) ⬆️
packages/eslint-plugin/src/rules/no-type-alias.ts 100.00% <100.00%> (ø)
...es/eslint-plugin/src/rules/no-use-before-define.ts 91.20% <100.00%> (+0.09%) ⬆️
.../eslint-plugin/src/util/explicitReturnTypeUtils.ts 100.00% <100.00%> (ø)

@bradzacher bradzacher added the refactor PRs that refactor code only label Sep 20, 2021
Copy link
Member

@bradzacher bradzacher left a comment

Choose a reason for hiding this comment

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

instead of an implicit boolean coercion via the Boolean constructor - prefer an explicit logical check as it's clearer

@bradzacher bradzacher added the awaiting response Issues waiting for a reply from the OP or another party label Sep 20, 2021
@bradzacher bradzacher removed the awaiting response Issues waiting for a reply from the OP or another party label Sep 21, 2021
@bradzacher
Copy link
Member

bradzacher commented Sep 21, 2021

I think i got the logic conversion wrong because I'm an idiot? Cos all the tests started failing.

@bradzacher bradzacher added the awaiting response Issues waiting for a reply from the OP or another party label Sep 21, 2021
Copy link
Member

@bradzacher bradzacher left a comment

Choose a reason for hiding this comment

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

thanks!

@bradzacher bradzacher removed the awaiting response Issues waiting for a reply from the OP or another party label Sep 22, 2021
@bradzacher bradzacher merged commit 9b13a86 into typescript-eslint:master Sep 22, 2021
@MichaelDeBoey MichaelDeBoey deleted the patch-29 branch September 22, 2021 09:40
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
refactor PRs that refactor code only
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants