Skip to content

linter: false positive for no-invalid-void-type rule #20777

@rtarpine-vanta

Description

@rtarpine-vanta

What version of Oxlint are you using?

1.57.0

What command did you run?

oxlint $file

What does your .oxlintrc.json (or oxlint.config.ts) config file look like?

{
  "categories": {
    "correctness": "off"
  },
  "rules": {
    "no-invalid-void-type": "error"
  }
}

What happened?

The following code triggers a typescript-eslint(no-invalid-void-type): Use void only as a return type or generic type argument error:

interface Producer<T> {
  get: () => T;
}

export class Test implements Producer<void> {
  get = () => null;
}

But the original no-invalid-void-type rule doesn't complain since void is used as a generic type argument.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Priority

    None yet

    Effort

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions