Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

Added allow-generics option to invalid-void rule #4839

Merged
merged 6 commits into from
Sep 9, 2019
Merged

Added allow-generics option to invalid-void rule #4839

merged 6 commits into from
Sep 9, 2019

Conversation

JoshuaKGoldberg
Copy link
Contributor

@JoshuaKGoldberg JoshuaKGoldberg commented Aug 25, 2019

PR checklist

Overview of change:

Adds an allow-generics option to invalid-void for the sake of common uses such as Promise<void>. It's true by default, can be specified as false, and also allows a string[] whitelist: e.g. "allow-generics": ["Promise"].

CHANGELOG.md entry:

[new-rule-option]: Added allow-generics to invalid-void

Copy link
Contributor

@adidahiya adidahiya left a comment

Choose a reason for hiding this comment

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

code looks good, let's just improve the error messages a bit

src/rules/invalidVoidRule.ts Outdated Show resolved Hide resolved
src/rules/invalidVoidRule.ts Outdated Show resolved Hide resolved
src/rules/invalidVoidRule.ts Outdated Show resolved Hide resolved
Thanks!

Co-Authored-By: Adi Dahiya <[email protected]>
@JoshuaKGoldberg
Copy link
Contributor Author

Thanks @adidahiya - sorry about the delay!

@adidahiya adidahiya merged commit a15541d into palantir:master Sep 9, 2019
@JoshuaKGoldberg JoshuaKGoldberg deleted the invalid-void-generics branch September 9, 2019 02:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Async function return void cause invalid void
2 participants