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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 6 commits into from Sep 9, 2019

Conversation

@JoshuaKGoldberg
Copy link
Collaborator

commented Aug 25, 2019

PR checklist

  • Addresses an existing issue: fixes #4828
  • New feature, bugfix, or enhancement
    • Includes tests
  • Documentation update

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

Josh Goldberg added 4 commits Aug 25, 2019
@JoshuaKGoldberg JoshuaKGoldberg marked this pull request as ready for review Aug 31, 2019
Copy link
Member

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

This comment has been minimized.

Copy link
Collaborator Author

commented Sep 8, 2019

Thanks @adidahiya - sorry about the delay!

Josh Goldberg
@JoshuaKGoldberg JoshuaKGoldberg requested a review from adidahiya Sep 8, 2019
@adidahiya adidahiya merged commit a15541d into palantir:master Sep 9, 2019
14 checks passed
14 checks passed
ci/circleci: build Your tests passed on CircleCI!
Details
ci/circleci: checkout-code Your tests passed on CircleCI!
Details
ci/circleci: clean-lockfile Your tests passed on CircleCI!
Details
ci/circleci: lint Your tests passed on CircleCI!
Details
ci/circleci: test Your tests passed on CircleCI!
Details
ci/circleci: test2.1 Your tests passed on CircleCI!
Details
ci/circleci: test2.4 Your tests passed on CircleCI!
Details
ci/circleci: test2.7 Your tests passed on CircleCI!
Details
ci/circleci: test2.8 Your tests passed on CircleCI!
Details
ci/circleci: test2.9 Your tests passed on CircleCI!
Details
ci/circleci: test3.0 Your tests passed on CircleCI!
Details
ci/circleci: testNext Your tests passed on CircleCI!
Details
ci/circleci: testRc Your tests passed on CircleCI!
Details
cla/palantir CLA signed on 2016-09-27 18:34 UTC+00:00
Details
@JoshuaKGoldberg JoshuaKGoldberg deleted the JoshuaKGoldberg:invalid-void-generics branch Sep 9, 2019
@adidahiya adidahiya referenced this pull request Sep 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.