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

fix(eslint-plugin): allow explicit any for no-unsafe-return #3498

Conversation

JoshuaKGoldberg
Copy link
Member

Generally uses the same check that already existed for some cases to make sure we don't give a complaint if the function's explicit return type matches its actual return type.

Fixes #3482.

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @JoshuaKGoldberg!

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.

@JoshuaKGoldberg JoshuaKGoldberg marked this pull request as draft June 7, 2021 22:39
@codecov
Copy link

codecov bot commented Jun 7, 2021

Codecov Report

Merging #3498 (9d4189d) into master (fc5f171) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #3498      +/-   ##
==========================================
- Coverage   92.66%   92.65%   -0.01%     
==========================================
  Files         324      324              
  Lines       11188    11193       +5     
  Branches     3157     3159       +2     
==========================================
+ Hits        10367    10371       +4     
  Misses        365      365              
- Partials      456      457       +1     
Flag Coverage Δ
unittest 92.65% <100.00%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
...ckages/eslint-plugin/src/rules/no-unsafe-return.ts 98.30% <100.00%> (+0.05%) ⬆️
...ackages/eslint-plugin/src/rules/prefer-includes.ts 97.87% <0.00%> (-1.03%) ⬇️

@JoshuaKGoldberg JoshuaKGoldberg marked this pull request as ready for review June 7, 2021 23:07
@bradzacher bradzacher added the bug Something isn't working label Jun 7, 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.

LGTM - thanks for this!

@bradzacher bradzacher merged commit b15a2b2 into typescript-eslint:master Jun 13, 2021
@JoshuaKGoldberg JoshuaKGoldberg deleted the no-unsafe-return-explicit-any branch June 17, 2021 01:07
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[no-unsafe-return] option to allow returning any if the function explicitly declares returning any
2 participants