Skip to content

Rework @typescript-eslint/no-invalid-void-type: enable type checking and correct docs + option naming #8113

Open
@JoshuaKGoldberg

Description

@JoshuaKGoldberg

Overview

@typescript-eslint/no-invalid-void-type has a couple of surprisingly tricky issues associated with it:

I think the root issue is that when the rule was originally implemented (#1847), practices around the void type were much simpler than they are now (edit: and, as @G-Rath notes, it was largely a port of the even-older TSLint rule!). Conditional types had only been in the language for a couple of years (2.8 release notes). We also hadn't yet solidified our docs and rule options on correctly referring to arguments vs. parameters (#146 -> #5384) and not redundantly referring to them as "a generic" (https://www.totaltypescript.com/no-such-thing-as-a-generic).

Proposal (merging #7227 (comment) & #7227 (comment)): for v7 v8, let's..

Thoughts, all? cc @bradzacher @auvred @G-Rath @omril1

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepting prsGo ahead, send a pull request that resolves this issuebreaking changeThis change will require a new major version to be releasedenhancementNew feature or requestenhancement: plugin rule optionNew rule option for an existing eslint-plugin rulepackage: eslint-pluginIssues related to @typescript-eslint/eslint-plugin

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions