gajus / gajus/eslint-plugin-flowtype
flowtype/require-types-at-top is thrown when mixing type/ declaration
Open
bug
- Dominant language
- JavaScript
- Stars
- 1.1k
- Forks
- 151
- PR merge metrics
- No merged PRs in 30d
Description
```js
declare function DataPoolConnectMethodType (): Promise;
declare function DataPoolConnectMethodType ((connection: DatabaseIsolatedPoolConnectionType) => Promise): Promise;
type FooType = string;
```
Expected:
No warnings.
Actual:
Getting "flowtype/require-types-at-top" error.
Contributor guide
Research direction
Start at the flowtype/require-types-at-top rule entry point and reproduce the reported JavaScript snippet. Check why the type declaration after the declare functions is reported, then verify that the example produces no warnings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- eslint, javascript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100