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

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

Merged
adidahiya merged 6 commits into
palantir:masterfrom
JoshuaKGoldberg:invalid-void-generics
Sep 9, 2019
Merged

Added allow-generics option to invalid-void rule#4839
adidahiya merged 6 commits into
palantir:masterfrom
JoshuaKGoldberg:invalid-void-generics

Conversation

@JoshuaKGoldberg

@JoshuaKGoldberg JoshuaKGoldberg commented Aug 25, 2019

Copy link
Copy Markdown
Contributor

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

@adidahiya adidahiya left a comment

Copy link
Copy Markdown
Contributor

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

Comment thread src/rules/invalidVoidRule.ts Outdated
Comment thread src/rules/invalidVoidRule.ts Outdated
Comment thread src/rules/invalidVoidRule.ts Outdated
Thanks!

Co-Authored-By: Adi Dahiya <[email protected]>
@JoshuaKGoldberg

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