Skip to content
This repository has been archived by the owner. 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
Member

@adidahiya adidahiya left a comment

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 <adi.dahiya14@gmail.com>
@JoshuaKGoldberg
Copy link
Contributor Author

JoshuaKGoldberg commented Sep 8, 2019

Thanks @adidahiya - sorry about the delay!

@JoshuaKGoldberg JoshuaKGoldberg requested a review from adidahiya Sep 8, 2019
@adidahiya adidahiya merged commit a15541d into palantir:master Sep 9, 2019
14 checks passed
@JoshuaKGoldberg JoshuaKGoldberg deleted the invalid-void-generics branch Sep 9, 2019
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