-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
feat(eslint-plugin): [explicit-function-return-type] add option to allow concise arrows that start with void #1732
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
feat(eslint-plugin): [explicit-function-return-type] add option to allow concise arrows that start with void #1732
Conversation
Thanks for the PR, @G-Rath! 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 Report
@@ Coverage Diff @@
## master #1732 +/- ##
=======================================
Coverage 94.48% 94.48%
=======================================
Files 162 162
Lines 7487 7494 +7
Branches 2146 2150 +4
=======================================
+ Hits 7074 7081 +7
Misses 178 178
Partials 235 235
|
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.
code LGTM. it's pretty specific but sure, I'll allow it if they want to allow the change into eslint core.
lint again :)
This is an option to complement the
no-void
base rule allowing the use ofvoid
in the same conditions.Since that issue is still being evaluated, I've not made any reference to it, but the use-case is still valid even if the team decide against it.
The idea is to not require you to double up
void
:This change means that an option can be enabled that allows you to drop the
void
return type:This is only allowed when the option is enabled and: the arrow function is concise, and starts with the
void
operator.I'm completely open to bikeshedding on the name & such - I just didn't feel it was worth an issue given how small it is to implement, and makes more sense seeing it visually.