Navigation Menu

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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(eslint-plugin): create no-invalid-void-type rule #1847

Merged
merged 8 commits into from Apr 26, 2020
Merged

feat(eslint-plugin): create no-invalid-void-type rule #1847

merged 8 commits into from Apr 26, 2020

Conversation

G-Rath
Copy link
Contributor

@G-Rath G-Rath commented Apr 4, 2020

馃帀

I think that this might be autofixable by replacing void with undefined, but not enough that I'd be willing to place any bets just yet 馃槵馃槀

@typescript-eslint
Copy link
Contributor

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
Copy link

codecov bot commented Apr 4, 2020

Codecov Report

Merging #1847 into master will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #1847      +/-   ##
==========================================
+ Coverage   94.36%   94.37%   +0.01%     
==========================================
  Files         166      167       +1     
  Lines        7608     7629      +21     
  Branches     2185     2192       +7     
==========================================
+ Hits         7179     7200      +21     
  Misses        183      183              
  Partials      246      246              
Flag Coverage 螖
#unittest 94.37% <100.00%> (+0.01%) 猬嗭笍
Impacted Files Coverage 螖
...es/eslint-plugin/src/rules/no-invalid-void-type.ts 100.00% <100.00%> (酶)

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.

not a full review, a few quick nitpicks on the doc.


I think we should name it a little bit clearer than the original rule.
no-invalid-void-type would be better as it:

  • shows it's banning something
  • shows it only applies to the void type, not the operator.

packages/eslint-plugin/docs/rules/invalid-void.md Outdated Show resolved Hide resolved
packages/eslint-plugin/docs/rules/invalid-void.md Outdated Show resolved Hide resolved
packages/eslint-plugin/docs/rules/invalid-void.md Outdated Show resolved Hide resolved
packages/eslint-plugin/docs/rules/invalid-void.md Outdated Show resolved Hide resolved
packages/eslint-plugin/docs/rules/invalid-void.md Outdated Show resolved Hide resolved
packages/eslint-plugin/docs/rules/invalid-void.md Outdated Show resolved Hide resolved
@bradzacher bradzacher added the enhancement: new plugin rule New rule request for eslint-plugin label Apr 4, 2020
@G-Rath G-Rath changed the title feat(eslint-plugin): create invalid-void rule feat(eslint-plugin): create no-invalid-void-type rule Apr 12, 2020
@G-Rath G-Rath requested a review from bradzacher April 12, 2020 23:30
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 for the most part.
A few comments.

@bradzacher bradzacher added the awaiting response Issues waiting for a reply from the OP or another party label Apr 20, 2020
@G-Rath G-Rath requested a review from bradzacher April 23, 2020 05:17
@bradzacher bradzacher removed the awaiting response Issues waiting for a reply from the OP or another party label Apr 23, 2020
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!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement: new plugin rule New rule request for eslint-plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants