gajus / gajus/eslint-plugin-flowtype

require-return-type with { 'annotateUndefined': 'always' } should not trigger for class constructors

Open
#449 0 comments 0 reactions 0 assignees View on GitHub
bug help wanted
Dominant language
JavaScript
Stars
1.1k
Forks
151
PR merge metrics
No merged PRs in 30d

Description

`require-return-type` with `{ 'annotateUndefined': 'always' }` should not trigger for class constructors, since class constructors should never return anything.

Contributor guide

Open the contributing guide

Research direction

Locate the `require-return-type` rule and its existing tests in the repository. Reproduce the case with `{ 'annotateUndefined': 'always' }`, then verify that class constructors are exempt while the rule still reports applicable non-constructor functions.

Written by the indexing model from the issue text.

Assessment

Tech stack
eslint, javascript
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.