microsoft / microsoft/DefinitelyTyped-tools

dt-lint void-return rule errors on `this: void` parameters

Open
#671 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
423
Forks
237
Avg merge
18h 18m
Merged PRs (30d)
11

Description

When enabling eslint config plugin:@typescript-eslint/recommended-type-checked, it includes the rule unbound-method. But when trying to update a definition in DefinitelyTyped to include this: void I get an error:

ERROR: 42:17  void-return  Use the `void` type for return types only. Otherwise, use `undefined`. See: https://github.com/microsoft/DefinitelyTyped-tools/blob/master/packages/dtslint/docs/void-return.md

Changing the first parameter this: void to anything else would be an error. This void-return rule should allow for this: void as the first parameter.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the error with the eslint config plugin:@typescript-eslint/recommended-type-checked and a DefinitelyTyped definition using this: void. Start by locating the void-return rule and its tests or documentation, then verify that this: void as the first parameter is accepted while other non-return uses remain rejected.

Written by the indexing model from the issue text.

Assessment

Tech stack
eslint, typescript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.